Support for hyperv pv drivers
-
Hello,
I need to run XCP-Ng nested on top of hyperv.
Looking around I noticed XCP-Ng ships KVM and VMWare pv drivers, which is great, but lacks what I need in this instance.What would be the quickest way to get up and running on hyperv?
Also, any chance to include these out of the box in the future?
Hyperv does offer legacy IDE and NIC drivers, it's possible to get started with that, but performance will be terrible.
-
Only Hyper-V gen1 can work (documented in https://docs.xcp-ng.org/guides/xcpng-in-a-vm/#nested-xcp-ng-using-microsoft-hyper-v-windows-10---windows-server-2016, not recommended for production).
Hyper-V gen2 interface doesn't use a PCI-like interface (like virtio (kvm) and vmware does) therefore, Hyper-V paravirtualized devices are probably not usable within Xen Dom0 (which only supports PCI devices, like what we have on real hardware), so probably not usable by XCP-ng.
-
@Teddy-Astie gen1 works for me.
Any pointer towards rebuilding the dom0 kernel to support various hyperv pv devices?
-
@Nux It's something you can try, but due to the way Hyper-V gen2 works, even if we add drivers in dom0 kernel, I highly doubt they will work.
Regarding gen1 drivers, you don't need specific ones as Hyper-V emulates traditionnal hardware that drivers currently exist in dom0 kernel.
-
The traditional hw that hyperv emulates leaves me with fast ethernet ancient nics.. not really usable.
Do you have a recommended method for rebuilding the dom0 kernel?
-
@Nux rebuilding the dom0 kernel is quite tricky, and I am not sure it is going to help your usecase, if you really want, you may want to look on xcp-ng-rpms and the related linux rpm
Regarding nested Hyper-V in Xen, gen2 support was considered in the past, but it never got fully implemented, see https://lore.kernel.org/xen-devel/20191130115737.15752-1-liuwe@microsoft.com/
and https://lore.kernel.org/xen-devel/20190923100931.29670-1-liuwe@microsoft.com/ for related discussion on the Xen mailing list.
So as it is now, Xen in Hyper-V gen2 vm is not supported.
Only gen1 is supported on a best-effort basis.Gen1 use realistic-behaving emulated devices, thus there is no Hyper-V specific driver that may improve performance.