Merge pull request #707 from KernelGhost/main

Fix: #697 and #638
This commit is contained in:
Oskar Manhart
2025-09-04 11:52:28 +02:00
committed by GitHub

View File

@@ -838,16 +838,13 @@ function waCheckVMRunning() {
# Print feedback.
echo -n "Checking the status of the Windows VM... "
# Declare variables.
local VM_STATE="" # Stores the state of the Windows VM.
# Obtain VM Status
VM_PAUSED=0
virsh list --state-paused | grep -wq "$VM_NAME" || VM_PAUSED="$?"
virsh list --state-paused --name | grep -Fxq "$VM_NAME" || VM_PAUSED="$?"
VM_RUNNING=0
virsh list --state-running | grep -wq "$VM_NAME" || VM_RUNNING="$?"
virsh list --state-running --name | grep -Fxq "$VM_NAME" || VM_RUNNING="$?"
VM_SHUTOFF=0
virsh list --state-shutoff | grep -wq "$VM_NAME" || VM_SHUTOFF="$?"
virsh list --state-shutoff --name | grep -Fxq "$VM_NAME" || VM_SHUTOFF="$?"
if [[ $VM_SHUTOFF == "0" ]]; then
# Complete the previous line.