How to Set up Network Between VirtualBox and VMware Virtual Machines

Mostly in the testing environment, you may need to set up a network between virtual machines that are running on VMware Workstation and Oracle VirtualBox. These virtual machines can be on the same host or different hosts on the physical network.

Setting up a network among VMs in the same virtualization software such as VirtualBox is easy once we understand the available network type. How about settings up a network among VMs in different virtualization software from different physical computers? This guide shows how to set up network connectivity between VirtualBox and VMware virtual machines.

Two Scenarios Considered here:

1) Both software (VMware and VirtualBox) run on the same physical computer with several virtual machines.

2) Both software run on different physical computers on the network. These two physical computers have working network connectivity.

Without migrating virtual machines to a particular desktop virtualization software, we can use the below method to set up a network connection among them, no matter where VM is hosted.

For example, if you have a domain controller virtual machine on VMware, you can join the guest virtual machines from VirtualBox to that active directory domain from the same or different host.

There are a few network types available on both software products:

  • NAT and Bridged (to communicate to physical network)
  • Host-only type for the network between guest and host,
  • Internal type for the network among virtual machines.

Scenario 1: Network Between VirtualBox & VMware VMs – On the Same Host

When a physical network is 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 purposes. So, setting up a bridged network with the physical network card where DHCP is enabled is not a good idea, because it may conflict with your office network.

The next option is to use ‘VirtualBox host-only adapter’ and bridge it with VMware Workstation.

1) Make sure to enable the ‘VirtualBox Host-Only Ethernet Adapter’ DHCP service. This option can be accessed from the File menu and “Host Network Manager” in the VirtualBox console.

Enable Host Only Adapter

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 to VMware.

Network Between VirtualBox and VMware3) By default, the VirtualBox host-only adapter will be issuing IP addresses (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.

4) Navigate to VMware Virtual Network Editor now. This option is available with VMware workstation versions 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 adapter is not active or DHCP is not available on the physical network. If DHCP is available on LAN, then the VMware virtual machines will get IP from the physical LAN network instead of from the VirtualBox host-only adapter. In this case, you must use manual IP on all VMs in VMware and VirtualBox.

VMnet0 Option 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 environment.

5) In the network settings of the VMware virtual machine, change the network type to custom and point it to the network name you modified in the above step (VMnet0)

Desktop virtualization software

6) Now the guest VMs on VMware Workstation will get DHCP IP from the 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 OS (VMware) to another Windows OS (Oracle VirtualBox). It confirms the working network connectivity between these two virtualization software.

Working Network between VMware and VirtualBox

Scenario 2: VMware and VirtualBox Running on Different Hosts

In this setup, we need to have a working physical LAN to connect virtual machines between different hosts.

1) Select bridged network type in virtual machines settings of VirtualBox. Point the network adapter to the LAN network card which is connected to another VMware host.

Bridged Adapter

If DHCP is available on physical LAN, your VM will get IP automatically, otherwise provide the manual IP.

2) Change the network settings of VMs in VMware.

Go to network settings and change to the ‘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. DHCP or manual IP addresses are optional depending on your network setup. But make sure that both host computers and virtual machines are in the same IP range. Also, check the Windows firewall settings before doing any network test.

You may need to open or provide exceptions for particular network ports when you want to establish network connectivity among physical computers in a network.

VMware VM settings

I used these two scenarios to configure network connections among virtual machines running on different software and different host computers. It worked well without any issues. It is the ideal way to build a test lab with multiple VMs from several physical computers when you can’t host many VMs on a single computer.

Dinesh is the founder of Sysprobs and written more than 400 articles. Enthusiast in Microsoft and cloud technologies with more than 15 years of IT experience.

9 thoughts on “How to Set up Network Between VirtualBox and VMware Virtual Machines”

  1. Hi Dinesh,
    I was doing a setup with the following requirement:
    1. One virtualbox VM running Linux to have bridged connection to the physical lan card to comm with other hosts in the LAN
    2. One VMware VM running on Windows 2003 to have bridged connection to physical lan card on the same host as item 1 to be able to comm with both virtualbox VM in item1 and other hosts in the LAN.

    I tried both VMs to use bridge network and fixed IP address in same subnet as the physical LAN card on the host machine. The host can ping both VMs (virtualbox and vmware) but each VM can not ping the other VM.
    Any idea how to solve this ?

    Reply
  2. Hi Dinesh,

    I do have somewhat similar problem as Vinson

    Virtual Box=Running Oracle VM
    VMWare Player = Running Windows 2003 Server

    Host is able to ping both of them and i have done Bridged on VMware Player and Hostonly on Virtual Box.

    Still both the VMs are not able to communicate with each other.

    Any suggestion on this.

    Reply
  3. hi,I am Mehul. I am MIT student. I have problem with vmware workstation. I create two vmware and install windows server 2008. I initialise 192.168.5.2 and 192.168.5.3. but i can’t get ping in both server. so please guide me.
    Thank you..
    Mehul

    Reply
  4. Hey Dinesh,

    Thank you very much.
    I used 1st Scenario, it worked perfectly.
    Will be trying 2nd scenario soon.
    Thank you very much for this awesome article.

    Reply

Leave a Comment