33 lines
1.2 KiB
Django/Jinja
33 lines
1.2 KiB
Django/Jinja
# Config for {{ vm.hostname }}
|
|
# Created on: {{ ansible_date_time.date }} {{ ansible_date_time.time }} {{ ansible_date_time.tz_offset }}
|
|
|
|
name = '{{ vm.hostname }}'
|
|
memory = '{{ vm.mem }}'
|
|
maxmem = '{{ vm.maxmem }}'
|
|
vcpus = {{ vm.vcpus }}
|
|
maxvcpus = {{ vm.max_vcpus }}
|
|
disk = [
|
|
'{{ storage_path }},xvda,w',
|
|
'file:{{ iso_path }},xvdb:cdrom,r', # --> {{ xen_vm_creator_iso_file_marker }}
|
|
]
|
|
vif = [
|
|
{% for network in vm.networks %}
|
|
{% set default_mac = '%s:%02x:%02x:%02x' % (xen_vm_creator_mac_prefix, range(0,256)|random, range(0,256)|random, range(0,256)|random) %}
|
|
'mac={{ network.mac|default(default_mac) }},bridge={{ network.bridge }}',
|
|
{% endfor %}
|
|
]
|
|
|
|
acpi = '1'
|
|
apic = '1'
|
|
builder = 'hvm'
|
|
keymap = 'de'
|
|
serial = 'pty'
|
|
device_model_version = 'qemu-xen'
|
|
device_model_override = '/usr/bin/qemu-system-x86_64'
|
|
|
|
on_crash = 'destroy'
|
|
on_poweroff = 'destroy'
|
|
on_reboot = 'restart'
|
|
on_shutdown = 'destroy'
|
|
|