mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
F #5756: Make image persistency configurable
on images coming from VM Template or Wild VM disks
This commit is contained in:
parent
767ea877d9
commit
3c8a517699
@ -408,13 +408,25 @@ module VCenterDriver
|
||||
break
|
||||
end
|
||||
|
||||
# Read configuration for imported images, taking
|
||||
# into account if we are importing a VM Tempalte
|
||||
# or a Wild VM
|
||||
image_persistency = nil
|
||||
if vm?
|
||||
image_persistency = :wild_vm_persistent_images
|
||||
else
|
||||
image_persistency = :vm_template_persistent_images
|
||||
end
|
||||
|
||||
image_persistency = VCenterDriver::CONFIG[image_persistency]
|
||||
|
||||
params = {
|
||||
:disk => disk,
|
||||
:ipool => ipool,
|
||||
:_type => type,
|
||||
:ds_id => datastore_found['ID'],
|
||||
:opts => {
|
||||
:persistent => vm? ? 'YES':'NO'
|
||||
:persistent => image_persistency ? 'YES':'NO'
|
||||
},
|
||||
:images => images
|
||||
}
|
||||
|
@ -46,3 +46,11 @@
|
||||
|
||||
# Set to true if you need OpenNebula avoid change imported MAC
|
||||
:keep_mac_on_imported: false
|
||||
|
||||
# Set to true to have Wild VM disks importent as persistent images,
|
||||
# otherwise they will be imported as non persistent
|
||||
:wild_vm_persistent_images: true
|
||||
|
||||
# Set to true to have Wild VM disks importent as persistent images,
|
||||
# otherwise they will be imported as non persistent
|
||||
:vm_template_persistent_images: false
|
||||
|
Loading…
x
Reference in New Issue
Block a user