lorax/share/templates.d/99-generic/appliance/libvirt.tmpl
Brian C. Lane 8e749efbbf Fix make_appliance and the libvirt.tmpl
Apparently nobody has used these since the switch to py3, xrange is now
range and it needs to read the file in binary mode when generating the
sha256.
2018-11-12 11:13:37 -08:00

36 lines
750 B
XML

<?xml version="1.0" encoding="UTF-8"?>
<image>
<name>${name}</name>
<domain>
<boot type='hvm'>
<guest>
<arch>${arch}</arch>
</guest>
<os>
<loader dev='hd'/>
</os>
%for disk, letter in zip(disks, range(97, 123)):
<drive disk='${disk.name}' target='hd${chr(letter)}'/>
%endfor
</boot>
<devices>
<vcpu>${vcpus}</vcpu>
<memory>${memory}</memory>
%for net in networks:
<interface/>
%endfor
<graphics/>
</devices>
</domain>
<storage>
%for disk in disks:
<disk file='${disk.name}' use='system' format='${disk.format}'>
%if disk.checksum:
<checksum type='${disk.checksum_type}'>${disk.checksum}</checksum>
%endif
</disk>
%endfor
</storage>
</image>