Re: [PATCH v2 3/6] Add support for cpu mode attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 16, 2012 at 13:38:00 -0700, Eric Blake wrote:
> On 01/12/2012 04:02 AM, Jiri Denemark wrote:
> > The mode can be either of "custom" (default), "host-model",
> > "host-passthrough". The semantics of each mode is described in the
> > following examples:
> > 
> 
> > ---
> > Notes:
> >     Version 2:
> >     - added documentation
> >     - fixed XML examples and schema
> > 
> 
> Thanks, that's what I was waiting for in v1.
> 
> > +++ b/docs/formatdomain.html.in
> 
> > +          <dt><code>host-model</code></dt>
> > +          <dd>The <code>host-model</code> mode is essentially a shortcut to
> > +          copying host CPU definition from capabilities XML into domain XML.
> > +          Since the CPU definition is copied just before starting a domain,
> > +          exactly the same XML can be used on different hosts while still
> > +          providing the best guest CPU each host supports. Neither
> > +          <code>match</code> attribute nor any <code>feature</code> elements
> > +          can be used in this mode. Specifying CPU model is not supported
> > +          either, but <code>model</code>'s <code>fallback</code> attribute may
> > +          still be used. Libvirt does not model every aspect of each CPU so
> > +          the guest CPU will not match the host CPU exactly. On the other
> > +          hand, the ABI provided to the guest is reproducible. During
> > +          migration, complete CPU model definition is transferred to the
> > +          destination host so the migrated guest will see exactly the same CPU
> > +          model even if the destination host contains more capable CPUs.</dd>
> 
> Question - if I start on a less-powerful CPU, then live migrate to a
> more powerful CPU, then restart the guest, did the migration lock me in
> to the less-powerful capabilities, or does restarting the guest then
> pick up on the more-powerful capabilities?  I'm guessing the former
> (once you migrate, you want to be locked in), because otherwise, the act
> of migration followed by guest reboot would make Windows guests
> susceptible to reactivation.  In which case, I think rewording the last
> sentence might help:

It depends what do you mean by guest restart :-) Restarting guest OS within
the same qemu process certainly doesn't change anything. However, the CPU may
change if you shut the domain down and start it again. The updated CPU is not
persistently stored anywhere even if you ask libvirt to define the domain on
destination. The inactive XML on destination will be the same as the one
on source. The main benefit of host-* CPU modes is that they give you the
semantics of "anywhere you start me, I'll use the best of your CPUs", be it
after migration or manual copying of the XML. It is only assured not to change
while the guest is running even after it's migrated. Those who want stability
may use the custom mode we already support for ~2 years.

Do you suggest any changes so that it's more obvious from the docs?

Thanks for your comments.

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]