1 ##############################################################################
2 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
13 <memory unit='KiB'>VM_MEMORY</memory>
14 <currentMemory unit='KiB'>VM_MEMORY</currentMemory>
16 <memory mode='strict' nodeset='0'/>
18 <vcpu placement='static'>CPU_NUM</vcpu>
19 <cpu mode='host-passthrough'>
22 <type arch='x86_64' >hvm</type>
30 <on_poweroff>destroy</on_poweroff>
31 <on_reboot>restart</on_reboot>
32 <on_crash>restart</on_crash>
34 <emulator>/usr/bin/qemu-system-x86_64</emulator>'''
36 <disk type='file' device='disk'>
37 <driver name='qemu' type='IMAGE_TYPE' cache='none' io='native'/>
38 <source file='IMAGE_PATH'/>
39 <target dev='vda' bus='virtio'/>
43 <interface type='bridge'>
44 <mac address='CTRL_MAC'/>
45 <source bridge='CTRL_BR'/>
46 <model type='CTRL_MODEL'/>
50 <interface type='bridge'>
51 <mac address='TAP_MAC'/>
52 <source bridge='BR_NAME'/>
53 <virtualport type='BR_TYPE'>
55 <model type='virtio'/>
56 <driver name='vhost' queues='4'/>
57 <target dev='TAP_NAME'/>
60 <interface type='bridge'>
61 <mac address='TAP_MAC'/>
62 <source bridge='BR_NAME'/>
63 <model type='virtio'/>
64 <target dev='TAP_NAME'/>
68 <hostdev mode='subsystem' type='pci' managed='yes'>
71 <address domain='0x0000' bus='0xBUS' slot='0xSLOT' function='0xFUNCTION' />
75 <filesystem type='mount' accessmode='passthrough'>
76 <source dir='9P_PATH'/>
80 <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'>
81 <listen type='address' address='0.0.0.0'/>