Hyper-V management tip: separating virtual machines to their own private network

Posted: (EET/GMT+2)

 

Today, I'm using Microsoft's Hyper-V virtualization should I need virtual machines for testing work during development (and that is often). Recently, I've been working with an Active Directory based testing environment with multiple client machines. Since I don't want to disturb my normal network, I've separated my AD based virtual machines into their own private network.

The solution is simple: in Hyper-V manager, go to the settings of the virtual machine(s) you wish to connect to their own network, and under Network Adapter, simply select your private test network. You can configure these under the server-level settings using the Virtual Network Manager feature.

The immediate drawback of this solution is that the private networked virtual machines cannot access the Internet if you only have a single network card on your server. But if you have multiple, this should not be an issue. At home, you could use a regular ADSL/cable conneciton for your main network, and for instance a cheap 3G wireless connection for the private network.