#!/bin/sh # Starts libvirtd, default network, and optionally any domains given as arguments pgrep libvirtd >/dev/null || sudo systemctl start libvirtd virsh net-start default for domain in "$@" do virsh start $domain done