1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

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

(cherry picked from commit 91b69e46d58f611522763d40e015de3c341b0d0a)
This commit is contained in:
Jan Orel 2019-12-04 13:26:55 +01:00 committed by Ruben S. Montero
parent eaf878531c
commit cbd6e6b49a
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -103,12 +103,6 @@ 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