Skip to content

Instantly share code, notes, and snippets.

@nogweii
Last active July 14, 2017 17:08
Show Gist options
  • Select an option

  • Save nogweii/c18a166197f1f1a03c74 to your computer and use it in GitHub Desktop.

Select an option

Save nogweii/c18a166197f1f1a03c74 to your computer and use it in GitHub Desktop.
rough draft for why arch linux doesn't work with Gen2 HyperV machines

3 issues are present immediately when trying to install Archlinux in a Gen2 HyperV VM:

  1. Keyboard doesn't work. See http://www.gossamer-threads.com/lists/linux/kernel/1985855 for more details.
  2. The network doesn't work. See http://www.hurryupandwait.io/blog/running-an-ubuntu-guest-on-hyper-v-assigned-an-ip-via-dhcp-over-a-wifi-connection for more details.
  3. When you do try to do network operations, there are checksum errors. See http://forge.univention.org/bugzilla/show_bug.cgi?id=33160 for more details.

To solve the keyboard, you need to enable the SERIO_I8042 kernel module. Which won't autoload (when it's set to =M in Kconfig) as HyperV gen2 images don't virtualize any PS/2 devices. And due to a missing dependency, hyperv_keyboard.ko can't load without it. (https://bugs.archlinux.org/task/39820 for some more details.)

The network doesn't work at all, as the traffic isn't getting outside of the VM. This is the case with other Linux VMs, and isn't necessarily Arch's fault. Sharing the network connection fixes this.

The only fix I have found for #3 is to simply disable checksum offloading. Wireshark has a good tutorial.

Other references:

That all being said though, from HyperV's Generation 2 FAQ:

Is there a performance gain to generation 2 virtual machines?

In the daily running of a virtual machine, there is no performance difference between generation 1 and generation 2 virtual machines. You might see a slight improvement in virtual machine boot and installation times with generation 2 virtual machines.

So just make a generation 1 VM and be done with it! They work fine!

@vikas5914

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment