mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-08 21:17:43 +03:00
(cherry picked from commit a963d3ac26
)
This commit is contained in:
parent
714b4de2db
commit
46b571387b
@ -49,7 +49,7 @@ if [ "x$?" = "x0" ]; then
|
||||
echo $UUID
|
||||
|
||||
# redefine potential snapshots
|
||||
for SNAPSHOT_MD_XML in $(ls ${DEP_FILE_LOCATION}/snap-*.xml 2>/dev/null); do
|
||||
for SNAPSHOT_MD_XML in $(ls -v ${DEP_FILE_LOCATION}/snap-*.xml 2>/dev/null); do
|
||||
|
||||
|
||||
# replace uuid in the snapshot metadata xml
|
||||
|
@ -258,7 +258,7 @@ if [ "$SHARED" = "YES" ] && [ -n "$SNAP_CUR" ]; then
|
||||
DISK_PATH=$(virsh --connect $QEMU_PROTOCOL://$DEST_HOST/system domblklist $DEPLOY_ID | awk '/disk.0/ {print $2}')
|
||||
DISK_DIR=$(dirname $DISK_PATH)
|
||||
|
||||
for SNAPSHOT_MD_XML in $(ls ${DISK_DIR}/snap-*.xml 2>/dev/null); do
|
||||
for SNAPSHOT_MD_XML in $(ls -v ${DISK_DIR}/snap-*.xml 2>/dev/null); do
|
||||
# replace uuid in the snapshot metadata xml
|
||||
sed -i "s%<uuid>[[:alnum:]-]*</uuid>%<uuid>$UUID</uuid>%" $SNAPSHOT_MD_XML
|
||||
|
||||
|
@ -116,7 +116,7 @@ rm "$FILE"
|
||||
rm "$FILE_XML"
|
||||
|
||||
# redefine potential snapshots
|
||||
for SNAPSHOT_MD_XML in $(ls ${VM_DIR}/snap-*.xml 2>/dev/null); do
|
||||
for SNAPSHOT_MD_XML in $(ls -v ${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}')}
|
||||
|
Loading…
Reference in New Issue
Block a user