-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtdx-libvirt-ubuntu-host.xml.template
60 lines (60 loc) · 1.99 KB
/
tdx-libvirt-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
60
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>tdx-guest</name>
<memory unit='GiB'>REPLACE_MEM_SIZE</memory>
<vcpu placement="static">REPLACE_VCPU_NUM</vcpu>
<os>
<type arch='x86_64' machine='q35'>hvm</type>
<loader>/usr/share/qemu/OVMF.fd</loader>
<boot dev='hd'/>
</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='REPLACE_VCPU_NUM' 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/image'/>
<target dev='vda' bus='virtio'/>
</disk>
<interface type='bridge'>
<source bridge='virbr0'/>
<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>
<vsock model='virtio'>
<cid auto='yes' address='3'/>
<address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</vsock>
</devices>
<allowReboot value='no'/>
<qemu:commandline>
<qemu:arg value='-cpu'/>
<qemu:arg value='host,-kvm-steal-time'/>
<qemu:arg value='-machine'/>
<qemu:arg value='q35,kernel_irqchip=split,confidential-guest-support=tdx,hpet=off'/>
<qemu:arg value='-object'/>
<qemu:arg value='{"qom-type":"tdx-guest","id":"tdx","quote-generation-socket":{"type":"vsock","cid":"1","port":"4050"}}'/>
</qemu:commandline>
</domain>