Let’s get started building our Hyper-V Virtual Lab. Here is an outline of what is covered in this article:
Part 1- Hyper-V Role and Virtual Network
- Add Hyper-V Role to Windows Server 2008 R2
- Create Hyper-V Virtual LANs
- Create / Verify Hyper-V External LAN
- Create Hyper-V private LAN for LAB environment
Add Hyper-V Role to Windows Server 2008 R2
The Windows Server 2008 R2 Hyper-V role enables you to create a virtualized server computing environment. This type of environment is useful because you can create and manage virtual machines, which allows you to run multiple operating systems on one physical computer and isolate the operating systems from each other. As a result, you can use a virtualized computing environment to improve the efficiency of your computing resources by utilizing more of your hardware resources.
Before we start provisioning virtual machines on Server 2008 R2 edition we need to add Hyper-V role on the Server first. Please follow the step by step instructions on how to install install Hyper-V role.
The Hyper-V role can be installed through powershell, server manager command line and GUI. In this guide we will use GUI.
Click on Start -> Administrative Tools -> Server Manager to launch the Windows Server 2008 R2 Server Manage. Alternatively you can click on Server Manager icon in the task bar.
Under Server Manager Tree, Select Roles, on right hand side click on Add Roles.
Select Hyper-V and click on Next
- A general Introduction page will come, Click on Next to Proceed.
Select available network adapted for Virtual machines to communicate to other physical host computers on network. Click on next once done. This setting is important as this will allow virtual machines to communicate. Virtual machines can communicate internally using pseudo network adapters created within them which are called private network. In case we want to virtual machines to communicate to external machines then it will be done through a physical network adapter. In this configuration. We are creating a virtual switch by selecting physical NIC and later we can attach virtual machines to this virtual switch to have an external communication.
You will get a confirmation screen to proceed with installation. Notice that name here is shown as HyperV and network adapter as HyperVSwitch. This is basically the hostname of your System. I have named my lab machine to HyperV and Local Area Connection network to HyperVSwitch. Click on Install to install the role.
- Click on close. You will get a message to reboot the server. Click on Yes to proceed with reboot. At this point server will reboot and finalize the installation of Hyper-V role.
- Once the server will come back online. It will resume the setup and completes the Install. You can now click on close to return to Server Manager console.
You can now find Hyper-V role present under Server Manager tree.
We now have a Windows Server 2008 R2 server configured with the Hyper-V role enabled.
Hyper-V Virtual Lab – Create Hyper-V Virtual LANs
Now that you have a physical host with a Windows Server 2008 R2 and Hyper-V enabled, it’s important to make sure the networks in Hyper-V are setup properly for our virtual lab.
The first LAN that we need to confirm is the LAN that this physical Hyper-V host participates in. This “LAN” basically participates in the LAN that this computer is connected to. We’ll use this LAN as our connection to the outside world for the virtual lab environment.
We’ll also create a Hyper-V Virtual Network for our Hyper-V Lab environment. All network traffic for the lab will stay within this private network.
Create / Verify Hyper-V External LAN
Typically this LAN is already setup, but it’s important to make sure we know the name and configuration for this virtual LAN.
- Open the Hyper-V Manager
- Select Virtual Network Manager.
- Verify you have an external network setup. It’s important to have a good descriptive name for the external network that includes information telling the administrator that’s it’s an external LAn, shared with the management OS, and which physical network port it’s associated with. In this case it’s named: “LAN External – Shared – Intel Pro 1”. If you followed the earlier instructions for adding the Hyper-V role, rename the HyperVNetwork to “LAN External – Shared – Intel Pro 1” for this guide.
- Rename the network in the physical host. Control Panel -> Network and Internet -> Network Connections. Right-Click on the LAN External and name this network connection to the same name “LAN External – Shared – Intel Pro 1”
Create Hyper-V private LAN for LAB environment
Now that the external LAN name and configuration is verified, it’s time to create a new private LAN that will be used by the Hyper-V Lab. This will LAN will have a unique network IP address space so that all network traffic is contained within it.
This network will have a descriptive name that describes the address space that it is using.
Select Virtual Network Manager again.
Create a new Private Network:
It’s important to name your Hyper-V virtual network something meaningful so it’s easy to identify it in various configurations. I recommend being very descriptive by including the term “private” and identify the IP address range this network is using.
Rename the new LAN adapter on the host machine to something meaningful so that it’s easy to distinguish in later steps.
- Start->Right Click Network->Properties
- Click Change Adapter Settings
- Right Click new adapter and select “rename” and name it the same name as the adapter we created.