[Libguestfs] [PATCH] v2v: Set machine type explicitly for outputs which support it (RHBZ#1581428).

Daniel P. Berrangé berrange at redhat.com
Tue Jun 19 11:39:06 UTC 2018


On Tue, Jun 19, 2018 at 12:12:30PM +0100, Richard W.M. Jones wrote:
> 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?

It'll report both - one as an alias of the other

eg

      <machine maxCpus='255'>pc-i440fx-2.11</machine>
      <machine canonical='pc-i440fx-2.11' maxCpus='255'>pc</machine>
      <machine maxCpus='1'>isapc</machine>
      <machine maxCpus='255'>pc-i440fx-2.9</machine>
      <machine maxCpus='255'>pc-i440fx-2.6</machine>
      <machine maxCpus='255'>pc-i440fx-2.7</machine>
      <machine maxCpus='288'>pc-q35-2.11</machine>
      <machine canonical='pc-q35-2.11' maxCpus='288'>q35</machine>
      <machine maxCpus='288'>pc-q35-2.10</machine>


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 :|




More information about the Libguestfs mailing list