mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-26 09:57:23 +03:00
B OpenNebula/one#4017 UUID not changed by susp. (#4019)
This commit is contained in:
parent
2af130c00a
commit
91b69e46d5
@ -103,12 +103,6 @@ rm "$FILE_XML"
|
|||||||
# redefine potential snapshots
|
# redefine potential snapshots
|
||||||
for SNAPSHOT_MD_XML in $(ls ${VM_DIR}/snap-*.xml 2>/dev/null); do
|
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
|
# redefine the snapshot using the xml metadata file
|
||||||
virsh --connect $LIBVIRT_URI snapshot-create $DEPLOY_ID $SNAPSHOT_MD_XML --redefine > /dev/null || true
|
virsh --connect $LIBVIRT_URI snapshot-create $DEPLOY_ID $SNAPSHOT_MD_XML --redefine > /dev/null || true
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user