[libvirt-users] shutdown all domains

Eric Blake eblake at redhat.com
Sat Mar 15 02:28:31 UTC 2014


On 03/14/2014 08:14 PM, Peng Yu wrote:
> Hi,
> 
> The following shows a script to shutdown all domains. Is this still
> not available in libvirt-bin? If not, will it added in the future?

The libvirt-guests script is about all the more we ever plan on shipping
in the core libvirt packaging; it is already capable of shutting down
all domains.  Beyond that, it's more of a task for the client of
libvirt, and not something core to libvirt itself, which is why shipping
something else new in the 'libvirt-bin' package is probably overkill.
But as always, since this is open source, you're welcome to modify
libvirt-guests or use it as a starting point in writing your own
management projects on top of libvirt, or to contribute patches to
libvirt with justification of why something belongs in libvirt proper.

> 
> http://lists.centos.org/pipermail/centos-virt/2009-November/001358.html

Enhancements to virsh in the meantime can make the script more efficient
- for example, 'virsh list --uuid' is much more reliable than that
scripts attempts to parse vm names out of a longer 'virsh list' output.
 That script suffers from poor shell programming practices, and will
fall over if you have an VM names containing a space.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20140314/d136018a/attachment.sig>


More information about the libvirt-users mailing list