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
--
Unix Support, MISD, University of Cambridge, England
Plugger of wire, typer of keyboard, imparter of Clue
        Life Is Short.          It's All Good.

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

Reply via email to