mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
parent
186d1f2e2e
commit
aa9ed53e5c
@ -2023,7 +2023,7 @@ class VirtualMachine < VCenterDriver::Template
|
||||
detachable= !(one_vm["LCM_STATE"].to_i == 11 && !disk.managed?)
|
||||
detachable = detachable && disk.exists?
|
||||
|
||||
raise "Can not detach disk. Not supported on current configuration" unless detachable
|
||||
return unless detachable
|
||||
|
||||
detach_disk(disk)
|
||||
disk.destroy()
|
||||
|
@ -42,10 +42,6 @@ begin
|
||||
|
||||
vm = VCenterDriver::VirtualMachine.new_without_id(vi_client, vm_ref)
|
||||
|
||||
if vm.has_snapshots?
|
||||
raise 'vCenter doesn\'t allow to remove a virtual disk if it\'s part ' \
|
||||
'of a snapshot of the virtual machine.'
|
||||
end
|
||||
rescue StandardError => e
|
||||
message = "Detach DISK for VM #{vm_ref} on vCenter cluster " \
|
||||
"#{vc_cluster_name} failed due to \"#{e.message}\"."
|
||||
|
Loading…
x
Reference in New Issue
Block a user