[libvirt] [PATCHv2 1/2] Use UPDATE_CPU when saving domain status

Pavel Hrdina phrdina at redhat.com
Mon Nov 10 15:10:20 UTC 2014


On 11/07/2014 10:55 AM, Ján Tomko wrote:
> We only format cpu model for MODE_CUSTOM in domain status XML,
> but we always format features if they are present.
>
> This is a problem if we have a domain using MODE_HOST_PASSTHROUGH
> that has been managedsaved, then restored, since it now has
> a feature list but no model in /var/run/libvirt/qemu.
>

Isn't the real issue that on "virsh start" after managedsave there are
features defined for the cpu? According to documentation we don't allow
features if domain is using MODE_HOST_PASSTHROUGH, but we allow to start
it from managedsave state with those features which I think is a core
issue.

> Use UPDATE_CPU even for the status XML to prevent libvirt
> from losing track of the domain.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1030793
> https://bugzilla.redhat.com/show_bug.cgi?id=1151885
> ---
>   src/conf/domain_conf.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 21309b0..acfb04b 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -19625,6 +19625,7 @@ virDomainSaveStatus(virDomainXMLOptionPtr xmlopt,
>                       virDomainObjPtr obj)
>   {
>       unsigned int flags = (VIR_DOMAIN_XML_SECURE |
> +                          VIR_DOMAIN_XML_UPDATE_CPU |
>                             VIR_DOMAIN_XML_INTERNAL_STATUS |
>                             VIR_DOMAIN_XML_INTERNAL_ACTUAL_NET |
>                             VIR_DOMAIN_XML_INTERNAL_PCI_ORIG_STATES |
>




More information about the libvir-list mailing list