Revert "B OpenNebula/one#4017 UUID not changed by susp. (#4019)"

This reverts commit cbd6e6b49a.
This commit is contained in:
Ruben S. Montero committed 2019-12-04 15:16:30 +01:00
1 parent cbd6e6b49a
commit 95ff3fc88e
1 file changed
+6
+6
View File
@@ -103,6 +103,12 @@ rm "$FILE_XML"
# redefine potential snapshots
for SNAPSHOT_MD_XML in $(ls ${VM_DIR}/snap-*.xml 2>/dev/null); do
# query UUID, but only once
UUID=${UUID:-$(virsh --connect $LIBVIRT_URI dominfo $DEPLOY_ID | grep UUID: | awk '{print $2}')}
# replace uuid in the snapshot metadata xml
sed -i "s%<uuid>[[:alnum:]-]*</uuid>%<uuid>$UUID</uuid>%" $SNAPSHOT_MD_XML
# redefine the snapshot using the xml metadata file
virsh --connect $LIBVIRT_URI snapshot-create $DEPLOY_ID $SNAPSHOT_MD_XML --redefine > /dev/null || true
done