virtpool/templates/config.tmpl.xml

38 lines
1.4 KiB
XML

<domain type="{{ args.type }}">
<name>{{ args.name }}</name>
<uuid>{{ args.uuid }}</uuid>
<memory unit="{{ args.memory_unit }}">{{ args.memory }}</memory>
<currentMemory unit="{{ args.memory_unit }}">{{ args.current_memory }}</currentMemory>
<vcpu placement="static">{{ args.vcpu }}</vcpu>
<os>
<type arch='{{ args.arch }}' machine='{{ args.machine }}'>hvm</type>
<!--boot dev='hd'/-->
<boot dev='cdrom'/>
</os>
<clock offset='{{ args.offset }}'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>{{ args.emulator }}</emulator>
<disk type="file" device="disk">
<driver name="qemu" type="raw"/>
<source file="{{ args.img_source }}"/>
<target dev="vda" bus="virtio"/>
</disk>
<disk type='file' device='cdrom'>
<source file='{{ args.iso_source }}'/>
<target dev='sda' bus='sata'/>
</disk>
<interface type="network">
<mac address="52:54:00:b6:8e:76"/>
<source network="default"/>
<model type="virtio"/>
<address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>
<!--graphics will be removed after testing as we probably won't need this-->
<graphics type='vnc' port='-1' listen='127.0.0.1'/>
</devices>
</domain>