mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-27 14:03:40 +03:00
Signed-off-by: Anton Todorov <a.todorov@storpool.com> (cherry picked from commit 4b17b1f6e81fb598733ef3038f53985698798749)
This commit is contained in:
parent
e5e13b29c3
commit
67defe8da6
@ -29,9 +29,10 @@ DETACH_PARAMS="--domain $DOMAIN --target $TARGET"
|
||||
exec_and_log "virsh --connect $LIBVIRT_URI detach-disk $DETACH_PARAMS" \
|
||||
"Could not detach $TARGET from $DOMAIN"
|
||||
|
||||
virsh --connect $LIBVIRT_URI dumpxml $DOMAIN | grep $TARGET > /dev/null 2>&1
|
||||
virsh --connect $LIBVIRT_URI dumpxml $DOMAIN | \
|
||||
xmllint -xpath "//disk/target[@dev='$TARGET']" - >/dev/null 2>&1
|
||||
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ $? -ne 0 ] ; then
|
||||
error_message "Could not detach $TARGET from $DOMAIN"
|
||||
exit -1
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user