Windows 8 and Hyper-V VM in full screen

​The year is 2013. January 1st. The first blog post of the year…already. I thought I should kick off by clarifying a matter I have been discussing with two colleagues of mine (@StaleHansen and @aldawson2011), where I also have to admit that they were partly right…as my scenario was like in the below post.

This Christmas Holiday project for me was installing Windows 8 on my laptop, really starting to use it at work.
Previously I had installed it on both a virtual machine as well as on a demo workstation at work, but to really tap into
the bits and pieces of the new OS I had no choice but taking the full leap.

Working as a consultant I often remote into customers’ servers through VPN. As VPN connections often break Outlook and Lync server connectivity I find it to be “best practice” to VPN/remote in from a secondary, virtual machine residing on my laptop. There are several virtualization platforms for clients, but as of Windows 8 Hyper-V is natively running in the OS itself, and that is what I wanted to utilize.

For me the challenge was that I needed both internet access from and Remote Desktop Connection (RDC) into my virtual machine – two preferences that seems to be incompatible (somebody please correct me if I’m wrong).

First, some explanation is in place: Why would I need RDC for my virtual machine when there is e.g. Virtual Machine Connection (VMC) for this? Well, it seems that VMC does not support anything other than the more standard monitor resolutions, like 1024×768, 1280×800 and 1600×1200 set up on the VM itself. And it will only present this 1:1, it does not scale. So when using a laptop with 1440×900, you either get scroll bars or the screen will not completely fill up. I don’t know about you, but I prefer a full screen.

Back to my first requirement, internet access. Hyper-V provides three virtual network types:
Virtual switch overview

The external switch/network will provide internet access, but since Hyper-V does not provide NAT functionality like VMware Desktop for example, this option will merely bridge your physical NIC of choice with the virtual switch network. For a Remote Desktop scenario, this poses a challenge where your IP address would change according to what external network you are connected to. In such a case, you would have to lookup its IP in Hyper-V Manager before remoting into it – not very practical.
The internal switch/network will allow traffic between your virtual machines and your host. This would allow for your VM to have a well-known internal/private IP address for your remote connections, but with no public access. The latter would unfortunately not do it for me.
The private switch/network will only allow traffic between the virtual machines themselves, and no external network or host whatsoever.

In pursuit of my need of both external network access as well as a full screen (remote desktop) connection, I came across the following blog post (https://community.emc.com/docs/DOC-15875) that pointed me in the right direction!

The answer is actually quite simple:

  1. Setup your internal/virtual network so that traffic between virtual machines and the host is allowed
  2. Setup your preferred NIC used for internet connectivity to allow Sharing, for which traffic from the newly defined internal/virtual switch will be allowed
    External network setup
  3. Optionally; change the IP address of the virtual NIC that is part of the virtual switch and assigned to the host. This will by default be 192.168.137.1, and will also serve as a DHCP pool for machines attached to the virtual switch. If you wish to enter another address/range, for example if you have conflicting LAN address in your home or office.
    Internal network setup.png
  4. In Hyper-V Manager, go to your virtual machine and alter the network adapter settings so that it will be connected to the network defined in step 1
    Hyper-V manager VM NIC setup.png
  5. Connect to your VM and verify that the IP address is now within the range specified in step 3, and with the specific IP of the host NIC being the default gateway. This will be a dynamic IP and you would probably want to, for simplicity when accessing the VM, provide a static one in the same subnet.
    VM NIC overview.png

Notice that you get your very own domain suffix on the subnet, “mshome.net”. Using the provided IP address or <your_virtual_machine’s_name>.mshome.net you can now easily remote into it using RDC with FULL SCREEN RES!

Cheers, and a Happy New Year!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s