[libvirt-users] Fwd: undefining and redefining a Domain from libvirt java bindings

Osier jyang at redhat.com
Wed Oct 13 04:16:10 UTC 2010


----- "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
> https://www.redhat.com/mailman/listinfo/libvirt-users




More information about the libvirt-users mailing list