&& tee -a Launch.sh <<<'qemu-system-x86_64 -enable-kvm -m ${RAM}000 \'\
&& tee -a Launch.sh <<<'-cpu Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check \'\
&& tee -a Launch.sh <<<'-machine q35 \'\
&& tee -a Launch.sh <<<'-smp ${SMP},cores=${CORES} \'\
&& tee -a Launch.sh <<<'#!/bin/sh'\
&& tee -a Launch.sh <<<'set -eu'\
&& tee -a Launch.sh <<<'sudo chown $(id -u):$(id -g) /dev/kvm 2>/dev/null || true'\
&& tee -a Launch.sh <<<'sudo chown -R $(id -u):$(id -g) /dev/snd 2>/dev/null || true'\
&& tee -a Launch.sh <<<'exec qemu-system-x86_64 -m ${RAM:-8}000 \'\
&& tee -a Launch.sh <<<'-cpu Penryn,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check \'\
&& tee -a Launch.sh <<<'-machine q35,accel=kvm:tcg \'\
&& tee -a Launch.sh <<<'-smp ${SMP:-4},cores=${CORES:-4} \'\
&& tee -a Launch.sh <<<'-usb -device usb-kbd -device usb-tablet \'\
&& tee -a Launch.sh <<<'-device isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal\(c\)AppleComputerInc \'\
&& tee -a Launch.sh <<<'-drive if=pflash,format=raw,readonly,file=/home/arch/OSX-KVM/OVMF_CODE.fd \'\
&& tee -a Launch.sh <<<'-drive if=pflash,format=raw,file=./OVMF_VARS-1024x768.fd \'\
&& tee -a Launch.sh <<<'-drive if=pflash,format=raw,file=/home/arch/OSX-KVM/OVMF_VARS-1024x768.fd \' \
&& tee -a Launch.sh <<<'-smbios type=2 \'\
&& tee -a Launch.sh <<<'-device ich9-intel-hda -device hda-duplex \'\
&& tee -a Launch.sh <<<'-audiodev ${AUDIO_DRIVER:-alsa},id=hda -device ich9-intel-hda -device hda-duplex,audiodev=hda \' \
&& tee -a Launch.sh <<<'-device ich9-ahci,id=sata \'\
&& tee -a Launch.sh <<<'-drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2 \'\
&& tee -a Launch.sh <<<'-device ide-hd,bus=sata.2,drive=OpenCoreBoot \'\
&& tee -a Launch.sh <<<'-device ide-hd,bus=sata.3,drive=InstallMedia \'\
&& tee -a Launch.sh <<<'-drive id=InstallMedia,if=none,file=BaseSystem.img,format=raw \' \
&& tee -a Launch.sh <<<'-drive id=InstallMedia,if=none,file=/home/arch/OSX-KVM/BaseSystem.img,format=qcow2 \' \
&& tee -a Launch.sh <<<'-drive id=MacHDD,if=none,file=/home/arch/OSX-KVM/mac_hdd_ng.img,format=qcow2 \'\
&& tee -a Launch.sh <<<'-device ide-hd,bus=sata.4,drive=MacHDD \'\
&& tee -a Launch.sh <<<'-netdev user,id=net0,hostfwd=tcp::${INTERNAL_SSH_PORT}-:22,hostfwd=tcp::${SCREEN_SHARE_PORT}-:5900, -device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:09:49:17 \' \
&& tee -a Launch.sh <<<'-netdev user,id=net0,hostfwd=tcp::${INTERNAL_SSH_PORT:-10022}-:22,hostfwd=tcp::${SCREEN_SHARE_PORT:-5900}-:5900, -device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:09:49:17 \' \
&& tee -a Launch.sh <<<'-monitor stdio \'\
&& tee -a Launch.sh <<<'-vga vmware \'\
&& tee -a Launch.sh <<<'${EXTRA}'
&& tee -a Launch.sh <<<'${EXTRA:-}'
ENV USER arch
ENVRAM=8
ENVSMP=4
ENVCORES=4
ENVEXTRA=
ENVINTERNAL_SSH_PORT=10022
ENVSCREEN_SHARE_PORT=5900
# if you're in the shell, export these variables to use then in envsubst
docker run --privileged -e "DISPLAY=${DISPLAY:-:0.0}" -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx ./OpenCore-Boot.sh
docker run --device /dev/kvm --device /dev/snd -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx ./OpenCore-Boot.sh
```
PulseAudio for sound (note neither [AppleALC](https://github.com/acidanthera/AppleALC) and varying [`alcid`](https://dortania.github.io/OpenCore-Post-Install/universal/audio.html) or [VoodooHDA-OC](https://github.com/chris1111/VoodooHDA-OC) have [codec support](https://osy.gitbook.io/hac-mini-guide/details/hda-fix#hda-codec) though [IORegistryExplorer](https://github.com/vulgo/IORegistryExplorer) does show the controller component working):