No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xen-vm.cfg.j2 1.2KB

1234567891011121314151617181920212223242526272829303132
  1. # Config for {{ vm.hostname }}
  2. # Created on: {{ ansible_date_time.date }} {{ ansible_date_time.time }} {{ ansible_date_time.tz_offset }}
  3. name = '{{ vm.hostname }}'
  4. memory = '{{ vm.mem }}'
  5. maxmem = '{{ vm.maxmem }}'
  6. vcpus = {{ vm.vcpus }}
  7. maxvcpus = {{ vm.max_vcpus }}
  8. disk = [
  9. '{{ storage_path }},xvda,w',
  10. 'file:{{ iso_path }},xvdb:cdrom,r', # --> {{ xen_vm_creator_iso_file_marker }}
  11. ]
  12. vif = [
  13. {% for network in vm.networks %}
  14. {% set default_mac = '%s:%02x:%02x:%02x' % (xen_vm_creator_mac_prefix, range(0,256)|random, range(0,256)|random, range(0,256)|random) %}
  15. 'mac={{ network.mac|default(default_mac) }},bridge={{ network.bridge }}',
  16. {% endfor %}
  17. ]
  18. acpi = '1'
  19. apic = '1'
  20. builder = 'hvm'
  21. keymap = 'de'
  22. serial = 'pty'
  23. device_model_version = 'qemu-xen'
  24. device_model_override = '/usr/bin/qemu-system-x86_64'
  25. on_crash = 'destroy'
  26. on_poweroff = 'destroy'
  27. on_reboot = 'restart'
  28. on_shutdown = 'destroy'