Skip to content

Instantly share code, notes, and snippets.

@infinex
Last active December 10, 2020 12:49
Show Gist options
  • Save infinex/4dba552a8f80c3daa0fe09109febc9b2 to your computer and use it in GitHub Desktop.
Save infinex/4dba552a8f80c3daa0fe09109febc9b2 to your computer and use it in GitHub Desktop.
virtual machine qem setup big sur archlinux
https://www.funkyspacemonkey.com/how-to-install-macos-big-sur-with-opencore-on-linux
git clone https://github.com/kholia/OSX-KVM.git macOS-Big-Sur
./fetch-macOS.py --big-sur
3. Install xar. Arch and derivates users can install xar from the AUR. Now we need to extract SharedSupport.dmg from InstallAssistant.pkg.
If you’ve installed xar from AUR, run: xar -xf InstallAssistant.pkg
4. Install darling-dmg. If you’re running Arch or derivates, you can install the package from the AUR. We will need it to mount SharedSupport.dmg
If you’ve installed the package from the AUR, run: darling-dmg SharedSupport.dmg temp
5. Now that SharedSupport.dmg is mounted we need to extract BaseSystem.dmg from it. The file we need is located inside a .zip file, so we’ll use 7zip to extract it. To do that, run:
7z e ./temp/com_apple_MobileAsset_MacSoftwareUpdate/*.zip AssetData/Restore/BaseSystem.dmg
6.
yay -s dmg2img
dmg2img BaseSystem.dmg BaseSystem.img
sudo pacman -Syu libvirtd ebtables dnsmasq
sudo systemctl enable libvirtd.service
sudo systemctl start libvirtd.service
sudo virsh net-list --all
sudo virsh net-start default
sudo virsh net-autostart default
sudo ip tuntap add dev tap0 mode tap
sudo ip link set tap0 up promisc on
sudo ip link set dev virbr0 up
sudo ip link set dev tap0 master virbr0
sed -i "s/CHANGEME/$USER/g" macOS-libvirt-Catalina.xml
#permission denied
sudo vim /etc/libvirt/qemu.conf
change user/group to username
systemctl restart libvirtd
virsh --connect qemu:///system define macOS-libvirt-Catalina.xml
- add pci-e passthrough via virtual-manger
- enable remote login in sharing/remote login
ssh-keygen
ssh-copy-id -i ~/.ssh/mykey user@host
brew install barrier
# set up hook
sudo mkdir -p /etc/libvirt/hooks
sudo wget 'https://raw.githubusercontent.com/PassthroughPOST/VFIO-Tools/master/libvirt_hooks/qemu' \
-O /etc/libvirt/hooks/qemu
sudo chmod +x /etc/libvirt/hooks/qemu
systemctl restart libvirtd
# set up acs_patch
git clone git clone https://gitlab.manjaro.org/packages/core/linux54
copy acs_patch to folder
edit MKGFILE
updpkgsums
makepkg -s
makepkg -i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment