Linux CLI Magick
root@hotaru:/var/lib/libvirt/images# virsh list --inactive
Id Name State
----------------------------------------------------
- dokuwiki shut off
- gitlab1.pg1x.com shut off
- mx1.pg1x.com shut off
- nextcloud1.pg1x.com shut off
- template shut off
root@hotaru:/var/lib/libvirt/images# virsh list --inactive | sed -e '2d'
Id Name State
- dokuwiki shut off
- gitlab1.pg1x.com shut off
- mx1.pg1x.com shut off
- nextcloud1.pg1x.com shut off
- template shut off
root@hotaru:/var/lib/libvirt/images# virsh list --inactive | sed -e '1,2d'
- dokuwiki shut off
- gitlab1.pg1x.com shut off
- mx1.pg1x.com shut off
- nextcloud1.pg1x.com shut off
- template shut off
root@hotaru:/var/lib/libvirt/images# virsh list --inactive | sed -e '1,2d' | fgrep -v template | awk '{ print "sudo virsh autostart --disable", $2 }' | sed -e '$d'
virsh autostart --disable dokuwiki
virsh autostart --disable gitlab1.pg1x.com
virsh autostart --disable mx1.pg1x.com
virsh autostart --disable nextcloud1.pg1x.com
root@hotaru:/var/lib/libvirt/images# virsh list --inactive | sed -e '1,2d' | fgrep -v template | awk '{ print "sudo virsh autostart", $2 }' | sed -e '$d'
sudo virsh autostart dokuwiki
sudo virsh autostart gitlab1.pg1x.com
sudo virsh autostart mx1.pg1x.com
sudo virsh autostart nextcloud1.pg1x.com
root@hotaru:/var/lib/libvirt/images# virsh list --inactive | sed -e '1,2d' | fgrep -v template | awk '{ print "sudo virsh autostart --disable", $2 }' | sed -e '$d' | bash
Domain dokuwiki unmarked as autostarted
Domain gitlab1.pg1x.com unmarked as autostarted
Domain mx1.pg1x.com unmarked as autostarted
Domain nextcloud1.pg1x.com unmarked as autostarted
root@hotaru:/var/lib/libvirt/images# sudo apt update && sudo apt upgrade --auto-remove
(snip)
root@hotaru:/var/lib/libvirt/images# virsh list --inactive | sed -e '1,2d' | fgrep -v template | awk '{ print "sudo virsh autostart", $2 }' | sed -e '$d' | bash
Domain dokuwiki marked as autostarted
Domain gitlab1.pg1x.com marked as autostarted
Domain mx1.pg1x.com marked as autostarted
Domain nextcloud1.pg1x.com marked as autostarted