Monday, May 24, 2010

Enable host to image network in Hyper-V

Hyper-V, while better than the alternatives, has some short comings when it comes to the client; copying files is hard and screen support is not ideal.
That is why I prefer using the host to access the image through the network stack with Remote Desktop or just the browser.
Here are the steps to set up the communication:

  1. Add a virtual adapter
    In Hyper-V this is accomplished on the host in "Virtual Network Manager" by adding an "Internal" network I usually name ""

  2. Set up adapter inside the image
    Ensuring the image is shut down (and not in save state mode) I add "Network Adapter" and select the net created in step 1.
    After restarting the image I open "Network Connections" and set the IP to, mask and optionally default gateway to
    Last I turn off firewall completely for this card (steps depends).

  3. Set up adapter on host
    On "Network Connections" I set up the adapter manually with IP, mask Advanced: if I have AD inside the image and the host is part of the domain I set DNS server to
    If I don't use DNS in an image (or the host) I change the "hosts" file (or lmhosts) with notepad c:\Windows\System32\drivers\etc\hosts and add lines for the names we want the inside of the image to be known, for instance:




    • contosoApp

  4. Test
    In host start cmd and "ping"
    In image start cmd and "ping"
    From host start mstsc and open "contosoApp"
    From host start iexplore and navigate ""

  5. Result
    I now browse the image from the host and use remote desktop. This way screen works better and browser app (and Visual studio etc) works much much better.