On Tue, Jun 19, 2018 at 11:43:38AM +0100, Daniel P. Berrangé wrote: > I'd encourage apps to check the capabilities XML to see what > machine types are available.
One issue is we don't always have access to the target hypervisor. For example in the Glance case we have to write something which will be picked up by Nova much later: > > + "hw_machine_type", > > + (match guestcaps.gcaps_machine with > > + | I440FX -> "pc" > > + | Q35 -> "q35" > > + | Virt -> "virt"); I read the Nova code and it seems very ad-hoc. As far as I can tell these strings are eventually passed down to libvirt. However libvirt capabilities doesn't advertise these machine types exactly, but something more like "pc-q35-2.6". Does libvirt map "q35" to something intelligent? In any case it's not passed to libvirt before Nova has also done various ad-hoc stuff based on substrings. For example Nova will only add PCIe root ports to a guest if the machine type has "q35" as a substring. I can see many ways this could all go horribly wrong. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org _______________________________________________ Libguestfs mailing list [email protected] https://www.redhat.com/mailman/listinfo/libguestfs
