Accessing Ubuntu Server in a VirtualBox Virtual Machine
daniel Fri, 03/04/2011 - 1:03pm
In order to get to any of the services that you are running on your virtual machine, you may need to do the following.
In VirtualBox's Preferences, in the network section, you will need a Host-only Network.
Make sure that one exists, and that the DHCP Server is turned on.
In VirtualBox's Settings for the machine:
Add a second Network Adapter as a "Host Only Adapter" for vboxnet0
Start the VirtualBox Machine and install Ubuntu Server as normal using either the cd or the iso (note: the iso is way faster)
Once that is complete and you've restarted the Server, you'll need to add a second network card to ubuntu.
You'll want the following as the contents:
# The loopback network interface
iface lo inet loopback
# The primary network interface
iface eth0 inet dhcp
iface eth1 inet dhcp
Save it, and now restart networking:
To verify everything worked:
You should now see 3 networking interfaces
You should also be able to access the resources on the server. For instance: