From f868d7308be4d1f01926120b273fcf4243dc076f Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Wed, 19 Oct 2016 13:26:30 +0200 Subject: Remove libvirt-generated UNIX sockets. --- tdfvm-install | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.3