diff options
-rwxr-xr-x | tdfvm-install | 5 |
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 |