Virtualization is HUGE now. Companies are virtualizing nearly everything. Here's the problem -virtualization products can be quite expensive. So much so, most small shops can't afford to make use of this amazing tool. But if you drop down from the clouds you will see there are actual virtualization solutions that can be had on the cheap. In fact, there are virtualization solutions that can be had for free (unless you are going to virtualize a proprietary OS like Windows).
One of those solutions is VirtualBox. VirtualBox is an x86 x86_64 virtualization product that is as useful to the enterprise as it is for the home. But not all is obvious for those enterprise users trying to make virtual machines, served up by VirtualBox, work within their network. A big issue you will come across is making your virtual machines (regardless of platform) play well on your network's subnet. Although you might think the configuration options to handle this would lie within the guest OS, it actually must be configured within the host. So let's take a look at how this is taken care of.
NOTE: For this article I will be using VirtualBox OSE on a Ubuntu 10.10 host and a Windows XP guest.Step 1: Start up VirtualBox.
I do, of course, assume you already have VirtualBox installed as the host as well as a working guest OS installed. That being the case, start up VirtualBox.Step 2: Stop the virtual machine to be configured.
This is a must, as you cannot open up the settings window if the virtual machine is either paused or running. The virtual machine must be stopped. If the virtual machine is on pause, fire it up, and then completely shut down the virtual machine operating system.Step 3: Open the Settings window of the guest OS.
Once you have the guest OS shut down, select the Guest OS entry in the main window, and click the Settings button. When the Settings window opens click on the Network tab to make the necessary changes.
In order for your Guest OS to live on the same network as your host OS, the Guest OS networking configuration must be in Bridged mode. Figure A shows how this is configured.
This particular host/guest resides on my laptop, hence the wlan0 (Wireless) network adapter name.
Where this can be tricky is the Adapter Type settings. To get to this setting you must expand the Advanced section. In this advanced section you can configure:
- Adapter type
- Mac address
- Cable connected
The more important of the three is the Adapter type. VirtualBox can virtualize the following six types of network adapters:
- AMD PCNet PCI II (Am79C970A);
- AMD PCNet FAST III (Am79C973, the default);
- Intel PRO/1000 MT Desktop (82540OEM);
- Intel PRO/1000 T Server (82543GC);
- Intel PRO/1000 MT Server (82545EM);
- Paravirtualized network adapter (virtio-net).
The default is PCNet FAST III because it is supported by nearly every operating system out of the box. If, after setting up your bridged network, your network does not respond, this setting is what you will most likely have to change. Although it's a hassle, if your bridged network doesn't work, simply shut down the virtual machine and repeat the process (selecting a different Adapter type) until it works.
OK your changes and fire up your Guest OS again.Step 5: Configure your Guest OS network
More than likely your Guest OS is using DHCP. When you fire that Guest up it will now pick up a network address that belongs to the same subnet as your Host OS. Figure B shows my Guest OS reporting the same IP address scheme that my Host OS is on.
Same IP scheme, same subnet, same gateway.
Now your machines on your network can see your Virtualized Machine.Final thoughts
I get this question a lot. Usually it comes after the sender has pulled out their hair trying to see their virtual machines on their network. Well, now you can see just how simple it is to get that virtual machine on the same subnet as your regular network.
VirtualBox is an outstanding way to get virtualization taken care of without having to break the budget. It doesn't have the power that some VMWare tools have, but it will get you virtualized on a tight budget.
Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.