From 78e40151cead2f07a9a9952c5912c95ac2e6275c Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 8 Mar 2024 00:38:17 +0100 Subject: [PATCH] Only activate virt-manager network if necessary --- scripts/Common/Config/Virtual Machine Manager/install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/Common/Config/Virtual Machine Manager/install.sh b/scripts/Common/Config/Virtual Machine Manager/install.sh index ce5b7aca..152ab664 100755 --- a/scripts/Common/Config/Virtual Machine Manager/install.sh +++ b/scripts/Common/Config/Virtual Machine Manager/install.sh @@ -1,4 +1,8 @@ #!/bin/bash sudo usermod -aG libvirt "$USER"; sudo virsh net-autostart default; -sudo virsh net-start default; + +if ! sudo virsh net-info default | grep "^Active:\s*yes$" > /dev/null; +then + sudo virsh net-start default; +fi;