Allow extra storage parameters to be configured

This commit is contained in:
Sebastian Lohff 2019-03-30 23:08:01 +01:00
parent d467d66b64
commit 9de6b97f80
3 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
---
xen_vm_creator_install_genconfdrv: true
xen_vm_creator_extra_storage_args:
# vm parameters
xen_vm_creator_vm_defaults:

View File

@ -65,6 +65,7 @@
vars:
iso_path: "{{ xen_vm_creator_iso_dir }}/{{ vm.hostname}}.iso"
storage_path: "phy:/dev/{{ xen_vm_creator_lvm_vg_name }}/{{ vm.hostname }}-disk"
extra_storage_args: "{{ xen_vm_creator_extra_storage_args|default }}"
# provision storage
# --> lvm: create lv (lvol size/vg/lv)

View File

@ -7,7 +7,7 @@ maxmem = '{{ vm.maxmem }}'
vcpus = {{ vm.vcpus }}
maxvcpus = {{ vm.max_vcpus }}
disk = [
'{{ storage_path }},xvda,w',
'{{ storage_path }},xvda,w{% if extra_storage_args|default %},{{ extra_storage_args }}{% endif %}',
'file:{{ iso_path }},xvdb:cdrom,r', # --> {{ xen_vm_creator_iso_file_marker }}
]
vif = [