Ravi Pawar
2010-Oct-12 13:53 UTC
[libvirt-users] Fwd: undefining and redefining a Domain from libvirt java bindings
hi, i am trying to undefine a domain by using dm.undefine(); and then trying to create one with same name is giving me error saying 'Domain not found: no domain with matching uuid 'aeae9d4e-17cb-b661-a612-88ac677c28c1' i have attached my test program which reproduces the issue. please let me know where i am going wrong? configuration: libvirt : 0.6.3 Java Bindings: 0.4.2 -- Thanks & Regards Ravi Pawar -------------- next part -------------- An HTML attachment was scrubbed... URL: <listman.redhat.com/archives/libvirt-users/attachments/20101012/c56b5693/attachment.htm> -------------- next part -------------- A non-text attachment was scrubbed... Name: Test.java Type: application/octet-stream Size: 2042 bytes Desc: not available URL: <listman.redhat.com/archives/libvirt-users/attachments/20101012/c56b5693/attachment.obj>
Matthias Bolte
2010-Oct-12 14:31 UTC
[libvirt-users] Fwd: undefining and redefining a Domain from libvirt java bindings
2010/10/12 Ravi Pawar <ravifc at gmail.com>:> hi, > > i am trying to undefine a domain? by using dm.undefine(); > and then trying to create one with same name is giving me error saying > 'Domain not found: no domain with matching uuid > 'aeae9d4e-17cb-b661-a612-88ac677c28c1' > > i have attached my test program which reproduces the issue. > > please let me know where i am going wrong? > > configuration: libvirt : 0.6.3 > ??????????????????? Java Bindings: 0.4.2I didn't look into this problem in detail, but I think you need to call free on the Domain object after you undefined it. dm.undefine(); dm.free(); dm = null; Matthias
Osier
2010-Oct-13 04:16 UTC
[libvirt-users] Fwd: undefining and redefining a Domain from libvirt java bindings
----- "Ravi Pawar" <ravifc at gmail.com> wrote:> hi, > > i am trying to undefine a domain by using dm.undefine(); > and then trying to create one with same name is giving me error saying > 'Domain not found: no domain with matching uuid > 'aeae9d4e-17cb-b661-a612-88ac677c28c1'The error is not throwed by "dm.undefine". looked at and tried your test program, it throws error message like: libvir: QEMU error : Domain not found: no domain with matching name 'tt2' Definitely, it's throwed by: dm =conn.domainLookupByName("tt2"); I guess you looked up the domain by "UUID" before.. so it came the error message saying "no domain with matching uuid .....". The error doesn't influnce the program running forward. e.g. Domain dm1 = conn.domainDefineXML(dumpxml); dm1.create(); int id; id = dm1.getID(); System.out.println(id); dm1.undefine(); You will get the domain ID.. I'm not familiar with Java, guess you can catch the error and turn it into a warning message with "Expection Handler". correct me if I'm not right.. :-) - Osier> > i have attached my test program which reproduces the issue. > > please let me know where i am going wrong? > > configuration: libvirt : 0.6.3 > Java Bindings: 0.4.2 > > -- > Thanks & Regards > > Ravi Pawar > > _______________________________________________ > libvirt-users mailing list > libvirt-users at redhat.com > redhat.com/mailman/listinfo/libvirt-users
Reasonably Related Threads
- is libvirt java binding thread safe?
- check_account: Failed to find local account with UID" issue / The university of Chicago
- check_account: Failed to find local account with UID" issue / The university of Chicago
- Account is not authorized to log in from this station
- 2 matrix scatter x [a lot]