Thursday, April 26, 2012

How to Setup Network Between VirtualBox and VMware Virtual Machines

Mostly in testing environment you may have to setup network between virtual machines which are running on VMware workstation and VirtualBox. These separate virtual machines can be on same host or different host. Setting up network on same desktop virtualization software is very easy once you understand the available network type. How about in different virtualization software platforms?. This post shows how to setup network between VirtualBox and VMware virtual machines.

Two scenarios considered here.

1) Both software running on same physical computer with several virtual machines.
2) Both software running on different physical computers on network.
Without moving virtual machines to particular desktop virtualization software, you can use this method to make a network among them, no matter where its running.
For example, when you have a domain controller virtual machine on VMware, you can join VirtualBox virtual machines to domain from same or different host.
There are few network types available on both products, such as NAT and Bridged (to communicate to physical network), Host only type for network between guest and host, and Internal type for network among virtual machines.

Network Between VirtualBox and VMware Virtual machines – Both running on same host – Scenario 1

When physical live network available on your computer, for example at office, you definitely do not want to mess up virtual machines with office network. So, setting up bridged network type to physical network card with DHCP enabled is not a good idea, because it may create issues on your office network.
Next option is using ‘VirtualBox host only adapter’ as a physical common network card and bridge it to VMware. Do not confuse, follow the steps.
1) Make sure to enable ‘ VirtualBox Host-Only Ethernet Adapter’ in  host computer.
2) Set network type to ‘Host-only Adapter’ in VirtualBox virtual machine, which you want to connect with VMware virtual machine.

Network Between VirtualBox and VMwar3) By default VirtualBox host only adapter will be issuing IP address (as DHCP server) to clients in 192.168.56.0 series. You can keep DHCP or change it to manual, its up to you.
4) Now go to VMware Virtual Network Editor. It came with workstation only. VMplayer doesn’t have this option.

NOTE – When using VMware Player, you can select ‘Bridged Network’ type for virtual machine on VMware. This will not create any issues when physical network is not active or DHCP is not available on live network. If DHCP is available on LAN, VMware virtual machine will get physical LAN IP instead on VirtualBox host only adapter IP range. In this case, you must use manual IP on all VMs in VMware and VB.

Network Between VirtualBox and VMwar
Changing ‘Automatic’ to VirtualBox Host Only Adapter network type will separate VM’s network from physical LAN as shown above. VMnet0 configured with above settings.
5) On network settings of virtual machine, change the network type to custom and point to network name you modified in above step.

desktop virtualization software
Add caption
6) Now guest OS on VMware will be getting DHCP from VirtualBox network. Manual IP in same range also will work in this setup.
Check the guest OS firewall on both machines. Now we have successfully setup network between virtual machines in VirtualBox and VMware.
Here is the working network, I can ping from Windows vista on VMware to Windows XP on Oracle VirtualBox.

working_network

Scenario 2, VMware and VirtualBox Running on Different Hosts

Obviously we have to your physical LAN to connect virtual machines in different hosts.
1) Select bridged network type on virtual machines settings in VirtualBox. Point the network adapter to LAN network card which is connected to other VMware host.

desktop virtualization software
If DHCP available on physical LAN, your VM will get IP automatically, otherwise provide the manual IP, it depends on you.
2) Now on the VMware virtual machine’s settings, go to network settings and changed to ‘Bridged’ type.
In this way, this VM will communicate to VirtualBox VM you configured in earlier step. Again, DHCP and manual IP address is optional depends on your network. Check the both guest OS firewall settings also.

desktop virtualization software
I use both cases to configure network among virtual machines running on different software. Its working pretty well.

[ Click on Images to Enlarge ]

You can mail me to abhi.82@aol.in
Please  post any  suggestions or comments.