On 26.09.2013 11:48, Panday Ritesh Sharma (rpanday) wrote:
Yes, I am sure because other information pulled are correct. And the
same way we have used libvirt APIs to extract other informations at different places.
My question is if VM is in shut-off state does it mean running ? IF not, what is the
correct state for this VM. I am wondering why the state is 'unsigned char' in
virDomainGetInfo, why it could not be 'enum' as it is returning enums only.
Domain in the shut-off state is shut off. It is not running.
The state is unsigned char due to ABI stability. If it were enum and we
add a new item into the enum we can hardly avoid breaking ABI. In
general, compiler may decide more space is needed to store the enum and
hence the ABI won't be compatible. That is, after you've upgraded the
libvirt, you'll get malicious errors even though your code is just correct.
Michal