aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@libreoffice.org>2016-10-19 13:26:30 +0200
committerGuilhem Moulin <guilhem@libreoffice.org>2016-10-19 13:26:35 +0200
commitf868d7308be4d1f01926120b273fcf4243dc076f (patch)
treea0f3042dea05b86258a401b580e1b285f23e90b9
parent8c462b2bc3b624b8dbcae88a03843b338f2b368e (diff)
Remove libvirt-generated UNIX sockets.
-rwxr-xr-xtdfvm-install5
1 files changed, 5 insertions, 0 deletions
diff --git a/tdfvm-install b/tdfvm-install
index 22226ca..49190c1 100755
--- a/tdfvm-install
+++ b/tdfvm-install
@@ -256,8 +256,13 @@ virt-install -q --connect "$LIBVIRT_URI" \
xmlstarlet edit --inplace --delete "$xpath" "$vmdef"
fi
done
+
+ # remove libvirt-generated UNIX socket
+ xpath="/domain/devices/graphics/listen[@type='socket'][starts-with(@socket,'/var/lib/libvirt/qemu/domain-')]/@socket"
+ xmlstarlet edit --inplace --delete "$xpath" "$vmdef"
[ ! ${OUTPUT+x} ] || cp --no-preserve=mode "$vmdef" "$OUTPUT/$VM_NAME.xml"
)
+
# wait until the VM terminates (there is actually a race condition here,
# but the XML massaging above should be faster than any install)
virsh -c "$LIBVIRT_URI" console "$VM_NAME" --safe >/dev/null