mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Fix for bug in detach disk
(cherry picked from commit f8b58adf3742a1260c145440d7ceb1df5a64d352)
This commit is contained in:
parent
f626bbe357
commit
347435ecc4
@ -62,6 +62,6 @@ begin
|
||||
ds_name,
|
||||
img_path)
|
||||
rescue Exception => e
|
||||
STDERR.puts "Error detaching image #{img_path} size. Reason: #{e.message}"
|
||||
STDERR.puts "Error detaching image #{img_path}. Reason: #{e.message}"
|
||||
exit -1
|
||||
end
|
||||
|
@ -2650,6 +2650,7 @@ private
|
||||
ds_and_img_name = "[#{ds_name}] #{img_path}"
|
||||
|
||||
disk = vm.config.hardware.device.select { |d| is_disk?(d) &&
|
||||
d.backing.respond_to?(:fileName) &&
|
||||
d.backing.fileName == ds_and_img_name }
|
||||
|
||||
raise "Disk #{img_path} not found." if disk.nil?
|
||||
|
Loading…
x
Reference in New Issue
Block a user