Re: Fwd: undefining and redefining a Domain from libvirt java bindings

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

 



----- "Ravi Pawar" <ravifc@xxxxxxxxx> 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@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvirt-users


[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux