mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
B #5333: detach disk is not being properly applied
This commit is contained in:
parent
ef0561c90b
commit
79d5a4292c
@ -46,6 +46,9 @@ begin
|
||||
raise "vCenter doesn't allow to remove a virtual disk if it's part of a "\
|
||||
"snapshot of the virtual machine." if vm.has_snapshots?
|
||||
|
||||
disk = drv_action.retrieve_xmlelements("VM/TEMPLATE/DISK[ATTACH='YES']").first
|
||||
vm.detach_disk(disk)
|
||||
|
||||
rescue Exception => e
|
||||
message = "Detach DISK for VM #{vm_ref} on vCenter cluster #{vc_cluster_name} "\
|
||||
"failed due to \"#{e.message}\"\n#{e.backtrace}"
|
||||
@ -53,4 +56,4 @@ rescue Exception => e
|
||||
exit -1
|
||||
ensure
|
||||
vi_client.close_connection if vi_client
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user