In this article, we will discuss how to set up Hyper-V external switches for three pre-existing virtual machines (VMs): one domain controller (DC), one Windows file server, and one Windows workstation. We intend to deploy a Ubuntu VM in the future and need to ensure proper network configurations for all VMs. Let's get started.
Prerequisites
Before we begin, ensure the following:
- Hyper-V is installed and configured on your host machine.
- Three VMs (one DC, one file server, and one workstation) are created and installed with the respective operating systems.
Setting up External Switches
Hyper-V external switches allow VMs to communicate with each other and the host machine using physical network adapters. Follow these steps to create an external switch:
Step 1: Create a Virtual Switch
Open the Hyper-V Manager, right-click on "Virtual Switches" and select "New Virtual Switch." Choose "External" as the switch type and provide a name, such as "ExternalSwitch." Select the physical network adapter you want to use and click "OK."
Step 2: Configure the External Switch
Right-click on the newly created external switch and select "Properties." In the "IPv4 Settings" tab, configure an IP address and subnet mask for the virtual switch. Make sure the IP address is not already in use on your network. Click "OK" to save the changes.
Assigning External Switches to VMs
Now that we have an external switch, we need to assign it to our VMs. Follow these steps:
Step 1: Add the External Switch to a VM
Open the settings for one of your VMs (e.g., the domain controller). Go to the "Network Adapter" tab and click "Add." Select "External" as the adapter type and choose the name of the external switch we created earlier. Click "OK" to save the changes.
Step 2: Repeat for Other VMs
Repeat the process for the other two VMs (file server and workstation).
Configuring Network Interfaces
Now that all VMs are connected to the external switch, we need to configure their network interfaces. Open the network and sharing center on each VM and ensure the appropriate network adapter is enabled and configured with the correct IP address and subnet mask. Make sure all VMs can ping each other and the host machine.
Joining VMs to a Domain
With the network configurations in place, you can now join your VMs to the domain. Follow the steps for your respective operating systems to join the domain.
In this article, we discussed how to set up Hyper-V external switches for three pre-existing VMs (one DC, one file server, and one workstation) and configured them to communicate with each other and the host machine. We also ensured proper network configurations for all VMs in preparation for deploying a Ubuntu VM in the future.