1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

B #2274: it is possible to remove disk from vCenter templates (#2383)

(cherry picked from commit ca5b1f72101ce8cf4495eecf8b66539ec914442f)
This commit is contained in:
Sergio Semedi Barranco 2018-09-05 16:58:38 +02:00 committed by Tino Vazquez
parent b772d252f4
commit d501afd505

View File

@ -2241,11 +2241,9 @@ class VirtualMachine < Template
persistent = VCenterDriver::VIHelper.find_persistent_image_by_source(source, ipool)
if !persistent
detach_disk_array << {
:fileOperation => :destroy,
:operation => :remove,
:device => d[:device]
}
op = {operation: :remove, device: d[:device]}
op[:fileOperation] = :destroy unless d[:type] == "CDROM"
detach_disk_array << op
end
# Remove reference opennebula.disk if exist