Advertisement
zaq_hack

Phala-VM

Feb 10th, 2021
866
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 6.31 KB | None | 0 0
  1. <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  2.   <name>phala-vm</name>
  3.   <uuid>4a73695c-e44a-4495-9d0c-b66532e71675</uuid>
  4.   <metadata>
  5.     <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
  6.       <libosinfo:os id="http://ubuntu.com/ubuntu/20.04"/>
  7.     </libosinfo:libosinfo>
  8.   </metadata>
  9.   <memory unit='KiB'>16777216</memory>
  10.   <currentMemory unit='KiB'>16777216</currentMemory>
  11.   <vcpu placement='static'>8</vcpu>
  12.   <os>
  13.     <type arch='x86_64' machine='pc-q35-4.0'>hvm</type>
  14.     <bootmenu enable='no'/>
  15.   </os>
  16.   <features>
  17.     <acpi/>
  18.     <apic/>
  19.     <vmport state='off'/>
  20.   </features>
  21.   <cpu mode='host-model' check='partial'/>
  22.   <clock offset='utc'>
  23.     <timer name='rtc' tickpolicy='catchup'/>
  24.     <timer name='pit' tickpolicy='delay'/>
  25.     <timer name='hpet' present='no'/>
  26.   </clock>
  27.   <on_poweroff>destroy</on_poweroff>
  28.   <on_reboot>restart</on_reboot>
  29.   <on_crash>destroy</on_crash>
  30.   <pm>
  31.     <suspend-to-mem enabled='no'/>
  32.     <suspend-to-disk enabled='no'/>
  33.   </pm>
  34.   <devices>
  35.     <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
  36.     <disk type='file' device='disk'>
  37.       <driver name='qemu' type='qcow2'/>
  38.       <source file='/var/lib/libvirt/images/phala-vm.qcow2'/>
  39.       <target dev='vda' bus='virtio'/>
  40.       <boot order='1'/>
  41.       <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
  42.     </disk>
  43.     <disk type='file' device='cdrom'>
  44.       <driver name='qemu' type='raw'/>
  45.       <target dev='sda' bus='sata'/>
  46.       <readonly/>
  47.       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
  48.     </disk>
  49.     <controller type='usb' index='0' model='ich9-ehci1'>
  50.       <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x7'/>
  51.     </controller>
  52.     <controller type='usb' index='0' model='ich9-uhci1'>
  53.       <master startport='0'/>
  54.       <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x0' multifunction='on'/>
  55.     </controller>
  56.     <controller type='usb' index='0' model='ich9-uhci2'>
  57.       <master startport='2'/>
  58.       <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x1'/>
  59.     </controller>
  60.     <controller type='usb' index='0' model='ich9-uhci3'>
  61.       <master startport='4'/>
  62.       <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x2'/>
  63.     </controller>
  64.     <controller type='sata' index='0'>
  65.       <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
  66.     </controller>
  67.     <controller type='pci' index='0' model='pcie-root'/>
  68.     <controller type='pci' index='1' model='pcie-root-port'>
  69.       <model name='pcie-root-port'/>
  70.       <target chassis='1' port='0x10'/>
  71.       <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
  72.     </controller>
  73.     <controller type='pci' index='2' model='pcie-root-port'>
  74.       <model name='pcie-root-port'/>
  75.       <target chassis='2' port='0x11'/>
  76.       <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
  77.     </controller>
  78.     <controller type='pci' index='3' model='pcie-root-port'>
  79.       <model name='pcie-root-port'/>
  80.       <target chassis='3' port='0x12'/>
  81.       <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
  82.     </controller>
  83.     <controller type='pci' index='4' model='pcie-root-port'>
  84.       <model name='pcie-root-port'/>
  85.       <target chassis='4' port='0x13'/>
  86.       <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
  87.     </controller>
  88.     <controller type='pci' index='5' model='pcie-root-port'>
  89.       <model name='pcie-root-port'/>
  90.       <target chassis='5' port='0x14'/>
  91.       <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
  92.     </controller>
  93.     <controller type='pci' index='6' model='pcie-root-port'>
  94.       <model name='pcie-root-port'/>
  95.       <target chassis='6' port='0x15'/>
  96.       <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
  97.     </controller>
  98.     <controller type='virtio-serial' index='0'>
  99.       <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
  100.     </controller>
  101.     <interface type='direct'>
  102.       <mac address='52:54:00:86:42:c1'/>
  103.       <source dev='eno1' mode='bridge'/>
  104.       <model type='e1000e'/>
  105.       <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
  106.     </interface>
  107.     <serial type='pty'>
  108.       <target type='isa-serial' port='0'>
  109.         <model name='isa-serial'/>
  110.       </target>
  111.     </serial>
  112.     <console type='pty'>
  113.       <target type='serial' port='0'/>
  114.     </console>
  115.     <channel type='unix'>
  116.       <target type='virtio' name='org.qemu.guest_agent.0'/>
  117.       <address type='virtio-serial' controller='0' bus='0' port='1'/>
  118.     </channel>
  119.     <channel type='spicevmc'>
  120.       <target type='virtio' name='com.redhat.spice.0'/>
  121.       <address type='virtio-serial' controller='0' bus='0' port='2'/>
  122.     </channel>
  123.     <input type='tablet' bus='usb'>
  124.       <address type='usb' bus='0' port='1'/>
  125.     </input>
  126.     <input type='mouse' bus='ps2'/>
  127.     <input type='keyboard' bus='ps2'/>
  128.     <graphics type='vnc' port='6100' autoport='no' listen='0.0.0.0' keymap='en-us' passwd='#YangGang'>
  129.       <listen type='address' address='0.0.0.0'/>
  130.     </graphics>
  131.     <video>
  132.       <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
  133.       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
  134.     </video>
  135.     <redirdev bus='usb' type='spicevmc'>
  136.       <address type='usb' bus='0' port='2'/>
  137.     </redirdev>
  138.     <redirdev bus='usb' type='spicevmc'>
  139.       <address type='usb' bus='0' port='3'/>
  140.     </redirdev>
  141.     <memballoon model='virtio'>
  142.       <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
  143.     </memballoon>
  144.     <rng model='virtio'>
  145.       <backend model='random'>/dev/urandom</backend>
  146.       <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
  147.     </rng>
  148.   </devices>
  149.   <qemu:commandline>
  150.     <qemu:arg value='-cpu'/>
  151.     <qemu:arg value='host,+sgx,+sgxlc'/>
  152.     <qemu:arg value='-object'/>
  153.     <qemu:arg value='memory-backend-epc,id=mem1,size=16M,prealloc'/>
  154.     <qemu:arg value='-sgx-epc'/>
  155.     <qemu:arg value='id=epc1,memdev=mem1'/>
  156.   </qemu:commandline>
  157. </domain>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement