[libvirt] [BUG?] "no domain with matching uuid" error, when vm restarts

su disheng disheng.su at gmail.com
Wed Jan 13 00:06:32 UTC 2010


Hi,
    In the following libvirt API calling sequence, I always get an error "no
domain with matching uuid"
        Connect _conn = new Connect("qemu:///system", false);
         _conn.domainDefineXML(kvm_guest_xml);
         Domain dm = _conn.domainLookupByName(kvm_guest_name);
         dm.create();

         /* stop, undefine, and re-start the vm*/
         dm.shutdown();
         dm.undefine();
         dm.domainDefineXML(kvm_guest_xml);
         /****A****/
         Domain dm = _conn.domainLookupByName(kvm_guest_name);
         dm.create()  /********Error!!!!**/

       if I close the connection, and re-connect qemu at the end of
/****A****/, then everything is OK.
       From the log, seems that uuid is not updated immediately, for this
connection, the uuid is in the stale state?
       I am using libvirt 0.6.3, if it's a bug, does it fixed in the latest
code? or Have I need to close the connection for each vm shutdown/re-define?
       I am a newbie in this API, any help are appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100112/03c99279/attachment-0001.htm>


More information about the libvir-list mailing list