Browse Source

Allow extra storage parameters to be configured

master
Sebastian Lohff 3 years ago
parent
commit
9de6b97f80
  1. 1
      defaults/main.yml
  2. 1
      tasks/install-vm.yml
  3. 2
      templates/xen-vm.cfg.j2

1
defaults/main.yml

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

1
tasks/install-vm.yml

@ -65,6 +65,7 @@ @@ -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)

2
templates/xen-vm.cfg.j2

@ -7,7 +7,7 @@ maxmem = '{{ vm.maxmem }}' @@ -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 = [

Loading…
Cancel
Save