Skip to content

Instantly share code, notes, and snippets.

@dwbfox
Created July 21, 2017 03:38
Show Gist options
  • Save dwbfox/f3991dee0b1a0d164eb58a04c901bd6c to your computer and use it in GitHub Desktop.
Save dwbfox/f3991dee0b1a0d164eb58a04c901bd6c to your computer and use it in GitHub Desktop.
A small shell script to start all VM/domains in libvirt
#!/bin/bash
for vm in $(virsh list --all | sed 1,2d | cut -d' ' -f 7); do
virsh start $vm
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment