Lab Build Guide: Hyper-V VMs, Cloning, File Sharing… For a Friend.

Lab Build Guide: Hyper-V VMs, Cloning, File Sharing… For a Friend.

2. Networking.

Put in a request with your network engineer or your “cloud” engineer or DIY it. Either way, you’ll want to make sure your host network is in a separate isolated VLAN. You don’t want your Production, Test, Dev, QA, etc. environments interfering with your lab. Protect the lab.

But seriously, if you start building Domain Controllers or doing some crazy testing, it’s a good idea to be on an isolated network. You’ll thank me later. If for some reason you didn’t take my earlier advice, and you are in your living room — carry on. That 30-foot Cat-5e cable plugged into the router in your kitchen will do just fine. You are isolated enough.

Verify the Network

Check the TCP/IP Settings on the host’s physical network card(s). Ensure the server is configured to the desired subnet.

Create Virtual Network

There are a couple of different paths to take for the next step. Since I’ll be connecting to a file share on the host (where I’ll store SQL Server media, test DBs, scripts, etc.), I’m using the Internal virtual network. The Internal network will allow us to communicate with other virtual machines and the host. If you are looking to have internet access, use the External virtual network. This would be useful for applying patches to your virtual machine template and/or other internet things. There are a couple of ways to configure the External virtual network and they are in order of my personal preference:

  1. Select the unused secondary physical network card on the host and uncheck the box underneath to not share the network adapter. Run a second cable to the router in your kitchen and you’ll be good to go.
  2. If you only have one physical network card, select it from the dropdown menu, and check the box underneath to share the network adapter.

Choose wisely. I was messing around with these settings while creating this blog post and ended up losing connectivity to my host. Luckily my box is hosted at the local data center and not one across the country.

Back in Hyper-V Manager on the right hand panel, click on Virtual Network Manager and create the Internal virtual network.

Click Apply and OK to save.

Configure Virtual Network

You’ll see a new Local Area Connection on your host. Configure the TCP/IP Settings and use a separate subnet from the physical network. Like so.

Start the Virtual Machine

We are ready to power up the virtual machine. Right-click the VM and select Start. Next, double-click the VM to open the console.

Proceed with installing Windows and if you did choose to go with the External virtual network, assign an IP address and start downloading and installing the Windows Updates. There are a number of things you can do at this point in customizing the Windows installation, but they are outside the scope of this simple lab setup.

Up next. Clones.