mirror of
https://github.com/OpenNebula/one.git
synced 2026-12-02 05:06:14 +09:00
B #5442: get DOMAIN_ID from the deployment file
and optimize domain UUID extraction with awk
(cherry picked from commit cad915746e)
This commit is contained in:
1 parent
122ab81d27
commit
1a041abb6f
1 file changed
+2
-2
@@ -34,8 +34,8 @@ DATA=`virsh --connect $LIBVIRT_URI create $DEP_FILE`
|
||||
|
||||
if [ "x$?" = "x0" ]; then
|
||||
|
||||
DOMAIN_ID=$(echo $DATA | sed 's/Domain //' | sed 's/ created from .*$//' | tr -d "'")
|
||||
UUID=$(virsh --connect $LIBVIRT_URI dominfo $DOMAIN_ID | grep UUID: | awk '{print $2}')
|
||||
DOMAIN_ID=$(xmllint --xpath '/domain/name/text()' "$DEP_FILE")
|
||||
UUID=$(virsh --connect $LIBVIRT_URI dominfo $DOMAIN_ID | awk '/UUID:/ {print $2}')
|
||||
echo $UUID
|
||||
|
||||
# redefine potential snapshots
|
||||
|
||||
Reference in new issue
Block a user