runtime: add support for Hyper-V

This adds /dev/mshv to the list of sandbox devices so that VMMs can
create Hyper-V VMs.

In our testing, this also doesn't error out in case /dev/mshv isn't
present.

Fixes #6454.

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
This commit is contained in:
Henry Beberman 2022-06-10 23:21:18 +00:00 committed by Aurélien Bombo
parent ab0bd7a1ee
commit 974a5c22f0

View File

@ -67,7 +67,8 @@ func sandboxDevices() []specs.LinuxDeviceCgroup {
// In order to run Virtual Machines and create virtqueues, hypervisors
// need access to certain character devices in the host, like kvm and vhost-net.
hypervisorDevices := []string{
"/dev/kvm", // To run virtual machines
"/dev/kvm", // To run virtual machines with KVM
"/dev/mshv", // To run virtual machines with Hyper-V
"/dev/vhost-net", // To create virtqueues
"/dev/vfio/vfio", // To access VFIO devices
"/dev/vhost-vsock", // To interact with vsock if