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

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

 



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