Improved detection of running VMs.

This commit is contained in:
Rohan Barar 2024-07-01 16:38:31 +10:00
parent 47596d6dde
commit 782c364f4d

View File

@ -65,8 +65,8 @@ if [ -z "$RDP_IP" ]; then
echo " sudo usermod -a -G kvm $(whoami)"
exit
fi
if virsh list | grep -vq RDPWindows; then
echo "RDPWindows is not running, run:"
if ! virsh list --state-running --name | grep -q '^RDPWindows$'; then
echo "RDPWindows is not running. Please run:"
echo " virsh start RDPWindows"
exit
fi