Virtualbox centos bridged network not assigning ip address


I am in the process of setting up the Ansible centos-template vm using virtual box bridged network from my mac connected with wifi but it is not assigning the ip for the vm. Any idea?

I have followed the steps given in the below link as well but no luck.

1 Like

Hello, @joseph.velliah
Can you please ping to If it’s not working then please check internet settings of the VMs.

facing same issue with my windows laptop , IP is not configured for the virtual box even after selecting bridged n/w. Can someone advice on this??

Hello @Nik-Maverik,
Try this command sudo pkill dhclient then sudo dhclient

If the previous not working, Try the following to set a static IP with the following steps,

Within the directory /etc/sysconfig/network-scripts/ you should find the file ifcfg-INTERFACENAME (Where INTERFACENAME is the name of your interface). Open the correct file for editing with the command sudo nano /etc/sysconfig/network-scripts/ifcfg-<INTERFACENAME> or using vim editor. We need to modify that file in order to not only change the protocol from dhcp to static, but to add the specific IP address. So when you open up that file, you’ll want to change BOOTPROTO=dhcp to BOOTPROTO=static

Now you’ll need to add the entries to set not only the IP address, but the netmask, gateway, and DNS addresses. At the bottom of that file, add the following.





then restart the network service using this command systemctl restart network
Note: **you need to check your PC settings first and according to these settings you will set your IP to be in the same network of your PC so you will be able to connect to the VM using putty or mobaxtrem

I have installed Virtual box 6.1.36 and not able to get an IP address to the Cent OS 9. I am not finding the file under the specified folder. This installation is on my Windows Laptop running Windows 10 - 64bit. Any suggestions?

Could you mention which network adapter you connected to ?
If it’s not Bridge please attach you VM to Bridged adaptor and try again.