[libvirt] first argument in virDomainMigrate, is it free'ed?

Richard W.M. Jones rjones at redhat.com
Wed Oct 8 16:08:59 UTC 2008


On Mon, Oct 06, 2008 at 06:15:08PM +0200, Stefan de Konink wrote:
> I saw that freeing the dom after a migration takes place results in:
> 
> libvir: Domain error : invalid domain pointer in virDomainFree

That would be a bug ...

> Now I wonder, if this is the case, could a normale migrate function
> 'just' be:
> 
> domain = virDomainMigrate(domain, ....)
> 
> Or is this unsafe; for example as a domain migration fails?

virDomainMigrate shouldn't free the source domain ever.  It should be
up to the caller to free it later once they've ascertained that the
migration was successful.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v




More information about the libvir-list mailing list