How to Connect One Virtual Machine to Another
How to connect one virtual machine to another in VMware products and Hyper-V? In fact, it works basically the same as it is on VirtualBox, over the networking. I will introduce the operations in this article.
Can you connect one virtual machine to another
If you want to work or interact with your other virtual machines, then you may be wondering if you can connect one virtual machine to another? It is often discussed that you can do this on VirtualBox. But what about VMware and Hyper-V? How to connect one virtual machine to another in VMware products or Hyper-V?
In fact, if you just want to transmit files from one virtual machine to another, you can try easy ways such as shared folders or file-based backup. But if you want to connect one virtual machine to another, just as how it works on VirtualBox, it is achieved by virtual networking on Hyper-V and VMware products.
In this article, I will introduce you how to connect one virtual machine to another Hyper-V and VMware Workstation as example.
How to connect one virtual machine to another Hyper-V
1. Launch Hyper-V Manager, connect to the Hyper-V host and click Action > Virtual Switch Manager.
2. In the pop-up Virtual Switch Manager window, click New virtual network switch in the left inventory, and select what type of virtual switch do you want to create, click Create Virtual Switch.
Tip:
● External virtual switch: External virtual switch is bound to a physical network adapter and provides connected VMs with physical network access. This switch allows connection:
-VM to VM
-VM to host
-VM to outside network via host physical NIC
● Internal virtual switch: Internal virtual switch is not linked to a physical network adapter within the Hyper-V host. Instead, networks tied together by an internal virtual switch are entirely software-defined. This switch allows connection.
-VM to VM
-VM to host
● Private virtual switch: Private virtual switch exists only as a software construct, and passes traffic between the virtual machines on the Hyper-V host only. This switch allows connection:
-VM to VM
3. Provide a Name and Notes (optional) for the New Virtual Switch.
4. Select Connection type. If you select External network, specify the network adapter (NIC) that you want to use, and check the options below according to your needs.
- Allow management operating system to share this network adapter: Select this option if you want to allow the Hyper-V host to share the use of the virtual switch and NIC or NIC team with the virtual machine. With this enabled, the host can use any of the settings that you configure for the virtual switch like Quality of Service (QoS) settings, security settings, or other features of the Hyper-V virtual switch.
- Enable single-root I/O virtualization (SR-IOV): Select this option only if you want to allow virtual machine traffic to bypass the virtual machine switch and go directly to the physical NIC.
5. (Optional) If you want to isolate network traffic from the management Hyper-V host OS or other VMs that share the same virtual switch, check Enable virtual LAN identification for management operating system option. You can change the VLAN ID to any number or leave the default.
Note: VLAN ID is the virtual LAN identification number that the management operating system will use for all network communication through this virtual switch.
6. Click OK and confirm Apply Networking Changes.
How to connect two virtual machines in VMware Workstation
1. Launch VMware Workstation, select the target VM and click VM > Settings on the toolbar.
2. Navigate to Hardware > Network Adapter from the left inventory, select the type of Network connection you want. Click OK to save.
Tip: 3 default types of VMnet VMware Workstation:
● VMnet0 – Bridged: VMware VMnet0 is one of the default virtual networking that is set to use auto-bridging mode and bridge to all active network adapters on the host system. The DHCP server will automatically recognize the VM and assign it an IP address on the same subnet as the host, and is fully visible on that subnet.
● VMnet8 – NAT: VMware VMnet8 uses NAT virtual network by default, which means the VM in VMnet8 is connected via network address translation (NAT) to the host network adaptor, make your VM looks like it’s behind a NAT router.
● VMnet1 – Host-only: VMware VMnet1 is uses host-only mode to build an isolated network environment, which means the VMs can only access the addresses within the network segment specified in the host-only mode, forming internal communication with the host, and cannot access the external networks.
3. (Optional) If you want to connect to a Custom network, you can also create a network adapter in VMware Workstation. Back to Settings window, and click Add button at the bottom of the left inventory, and select Network Adapter in the pop-up wizard, click Finish to continue.
Always backup your virtual machine to prevent accidental data loss
When working with virtual machines it is possible to encounter some errors or virtual disk corruption. Therefore, it is important to backup your virtual machine regularly to protect the VM data from accidental loss.
Here I introduce you to a free virtual machine backup software -- AOMEI Cyber Backup. It offers you the following benefits.
✦ Agentless Backup: create complete and independent image-level backup for VMware ESXi and Hyper-V VMs.
✦ Multiple Storage Destinations: backup to local or network share destinations. And you can archive backups to Amazon S3 storage.
✦ Automated Execution: create backup schedules to automate virtual machine protection.
✦ Perpetual Free: you can use AOMEI Cyber Backup Free Edition with no time limit.
✦ Support Free ESXi: support both paid and free versions of VMware ESXi.
AOMEI Cyber Backup supports VMware ESXi 6.0 and later versions, as well as Hyper-V in Windows 8/8.1/10/11, Windows Server/Microsoft Hyper-V Server 2012 R2 and later versions.
AOMEI Cyber Backup simplifies the process of virtual machine backup into 3 simple steps. You can click the following button to download the freeware.
*You can choose to install this VM backup software on either Windows or Linux system.
Summary
If you want to connect one virtual machine to another, it is achieved by the virtual networking. In this article I introduced how to connect one virtual machine to another in VMware Workstation and Hyper-V. If you want to connect two virtual machines on vSphere, you also need to create VMware ethernet adapter.