[libvirt] 1. Domain Destroy , 2. Domain boot on a different host and 3. Domain start time

IKI-サガル バルウェ sagar.barve at ikic.co.jp
Thu Jun 17 07:50:41 UTC 2010


Hello,

Firstly, I have some confusion about the libvirt API  "virDomainDestroy" 
method. here is the link to API: 
http://libvirt.org/html/libvirt-libvirt.html#virDomainDestroy
Does this method completely removes the domain from the system? I have 
confusion because the "virsh destroy" tool option performs a forced shutdown 
and does not destroy/delete/remove the domain.
So,  what does "virDomainDestroy" method do exactly? Also, if it comletely 
removes the domain, then is there any other method to perform a force 
shutdown of the domain. I know the "virDomainShutdown" method performs a 
normal shutdown.

Secondly, Is it possible to boot a domain on a completely different physical 
host with the same Hypervisor configuration?
For. E.g: if I have a domain on a host 192.168.101.1 running Xen with a 
Domain "test" in shutdown state. If I have to start/boot the domain "test" 
on a different physical host, running Xen say 192.168.101.2, is it possible 
using libvirt API? If not, then is there any other method to do it?

Thirdly, Is there a method to get the total running time of a domain? I 
mean, the amount of time since the domain had been booted. Currently, I can 
fetch the CPU time. But, is this the exact amount of time the domain is ON? 
i.e. If the domain is in a "IDLE" state, the CPU time does not increase. But 
what I want is the amount of time the domain was ON(including the idle 
time). So, If I can get the start time of the domain, I can calculate the 
duration.

Sorry for the long mail and description.

Any help would be greatly appreciated.

Thanks and Regards
Sagar Barve 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100617/e8a6cc22/attachment-0001.htm>


More information about the libvir-list mailing list