Enable easy NAT and DHCP Connectivity for your Hyper-V Virtual Machines

Nathan Blasac
Nathan Blasac - Notes from the Field
2 min readSep 28, 2018

--

This is something many have struggled with. I have found different flavors of folks recommending this online.

Say you want to setup some Hyper-V client VM’s that can just go straight out the internet. What’s the easiest approach?

Here’s what has worked and continued to work for me.

The benefit of the VMware approach is the VMNet Nic provides NAT and DHCP to your VM Network.

Alternatively, You could use PowerShell and setup a NAT Hyper V Switch and manually assign IP addresses to your client VM’s. I’ve found this approach to be easier.

Go grab the latest version of VMWare Player.

Install it and run through all the defaults.

The VMWare Player will setup two NICs on your machine. VMnet1, and VMnet8. VMnet8 will get you NAT and DHCP.

Open up the Virtual Switch Manager within Hyper-V.

Create an External Switch.

Bind this to the VMWare Virtual Ethernet Adapter for VMnet8.

Also, check off “Allow management operating system to share this adapter”.

Attach your Virtual Machines to this switch, and they will be able to get out to the internet via NAT, and receive and IP address via DHCP.

Until next time.

//Addendum//

If you’ve ever used VMWare Workstation, you know of the VMNetEditor. This does not come with VMWare Player. What if you want to edit the above networks? See the following link

It’s in dutch, but you can easily get it translated. Some folks just install the Trial of VMWare Workstation, and grab the necessary files. Once you do that, you can easily edit the network settings.

--

--

Consultant working mainly on System Center, Azure/EMS, Systems Management and Windows Deployment.