When a network newbie plays with Hyper-V

I use Hyper-V since a while now, but somehow I always managed to get the network part working without doing anything special, until I met System Center Virtual Machine Manager (SCVMM)…

When I was creating VMs and connecting them with an Internal or External Virtual Network, everything was working fine.

The Network Adapter created on the VM had the default settings:

image image

 

So me being a total newbie when I saw the result of the ipconfig /all I thought that Hyper-V, in someway, was emulating a DHCP for the Virtual Machines it hosts. One might agree with me, after all we’re getting an IP, right ?

Well, wrong! If you look closer at the IP you’ll see it starts with “169.254” and that my friend is not a standard DHCP allocated IP.

IP addresses starting with 169.254 are special, you can find more info here, but basically it’s standard supported by Windows that allocates a “special” IP when the network adapter should get one from a DHCP but the DHCP wasn’t found.

So it leads us to:

Hyper-V’s Virtual Networks are not magic, they won’t allocate IP for the Virtual Machines they host if you let the default settings on the VM’s network adapter. You have to either specify a static IP or setup a DHCP somewhere and reference it from your network adapter.

After some thinking I realized that it was supposed to be this way, it’s way more realistic for production purpose. But my experience being mostly about prototyping, I had first a different point of view.

One last thing: you don’t have DHCP, but there’s still an IP allocated so you get the “NETBIOS over TCP/IP” working fine, so can do “Windows stuffs” like RDP, File Sharing, Windows Network discovery. But when you have to fully rely on TCP/IP and use DNS (installing SCVMM for instance :D) it won’t work at all…

Poor me developer having to discover the cruel world of networking… 🙁