[libvirt] [PATCH] Don't replace persistent domain config with migrated config

Eric Blake eblake at redhat.com
Thu Mar 25 20:33:50 UTC 2010

On 03/24/2010 08:52 AM, Jiri Denemark wrote:
> When a domain is defined on host1, migrated to host2 and then migrated
> back to host1, its current configuration would overwrite the libvirtd's
> in-memory copy of persistent configuration of that domain. This is not
> desired as we want to preserve the persistent configuration untouched.
> This patch introduces new 'live' parameter to virDomainAssignDef.
> Passing 'true' for 'live' means the configuration passed to
> virDomainAssignDef describes a configuration of live instance of the
> domain. This applies for saved domains which are being restored or for
> incoming domains during migration.


>  virDomainObjPtr virDomainAssignDef(virCapsPtr caps,

>          } else {
> -            if (domain->newDef)
> -                virDomainDefFree(domain->newDef);
> +            virDomainDefFree(domain->newDef);

And nice removal of useless-if-before-free.

Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 323 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100325/cb91dd82/attachment-0001.sig>

More information about the libvir-list mailing list