On Wed, Jan 31, 2024 at 09:55:29AM +0000, Daniel P. Berrang?? wrote:
On Tue, Jan 30, 2024 at 02:44:40PM -0600, Praveen K Paladugu wrote:
> This hypervisor type is available on a host running Microsoft Hypervisor
> and Linux as the Dom0. The Dom0 should load "mshv" drivers to expose the
> hypervisor device to userspace.
>
> Cloud-Hypervisor supports running guests on Linux Hosts with mshv as the
> hypervisor.
This is my first time hearing about the Microsoft Hypervisor with Linux
Dom0, and the docs I find via Google aren't entirely conclusive.
Unfortunately, Microsoft does not have any official documentation on this
configuration, because Linux Dom0 on Microsoft Hypervisor is not yet ready
for broader adoption. We still need to sort out Licensing and other
questions related to this configuration before it can be made public.
That said, we have been working with cloud-hypervisor for a while now to
enable mshv as the supported hypervisor in addition to kvm.
Am I right in thinking that "Microsoft Hypervisor" in this context is
simply Hyper-V, aka, the same hypervisor you traditionally have under
a Windows Dom0 ?
If so then I could think that we probably don't need to have a new
virDomainVirt type enum entry. We could simply use the pre-existing
VIR_DOMAIN_VIRT_HYPERV to represent this configuration in the
cloud-hypervisor configuration.
I considered reusing VIR_DOMAIN_VIRT_HYPERV entry. From what I
understand, this hypervisor option implies Libvirt talks to HyperV using
WMI. Although the binary bits of the hypervisors may be the same in both
configurations, the interfaces to interact with the hypervisors are
completely different.
With the introduced "mshv" hypervisor option, Libvirt doesn't interact
with "/dev/mshv" at all. Libvirt just invokes cloud-hypervisor which in
turn talks to mshv via kernel ioctls as necessary.
As how libvirt starts guests in these 2 configurations is totally
different, I thought it would be better to add a hypervisor type to
track this configuration.
Regards,
Praveen
> > Signed-off-by: Praveen K Paladugu <prapal(a)linux.microsoft.com>
> > ---
> > src/conf/domain_conf.c | 1 +
> > src/conf/domain_conf.h | 1 +
> > src/qemu/qemu_command.c | 1 +
> > 3 files changed, 3 insertions(+)
> >
> > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> > index fb5a5cc351..d0b33e97e6 100644
> > --- a/src/conf/domain_conf.c
> > +++ b/src/conf/domain_conf.c
> > @@ -122,6 +122,7 @@ VIR_ENUM_IMPL(virDomainVirt,
> > "test",
> > "vmware",
> > "hyperv",
> > + "mshv",
> > "vbox",
> > "phyp",
> > "parallels",
> > diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
> > index bd283d42df..128b058161 100644
> > --- a/src/conf/domain_conf.h
> > +++ b/src/conf/domain_conf.h
> > @@ -136,6 +136,7 @@ typedef enum {
> > VIR_DOMAIN_VIRT_TEST,
> > VIR_DOMAIN_VIRT_VMWARE,
> > VIR_DOMAIN_VIRT_HYPERV,
> > + VIR_DOMAIN_VIRT_MSHV,
> > VIR_DOMAIN_VIRT_VBOX,
> > VIR_DOMAIN_VIRT_PHYP,
> > VIR_DOMAIN_VIRT_PARALLELS,
> > diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> > index 31d42495f4..af38ade0c0 100644
> > --- a/src/qemu/qemu_command.c
> > +++ b/src/qemu/qemu_command.c
> > @@ -7184,6 +7184,7 @@ qemuBuildAccelCommandLine(virCommand *cmd,
> > case VIR_DOMAIN_VIRT_TEST:
> > case VIR_DOMAIN_VIRT_VMWARE:
> > case VIR_DOMAIN_VIRT_HYPERV:
> > + case VIR_DOMAIN_VIRT_MSHV:
> > case VIR_DOMAIN_VIRT_VBOX:
> > case VIR_DOMAIN_VIRT_PHYP:
> > case VIR_DOMAIN_VIRT_PARALLELS:
> > --
> > 2.43.0
> > _______________________________________________
> > Devel mailing list -- devel(a)lists.libvirt.org
> > To unsubscribe send an email to devel-leave(a)lists.libvirt.org
>
> With regards,
> Daniel
> --
> |:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
> |:
https://libvirt.org -o-
https://fstop138.berrange.com :|
> |:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|
> _______________________________________________
> Devel mailing list -- devel(a)lists.libvirt.org
> To unsubscribe send an email to devel-leave(a)lists.libvirt.org