RE: [libvirt] pausing / unpausing guests with libvirt

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

 



Looks like that did it.  I can pause and resume Linux and Windows guests
with this method.


Thanks a lot! 
-matthew

> -----Original Message-----
> From: Daniel P. Berrange [mailto:berrange@xxxxxxxxxx] 
> Sent: Monday, September 22, 2008 4:17 AM
> To: Matthew Donovan
> Cc: libvir-list@xxxxxxxxxx
> Subject: Re: [libvirt] pausing / unpausing guests with libvirt
> 
> On Sun, Sep 21, 2008 at 05:16:32PM -0400, Matthew Donovan wrote:
> > 
> > DEBUG: libvirt.c: virDomainCreate (domain=0x92bd1e0)
> > DEBUG: libvirt.c: virDomainSuspend (domain=0x92bd1e0)
> > virDomainSuspend() failed: 0
> 
> I think this is a  bug in the Xen driver - the  virDomainCreate 
> api is not updating the internal 'id' parameter of the virDomainPtr
> object, so when you then call virDomainSuspend() with the same
> virDomainPtr it doesn't have the id it needs
> 
> The easy workaround is to just get rid of your existing dom object
> and lookup a new one with 'virDomainLoopByUUID' after starting it.
> 
>      virDomainPtr dom;
>      char  uuid[VIR_UUID_BUFLEN];
> 
>      virDomainCreate(dom);
> 
>      virDomainGetUUID(dom, uuid);
>      virDomainFree(dom);
>      dom = virDomainLookupByUUID(conn, uuid);
> 
>      virDomainSuspend(dom);
> 
> Daniel
> -- 
> |: Red Hat, Engineering, London   -o-   
> http://people.redhat.com/berrange/ :|
> |: http://libvirt.org  -o-  http://virt-manager.org  -o-  
> http://ovirt.org :|
> |: http://autobuild.org       -o-         
> http://search.cpan.org/~danberr/ :|
> |: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF 
> F742 7D3B 9505 :|
> 

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