Ben wrote:
> On Mon, 19 Jul 2010, Jason Edgecombe wrote:
>
>> Here is the /etc/init.d/libvirtd script that I use to automatically
>> send kvm guests the ACPI poweroff signal, then wait 5 minutes for
>> them to shutdown, then pull the virtual plug. If they shutdown before
>> then, the script continues.
>
> Am I right in thinking this script wouldn't give the correct results
> for Xen guests (not that it would be needed anyway)?  Does "virsh
> list" always show KVM guests with "running" as their state when up and
> omits the KVM host?
>
> I ask because a) and haven't any experience of KVM and, b) virsh list
> for a Xen Dom0 gives the following:
>
> [r...@ayres ~]# virsh list
>  Id Name                 State
> ----------------------------------
>   0 Domain-0             running
>   1 byron                idle
>   2 carew                running
>   3 donne                running
>   4 jeltz                idle
>   5 nashe                idle
>   6 swift2               idle
>
> Your script would therefore not only only flag "carew" and "bates" for
> shutdown but also "Domain-0" as well.  This would therefore miss
> "byron", "jeltz", "nashe" and "swift2" and attempt to shut down the
> Dom0 (-:
>
> Ben
You're correct. For KVM, the host isn't listed and guests aren't "idle".
The script could probably be modified for Xen, but I don't use Xen.
You're welcome to modify it, though.

Sincerely,
Jason

_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to