3 issues are present immediately when trying to install Archlinux in a Gen2 HyperV VM:
- Keyboard doesn't work. See http://www.gossamer-threads.com/lists/linux/kernel/1985855 for more details.
- 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.
- 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:
- http://dynamict.se/2014/04/08/archlinux-and-hyper-v-3-0-generation-2-uefi-vm-troubles/
- http://dynamict.se/2014/04/08/archlinux-and-hyper-v-3-0-generation-2-uefi-vm-troubles-part-2/
- http://www.mail-archive.com/kvm@vger.kernel.org/msg41958.html
- https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/930962
- https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1285434
- https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1292216
- https://bugs.archlinux.org/task/41135
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!
if you use quick create option in hyper-v, it will create Gen2 HyperV which works perfectly fine.
but if you use new->virutal machine and select Gen2 then the keyboard will not work.