Tuesday 10 May 2011

Make VirtualBox use DHCP

Have you ever setup a virtual machine using the free software VirtualBox? I gave it a try for the first time just recently and I have to admit that it's a fantastic piece of software considering it's given away free of charge. Previously all of my experience of virtual machines was using VMware Player. However I'm more than happy to change, especially because it seems that the latest offering from VM suffers some problems on Windows 7.

However I had one issue that I couldn't work out with VirtualBox. When I logged into the virtual machine I was getting a strange IP address 10.0.2.2. I tried manually setting the IP but then my network connection stopped working. I took to hunting online with Google for an answer and eventually found what I was looking for.

Many thanks go to R3dux and his blog for the answer to this one. Whilst his advice was based on using VirtualBox on Linux, the same theory applied exactly to Windows. So here's the solution:

Go into the Network settings on the virtual console window and change the network adaptor from NAT to Bridged Adaptor. This then forces the virtual machine to share the network card settings from your host PC and therefore contact DHCP for an IP address.

If you want to read the whole article and see the screenshots, check out R3dux's blog.

No comments:

Post a Comment