diff options
Diffstat (limited to 'writeups/hackintosh/mac.libvirt.xml')
-rw-r--r-- | writeups/hackintosh/mac.libvirt.xml | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/writeups/hackintosh/mac.libvirt.xml b/writeups/hackintosh/mac.libvirt.xml new file mode 100644 index 0000000..f9198a5 --- /dev/null +++ b/writeups/hackintosh/mac.libvirt.xml @@ -0,0 +1,134 @@ +<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm"> + <name>mac-a</name> + <uuid></uuid> + <memory unit="KiB">8388608</memory> + <currentMemory unit="KiB">8388608</currentMemory> + <vcpu placement="static">4</vcpu> + <os> + <type arch="x86_64" machine="q35">hvm</type> + <loader readonly="yes" secure="no" type="pflash">/usr/share/edk2/ovmf/OVMF_CODE.fd</loader> + <nvram template="/usr/share/OVMF/OVMF_VARS.fd"></nvram> + </os> + <features> + <acpi/> + <apic/> + <vmport state="off"/> + <smm state="off"/> + </features> + <cpu mode="host-passthrough" check="none" migratable="on"/> + <clock offset="utc"> + <timer name="rtc" tickpolicy="catchup"/> + <timer name="pit" tickpolicy="delay"/> + <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 enabled="no"/> + <suspend-to-disk enabled="no"/> + </pm> + <devices> + <disk type="file" device="disk"> + <driver name="qemu" type="qcow2"/> + <source file="/var/lib/libvirt/images/OpenCore.qcow2"/> + <target dev="sdb" bus="sata"/> + <boot order="1"/> + <address type="drive" controller="0" bus="0" target="0" unit="1"/> + </disk> + <controller type="sata" index="0"> + <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/> + </controller> + <controller type="pci" index="0" model="pcie-root"/> + <controller type="pci" index="1" model="pcie-root-port"> + <model name="pcie-root-port"/> + <target chassis="1" port="0x10"/> + <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/> + </controller> + <controller type="pci" index="2" model="pcie-root-port"> + <model name="pcie-root-port"/> + <target chassis="2" port="0x11"/> + <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/> + </controller> + <controller type="pci" index="3" model="pcie-root-port"> + <model name="pcie-root-port"/> + <target chassis="3" port="0x12"/> + <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/> + </controller> + <controller type="usb" index="0" model="qemu-xhci"> + <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/> + </controller> + <controller type="virtio-serial" index="0"> + <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/> + </controller> + <serial type="pty"> + <target type="isa-serial" port="0"> + <model name="isa-serial"/> + </target> + </serial> + <console type="pty"> + <target type="serial" port="0"/> + </console> + <channel type="spicevmc"> + <target type="virtio" name="com.redhat.spice.0"/> + <address type="virtio-serial" controller="0" bus="0" port="1"/> + </channel> + <input type="mouse" bus="ps2"/> + <input type="keyboard" bus="ps2"/> + <graphics type="spice" autoport="yes"> + <listen type="address"/> + </graphics> + <audio id="1" type="spice"/> + <video> + <model type="qxl" ram="65536" vram="65536" vgamem="16384" heads="1" primary="yes"/> + <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/> + </video> + <watchdog model="itco" action="reset"/> + <memballoon model="none"/> + </devices> + <qemu:commandline> + <qemu:arg value="-cpu"/> + <!-- "Intel Cascade Lake-based Xeon W" of Mac Pro 2019 --> + <qemu:arg value="Cascadelake-Server-noTSX,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check"/> + <qemu:arg value="-device"/> + <qemu:arg value="isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"/> + <qemu:arg value="-smbios"/> + <qemu:arg value="type=2"/> + <qemu:arg value="-device"/> + <qemu:arg value="qemu-xhci,id=xhci,addr=0x10.0x0"/> + <qemu:arg value="-device"/> + <qemu:arg value="usb-kbd,bus=xhci.0"/> + <qemu:arg value="-device"/> + <qemu:arg value="usb-tablet,bus=xhci.0"/> + <!-- + Attach the usbredir devices to a hub connected to a separate XHCI + controller so that the kernel can enumerate them. Connecting them directly + to the controller will result in kernel complaining in loop. + --> + <qemu:arg value="-device"/> + <qemu:arg value="qemu-xhci,id=usbr,addr=0x11.0x0"/> + <qemu:arg value="-device"/> + <qemu:arg value="usb-hub,bus=usbr.0,port=1"/> + <qemu:arg value="-device"/> + <qemu:arg value="usb-redir,bus=usbr.0,port=1.1,chardev=usbredirchardev1,id=usbredirdev1"/> + <qemu:arg value="-device"/> + <qemu:arg value="usb-redir,bus=usbr.0,port=1.2,chardev=usbredirchardev2,id=usbredirdev2"/> + <qemu:arg value="-device"/> + <qemu:arg value="usb-redir,bus=usbr.0,port=1.3,chardev=usbredirchardev3,id=usbredirdev3"/> + <qemu:arg value="-device"/> + <qemu:arg value="usb-redir,bus=usbr.0,port=1.4,chardev=usbredirchardev4,id=usbredirdev4"/> + <qemu:arg value="-device"/> + <!-- Paste the unique mac generated for your vm(optional) --> + <qemu:arg value="virtio-net-pci,addr=0x12.0x0,netdev=net0,id=net0,mac=44:E6:6E:4F:87:9C"/> + <qemu:arg value="-netdev"/> + <qemu:arg value="user,id=net0"/> + <qemu:arg value="-chardev"/> + <qemu:arg value="spicevmc,name=usbredir,id=usbredirchardev1"/> + <qemu:arg value="-chardev"/> + <qemu:arg value="spicevmc,name=usbredir,id=usbredirchardev2"/> + <qemu:arg value="-chardev"/> + <qemu:arg value="spicevmc,name=usbredir,id=usbredirchardev3"/> + <qemu:arg value="-chardev"/> + <qemu:arg value="spicevmc,name=usbredir,id=usbredirchardev4"/> + </qemu:commandline> +</domain> |