blob: 717977883e5c82f1b6a206fbfc65dbc071e5c1e5 (
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
45
46
47
48
49
50
|
{% extends 'base.jinja2' %}
{% block body %}
device_type: kvm
# allow job context override - use a different variable name, undefined if not in job context
{% set base_guest_fs_size = guestfs_size | default(512) %}
{% set qemu_guest_fs_interface = guestfs_interface | default('ide') %}
{% set boot_order = installer_boot_order | default('c') %}
actions:
deploy:
methods:
image:
parameters:
guest:
size: {{ base_guest_fs_size }} # in Mb
interface: {{ qemu_guest_fs_interface }}
boot:
connections:
serial:
methods:
qemu:
parameters:
command:
{% if arch == 'arm64' %}
qemu-system-aarch64
{% elif arch == 'amd64' %}
qemu-system-x86_64
{% elif arch == 'i386' %}
qemu-system-x86
{% endif %}
boot_options:
{% if arch == 'arm64' %}
{root: '{{ boot_root|default("/dev/vda2") }} rw rootwait', console: {{ boot_console|default('ttyAMA0 115200') }}, ip: dhcp, mem: 1024M}
{% elif arch == 'amd64' %}
{root: {{ boot_root|default('/dev/sda1') }},
console: {{ boot_console|default('ttyS0,115200') }},
boot_order: {{ installer_boot_order }}}
{% else %}
{root: {{ boot_root|default('/dev/sda1') }}, console: {{ boot_console|default('ttyS0,115200') }}}
{% endif %}
options:
{% block qemu_options %}
- -nographic
- -enable-kvm
- -cpu host
- -net nic,model=virtio,macaddr={{ mac_addr|default('52:54:00:12:34:58') }} -net {{ netdevice|default('user') }}
- -m {{ memory|default(512) }}
{% endblock qemu_options %}
{% endblock body %}
|