mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 05:04:56 +09:00
Signed-off-by: Anton Todorov <a.todorov@storpool.com>
(cherry picked from commit 4b17b1f6e8)
This commit is contained in:
1 parent
e5e13b29c3
commit
67defe8da6
1 file changed
+3
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user