1
0
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:
Tino Vazquez 2022-03-01 16:32:22 +01:00
parent 767ea877d9
commit 3c8a517699
No known key found for this signature in database
GPG Key ID: 14201E424D02047E
2 changed files with 21 additions and 1 deletions

View File

@ -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
}

View File

@ -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