Virtualiser MacOS via Qemu sous Ubuntu, cela permet de tester un site web sous Safari ou de tester des logiciels spécifiques à MacOS.
https://tuxicoman.jesuislibre.net/2021/01/virtualiser-macos-sur-linux-avec-qemu.html
https://github.com/foxlet/macOS-Simple-KVM
https://www.linuxuprising.com/2020/03/how-to-install-macos-in-virtual-machine.html
util01@station66:~$ mkdir QEMU1
util01@station66:~$ cd QEMU1/
util01@station66:~/QEMU1$
util01@station66:~/QEMU1$ git clone https://github.com/foxlet/macOS-Simple-KVM.git
util01@station66:~/QEMU1$ cd macOS-Simple-KVM/
util01@station66:~/QEMU1/macOS-Simple-KVM$
util01@station66:~/QEMU1/macOS-Simple-KVM$ ./jumpstart.sh
...
opening partition 4 ... 100.00% ok
opening partition 5 ... 100.00% ok
opening partition 6 ... 100.00% ok
opening partition 7 ... 100.00% ok
Archive successfully decompressed as /home/util01/QEMU1/macOS-Simple-KVM/BaseSystem.img
util01@station66:~/QEMU1/macOS-Simple-KVM$
util01@station66:~/QEMU1/macOS-Simple-KVM$ qemu-img create -f qcow2 MyDisk.qcow2 64G
Formatting 'MyDisk.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=68719476736 lazy_refcounts=off refcount_bits=16
Ouvrir :
basic.sh
Ajouter :
-drive id=SystemDisk,if=none,file=MyDisk.qcow2 \
-device ide-hd,bus=sata.4,drive=SystemDisk
Chercher :
-usb -device usb-kbd -device usb-mouse \
Remplacer par :
-usb -device usb-kbd -device usb-tablet \
util01@station66:~/QEMU1/macOS-Simple-KVM$ ./basic.sh
Créer :
basic1.sh
Ajouter :
#!/bin/bash
OSK="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VMDIR=$PWD
OVMF=$VMDIR/firmware
#export QEMU_AUDIO_DRV=pa
#QEMU_AUDIO_DRV=pa
qemu-system-x86_64 \
-enable-kvm \
-m 2G \
-machine q35,accel=kvm \
-smp 4,cores=2 \
-cpu Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc \
-device isa-applesmc,osk="$OSK" \
-smbios type=2 \
-drive if=pflash,format=raw,readonly,file="$OVMF/OVMF_CODE.fd" \
-drive if=pflash,format=raw,file="$OVMF/OVMF_VARS-1024x768.fd" \
-vga qxl \
-device ich9-intel-hda -device hda-output \
-usb -device usb-kbd -device usb-tablet \
-netdev user,id=net0 \
-device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \
-device ich9-ahci,id=sata \
-drive id=ESP,if=virtio,format=qcow2,file=ESP.qcow2 \
-drive id=MyDisk,if=virtio,format=qcow2,file=MyDisk.qcow2 \
-k fr
Action :
$ chmod +x basic1.sh