summaryrefslogtreecommitdiffstats
path: root/templates/boot/generic-qemu-tmpfs.jinja2
blob: a5e842ac2a917db8eec3fc62d14cac5e4092f11a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{%- extends 'boot/generic-base-boot.jinja2' %}
{%- set boot_method = "qemu" %}
{%- block boot %}
{{ super() }}
    media: {{ media_type|default("tmpfs") }}
    transfer_overlay:
      download_command: wget
      unpack_command: tar -C / -xvpf
{%- endblock %}
{%- block main %}
{{ super() }}
context:
    no_kvm: false
    arch: {{ qemu_arch }}
{%- if qemu_cpu is defined %}
    cpu: {{ qemu_cpu }}
{%- endif %}
{%- if qemu_machine is defined %}
    machine: {{ qemu_machine }}
{%- endif %}
{%- if qemu_memory is defined %}
    memory: {{ qemu_memory }}
{%- endif %}
{%- if qemu_model is defined %}
    model: {{ qemu_model }}
{%- endif %}
{%- if guestfs_interface is defined %}
    guestfs_interface: {{ guestfs_interface }}
{%- endif %}
    extra_options: ["{{ qemu_args }} -vnc unix:/tmp/vnc-{{ uniqid }}"]
{% endblock %}
{%- block deploy -%}
{{ super() }}
    images:
        kernel:
           image_arg: '-kernel {kernel} -append "{{ qemu_cmdline }}"'
           url: {{ kernel_url }}
{%- if initrd_url and rootfs_type == 'rootvd' %}
        rootvd:
           image_arg: '-drive format=raw,file={rootvd}'
           url: {{ initrd_url }}
           compression: {{ initrd_compression }}
{%- endif %}
{%- endblock %}