mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-25 06:03:36 +03:00
B #5442: get DOMAIN_ID from the deployment file
and optimize domain UUID extraction with awk
This commit is contained in:
parent
e201188e06
commit
cad915746e
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user