Category: Hyper-V

Create a No Hyper-V boot option

There seem to be a number of scenarios where Hyper-V (and it’s many virtual networks and network adapters) can cause problems. My two are running VMware and problems with the Azure emulator with shared cache when debugging in Visual Studio.

To solve this problem you could uninstall the Hyper-V feature, but it’s still important for so many other tasks that this is a real pain.

It is possible to create a simple boot option for Windows 7 and 8 and Windows Server that disables the hypervisor. This is quick and painless, so when you ever need or don’t need Hyper-V, just reboot and select the option you want.

  1. Open a command prompt as Administrator (right-click the start button on the desktop and select ‘Command Prompt (Admin)’
  2. Type
     bcdedit /copy {current} /d "Microsoft Windows 8 - No Hypervisor"

    and press enter.
    This creates a new boot entry identical the the current one.

  3. Type
     bcdedit

    and press enter to list all the boot entries.

  4. Copy the identifier, including curly brackets, for the new boot entry (should be the last in the list)
  5. Now we need to disable the hypervisor on the new entry. Type
     bcdedit /set {the new identifier} hypervisorlaunchtype off

    and press enter.

  6. Now reboot and you will be presented with a nice boot menu option and can choose to boot with or without Hyper-V

Virtual PC on Windows 8–Use Hyper-V instead

Windows 8 does not support Virtual PC and probably never will. However, even better is that Windows 8 now includes Hyper-V as a ‘feature’.

You can install this easily by turning it on.

  1. Just search  Settings for the word ‘feature’ and you should find, ‘Turn Features on or off’.
  2. Then click Hyper-V to include all sub-features.
  3. You will then need to restart.
  4. After restart, you will see

    on your desktop. Or just type ‘Hyper’ and it will come up in the app search.
  5. Hyper-V works a bit differently from Virtual PC or Virtual Server, so find out about it online.
  6. However to save you a bit of grief I would suggest that one of the first things you do is setup the networking, otherwise any new machine you create will not be able to be allocated a network connection.
  7. To set up the network, first ensure you have selected your PC on the left and then click on ‘Virtual Switch Manager’
  8. You can create a variety of switches that have different access profiles. For your machines to be able to share your network connection and gain access to the internet, you need to create a new ‘external’ switch, by clicking on ‘Create Virtual Switch’, with ‘External’ selected in the list.
  9. Give the virtual switch a name. You need to select which network device in you host machine you would like the switch to use and how. So I like to put this in the network name. Also if you have more than one network device then you can allocate one to all the guest machines and the other to the host. In the example below, I have decided to use my wired connection and have that shared with the host.
  10. Now when you create new guest virtual machines, you will be able to select a network for them to join from the start.

Windows 2008 R2 Hyper-V – Guests VMs have slow performance – Change you adapter settings

If you are experiencing very slow or ‘jittery’ network performance when attempting to connect to them using remote desktop or file shares, then it may well be down to a couple of settings on your adaptors.

I had this experience on two types of network cards. A Marvell Yukon 88E8056 and a Realtek RTL8187. After much head bashing I found various bits of info about the network adaptor settings and made the following changes.

On the Host Hyper-V Server

On all network adaptor configuration I disabled the following

  • IPv4 Checksum Offload
  • Large Send Offload (IPv4)
  • TCP Checksum Offload (IPv4)

 

This seemed to do most of the work, but just to be sure I also tackled the guests.

On the Guest VMs

On all network adapter configuration I disabled the following

  • IPv4 Checksum Offload
  • Large Send Offload Version 2(IPv4)
  • TCP Checksum Offload (IPv4)

 

If these don’t work for you then I have also heard of success switching to the legacy network adaptor in the guest VM. Also ensure that your flow control is enabled on your host NICs.

Adaptor configuration

To get to the adaptor settings open the ‘Network and Sharing Center’, click on ‘Change adaptor settings’, then right-click on the adaptor and select properties. Now click the ‘Configure’ button.