1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-23 17:33:56 +03:00

Revert "B #5333: detach disk is not being properly applied"

This reverts commit 79d5a4292c.
This commit is contained in:
Jaime Melis 2017-09-08 16:48:08 +02:00
parent 109f78066b
commit 93e3c2c9b2

View File

@ -46,9 +46,6 @@ 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}"
@ -56,4 +53,4 @@ rescue Exception => e
exit -1
ensure
vi_client.close_connection if vi_client
end
end