Mostly in the testing environment, you may have to set up a network between virtual machines which are running on VMware Workstation and Oracle VirtualBox. These virtual machines can be on the same host or different host on the physical network. Setting up a network among VMs on the same virtualization software such as VirtualBox is easy once you understand the available network type. How about settings up a network among VMs in different virtualization software from different physical computers? This post shows how to setup a network between VirtualBox and VMware virtual machines.
Two Scenarios Considered here:
1) Both software (VMware and VirtualBox) running on the same physical computer with several virtual machines.
2) Each software running on different physical computers on the network. These two physical computers should have working network connectivity.
Without migrating virtual machines to particular desktop virtualization software, we can use this method to make a network connection among them, no matter where VM is hosted.
For example, when you have a domain controller virtual machine on VMware, you can join the virtual machines from VirtualBox to domain from the same or different host.
There are few network types available on both software products, such as NAT and Bridged (to communicate to physical network), Host-only type for the network between guest and host, and Internal type for the network among virtual machines.
Scenario 1: Network Between VirtualBox & VMware VMs – On the Same Host
When physical network available on your computer, for example at the office, you do not need to connect virtual machines with the office network for security and testing purpose. So, setting up a bridged network type with physical network card where 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 common network card and bridge it with VMware Workstation. Follow the steps.
1) Make sure to enable ‘VirtualBox Host-Only Ethernet Adapter’ DHCP service. This option can be accessed from the File menu and “Host Network Manager” in the VirtualBox console.
2) Set the network type as ‘Host-only Adapter’ in VirtualBox virtual machine settings. Modify the same network settings for the VMs that need to communicate with the VMs on VMware.
3) By default, the VirtualBox host-only adapter will be issuing IP address (as DHCP server) to clients. You can keep the same DHCP series or change it or even disable DHCP and assign IPs manually for the VMs. It is up to you, but make it simple and straight forward.
4) Go to VMware Virtual Network Editor now. This option is available with VMware workstation only. VMplayer doesn’t have this option.
NOTE – When using VMware Player, you can select the ‘Bridged Network’ type for the virtual machine on VMware. This will not create any issues when the physical network is not active or DHCP is not available on the physical network. If DHCP is available on LAN, then the VMware virtual machine will get IP from the physical LAN network instead of from VirtualBox host-only adapter. In this case, you must use manual IP on all VMs in VMware and VirtualBox.
Changing ‘Automatic’ to VirtualBox Host Only Adapter network type will separate VMs network from physical LAN. VMnet0 is configured with the above settings in my example.
5) In network settings of VMware virtual machine, change the network type to custom and point to the network name you modified in the above step (VMnet0)
6) Now the guest VM OS on VMware will be getting DHCP IP from VirtualBox network. Assigning manual IP in the same range also will work in this setup.
Now we have successfully set up a network between VirtualBox and VMware virtual machines.
Here is the working network connection in my lab. I can ping from Windows vista (VMware) to Windows XP (Oracle VirtualBox). Yes, this demonstration was done many years ago when Windows Vista was famous 🙂
Scenario 2: VMware and VirtualBox Running on Different Hosts
Obviously we have to the physical LAN to connect virtual machines in different hosts.
1) Select bridged network type in virtual machines settings of VirtualBox. Point the network adapter to LAN network card which is connected to other VMware host.
If DHCP available on physical LAN, your VM will get IP automatically, otherwise provide the manual IP.
2) Change the network settings of VM in VMware. Go to network settings and change to ‘Bridged’ type. This allows the particular VM to communicate to the physical network where the host computer is connected.
In this way, this VM will communicate to VirtualBox VM you configured in the earlier step. Again, DHCP and manual IP address are optional depending on your network setup. But make sure that both host computers and VMs are in the same IP range. Also, check the Windows firewall settings before doing any network test.
I used these two scenarios to configure network among virtual machines running on different software and different host computers. It worked pretty well. It is the ideal way to build and test a lab with multiple VMs from multiple physical computers when you can’t host many VMs on a single computer.
Hope this guide is useful. If you find this helpful, please leave a comment below or post the issues you faced in this setup.