-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtdx_libvirt_direct.ubuntu_host.xml.template
60 lines (59 loc) · 1.65 KB
/
tdx_libvirt_direct.ubuntu_host.xml.template
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
51
52
53
54
55
56
57
58
59
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>td-guest-direct-on-ubuntu-host</name>
<memory unit='KiB'>2097152</memory>
<memoryBacking>
<source type='memfd-private'/>
</memoryBacking>
<vcpu placement="static">1</vcpu>
<os>
<type arch='x86_64' machine='q35'>hvm</type>
<loader>/usr/share/qemu/OVMF.fd</loader>
<boot dev='hd'/>
<kernel>/path/to/vmlinuz</kernel>
<cmdline>root=/dev/vda1 rw console=hvc0</cmdline>
</os>
<features>
<acpi/>
<apic/>
<ioapic driver='qemu'/>
</features>
<clock offset='utc'>
<timer name='hpet' present='no'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<pm>
<suspend-to-mem enable='no'/>
<suspend-to-disk enable='no'/>
</pm>
<cpu mode='host-passthrough'>
<topology sockets='1' cores='1' threads='1'/>
</cpu>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/path/to/file.qcow2'/>
<target dev='vda' bus='virtio'/>
</disk>
<interface type="user">
<model type="virtio"/>
</interface>
<console type='pty'>
<target type='virtio' port='0'/>
</console>
<channel type='unix'>
<source mode='bind'/>
<target type='virtio' name='org.qemu.guest_agent.0'/>
</channel>
</devices>
<allowReboot value='no'/>
<launchSecurity type='tdx'>
<policy>0x10000001</policy>
</launchSecurity>
<qemu:commandline>
<qemu:arg value='-cpu'/>
<qemu:arg value='host,-kvm-steal-time'/>
</qemu:commandline>
</domain>