Continued from Part 1. Next, you need to configure Virtualbox to appear on your network. You can do this by using a second virtual network device. Do the following:
- Click File…Preferences
- Choose “Network” and add a new device if one is not already present by click the green plus.
- You should then have a device called vboxnet0 or something similar. Click OK to confirm.
- Select your virtual machine from the list and click the Settings button
- Click Network and select the “Adapter 2” tab
- Check the box to enable the network adapter
- Select “Host Only Adapter” from the drop down menu
- Choose “vboxnet0” from the second drop down menu
- Click OK
In your virtual machine, you should now be able to determine your IP address by looking at the settings for your second adapter. From the command line, type:
You can use that IP address to connect to any remote services, including SSH, web server, database, etc. You may need to configure your virtual machine’s firewall to allow them access. Your remote services will behave just like live services, even though they are running through a virtual machine. This gives you the ability to run any types of tests you want or even run a full website from within it.