Howto macOS ventura kvm: Difference between revisions

From Vidalinux Wiki
Jump to navigation Jump to search
m (Protected "Howto macOS ventura kvm" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(One intermediate revision by the same user not shown)
Line 99: Line 99:
* https://github.com/BigAnteater/KVM-GPU-Passthrough
* https://github.com/BigAnteater/KVM-GPU-Passthrough
* https://mrmacintosh.com/macos-ventura-13-full-installer-database-download-directly-from-apple/
* https://mrmacintosh.com/macos-ventura-13-full-installer-database-download-directly-from-apple/
* https://github.com/kholia/OSX-KVM/blob/master/notes.md
[sound card]
* https://tinyurl.com/r5kazh5w

Latest revision as of 11:43, 5 August 2024

requirements

  • cpu with virtualization technology
  • virtualization enable on bios
  • kvm module enable on linux
  • disk space for creating virtual disk

verify your cpu

to confirm your computer have virtualization enable:

grep -E '(vmx|svm)' /proc/cpuinfo

offline install

for offline installation you need a mac to create the ventura img, on your mac install command line tools:

xcode-select --install

download and install assistant package on your mac:

https://swcdn.apple.com/content/downloads/07/49/032-35706-A_E13VXNW85V/adm3i8lj9k9gmo6swtwto3lv6jc57q8i61/InstallAssistant.pkg

download this script to create the offline installation ventura dmg:

https://raw.githubusercontent.com/kholia/OSX-KVM/f66a236a4a08411b61daef064dc0833594eded59/scripts/create_dmg_ventura.sh

set execute permissions to file:

chmod +x create_dmg_ventura.sh

execute the file on your mac:

./create_dmg_ventura.sh

archlinux

install packages:

pacman -S git virt-manager dmg2img base-devel networkmanager bridge-utils --noconfirm

enable and start libvirt service:

systemctl enable libvirtd && systemctl start libvirtd

add your user to libvirt group:

gpasswd -a username libvirt

redhat

for redhat or any redhat derivatives:

ubuntu

install universe repo:

sudo add-apt-repository universe
sudo apt update

install packages:

sudo apt install dmg2img qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager git build-essential -y

enable and start libvirt service:

sudo systemctl enable libvirtd && systemctl start libvirtd

add your user to libvirt group:

sudo gpasswd -a username libvirt

create bridge interface

create the bridge interface:

nmcli connection add type bridge autoconnect yes con-name br0 ifname br0

add device to bridge:

nmcli connection add type bridge-slave autoconnect yes con-name br0-eth0 ifname eth0 master br0

add ip address to bridge interface:

nmcli connection modify br0 ipv4.address 192.168.75.15 ipv4.method manual ipv4.gateway 192.168.75.1 ipv4.dns 4.2.2.1,4.2.2.2

active bridge interface:

nmcli connection up br0

configure kvm

download osx-kvm git repo:

git clone --depth 1 --recursive https://github.com/kholia/OSX-KVM.git

fetch osx ventura baseimg:

cd OSX-KVM
./fetch-macOS-v2.py

select number six to download ventura:

1. High Sierra (10.13)
2. Mojave (10.14)
3. Catalina (10.15)
4. Big Sur (11.7) - RECOMMENDED
5. Monterey (12.6)
6. Ventura (13)

convert basesystem dmg to img:

dmg2img -i BaseSystem.dmg BaseSystem.img

create qemu hard drive for osx installation:

qemu-img create -f qcow2 mac_hdd_ng.img 128G

edit OpenCore-Boot.sh and change ALLOCATED_RAM:

ALLOCATED_RAM="8192"

edit OpenCore-Boot.sh and change cpu threads:

-smp threads="$CPU_THREADS",cores="$CPU_CORES",sockets="$CPU_SOCKETS"

edit OpenCore-Boot.sh and change OVMF_VARS.fd archive:

-drive if=pflash,format=raw,file="$REPO_PATH/$OVMF_DIR/OVMF_VARS.fd"

edit OpenCore-Boot.sh and change installation media controller to virtio:

#-device ide-hd,bus=sata.3,drive=InstallMedia
-drive id=InstallMedia,if=none,file="$REPO_PATH/BaseSystem.img",if=virtio,format=raw

edit OpenCore-Boot.sh and change sata for virtio in the following line:

-drive id=MacHDD,if=none,file="$REPO_PATH/mac_hdd_ng.img",if=virtio,format=qcow2
#-device ide-hd,bus=sata.4,drive=MacHDD

edit OpenCore-Boot.sh and change vga driver:

#-monitor stdio
#-device VGA,vgamem_mb=128
-vga virtio

run the script to launch the installation:

./OpenCore-Boot.sh

urls to download modified archives:

macosx gpu buyers guide

references

[sound card]