PVE Guest MacOS 13 Venture Setup: Difference between revisions
m (Стадий: 6 [Фаза:Утвърждаване, Статус:Утвърден]; Категория:Proxmox) |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
cat /etc/pve/qemu-server/207.conf | cat /etc/pve/qemu-server/207.conf | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="yaml" line="1" class="mlw-pre-wrap mlw-pre-max-height-320"> | <syntaxhighlight lang="yaml" line="1" class="mlw-pre-wrap mlw-pre-max-height-320 code-continue"> | ||
agent: 0 | agent: 0 | ||
args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -global nec-usb-xhci.msi=off -cpu host,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc,+pcid,+xsave,+xsaveopt,check | args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -global nec-usb-xhci.msi=off -cpu host,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc,+pcid,+xsave,+xsaveopt,check | ||
audio0: device=intel-hda,driver=spice | audio0: device=intel-hda,driver=spice | ||
bios: ovmf | bios: ovmf | ||
Line 47: | Line 39: | ||
virtio0: local-lvm:vm-207-disk-0,discard=on,size=80G | virtio0: local-lvm:vm-207-disk-0,discard=on,size=80G | ||
vmgenid: 64c40db4-c6f3-4c42-b9ed-95a02e08fa15 | vmgenid: 64c40db4-c6f3-4c42-b9ed-95a02e08fa15 | ||
</syntaxhighlight><syntaxhighlight lang="yaml" line="1" class="mlw-pre-wrap mlw-pre-max-height-320"> | |||
# Tested args which provide worse performance | |||
args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -global nec-usb-xhci.msi=off -cpu Penryn,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+avx2,+aes,+fma,+fma4,+bmi1,+bmi2,+xsave,+xsaveopt,check -device intel-hda,id=sound5,bus=pci.0,addr=0x18 -device hda-micro,id=sound5-codec0,bus=sound5.0,cad=0 -device hda-duplex,id=sound5-codec1,bus=sound5.0,cad=1 -device hda-output | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 52: | Line 47: | ||
* I've tried with different Intel processor types and found that the [https://wiki.metalevel.tech/index.php?oldid=32133 Penryn] type (used in the most internet guides) causes much greater CPU usage at the host level. IMO IvyBridge is better choice. Currently I'm using Hos type - in my case it is Haswell-EP architecture. | * I've tried with different Intel processor types and found that the [https://wiki.metalevel.tech/index.php?oldid=32133 Penryn] type (used in the most internet guides) causes much greater CPU usage at the host level. IMO IvyBridge is better choice. Currently I'm using Hos type - in my case it is Haswell-EP architecture. | ||
* In additional I've found that the number of the cores can't be greater than 4 (but you can increase the sockets if you want to pass more cores), otherwise the VM hangs at boot. | * In additional I've found that the number of the cores can't be greater than 4 (but you can increase the sockets if you want to pass more cores), otherwise the VM hangs at boot. | ||
After moving the ProxmoxVE host to a machine based on '''AMD Ryzen 9 5900X 12-Core Processor''', I was need to change some options. The correct args configuration I found within the section [https://www.nicksherlock.com/2022/10/installing-macos-13-ventura-on-proxmox/ "Upgrading from macOS Monterey" of the article "Installing macOS 13 Ventura on Proxmox 7.2"] in Nicholas Sherlock's blog. Below is my current configuration file.<syntaxhighlight lang="shell" line="1"> | |||
cat /etc/pve/qemu-server/1050.conf | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="yaml" line="1" class="mlw-pre-wrap mlw-pre-max-height-320 code-continue"> | |||
agent: 1 | |||
args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -global nec-usb-xhci.msi=off -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off -cpu Haswell-noTSX,vendor=GenuineIntel,+invtsc,+hypervisor,kvm=on,vmware-cpuid-freq=on | |||
audio0: device=intel-hda,driver=spice | |||
bios: ovmf | |||
boot: order=virtio0 | |||
cores: 8 | |||
cpu: Haswell | |||
cpuunits: 1024 | |||
efidisk0: local-lvm:vm-1050-disk-0,efitype=4m,size=4M | |||
machine: q35 | |||
memory: 8196 | |||
meta: creation-qemu=7.0.0,ctime=1666276060 | |||
name: MacOS.13 | |||
net0: vmxnet3=26:B2:9C:37:29:26,bridge=vmbr0,firewall=1 | |||
numa: 0 | |||
onboot: 1 | |||
ostype: other | |||
scsihw: virtio-scsi-pci | |||
smbios1: uuid=de4a7e04-a553-413d-a136-a7218bdf95ae | |||
sockets: 1 | |||
spice_enhancements: videostreaming=all | |||
tablet: 1 | |||
tpmstate0: local-lvm:vm-1050-disk-1,size=4M,version=v2.0 | |||
usb0: spice,usb3=1 | |||
usb1: spice,usb3=1 | |||
usb2: spice,usb3=1 | |||
vga: qxl,memory=128 | |||
virtio0: local-lvm:vm-1050-disk-2,discard=on,size=80G | |||
vmgenid: 1a90942a-6107-4ce6-ba04-50db6f01c986 | |||
</syntaxhighlight> | |||
== Post Installation Setup == | == Post Installation Setup == | ||
Line 146: | Line 175: | ||
A good clue how to install VoodooHDA on MacOS 13 Venture is provide by Yahgoo at GitHub: [https://github.com/yahgoo/installVoodooHDA4BSnMont/blob/main/README.md Install VoodooHDA for Big Sur and Monterey]. Here are the exact steps that I've performed. | A good clue how to install VoodooHDA on MacOS 13 Venture is provide by Yahgoo at GitHub: [https://github.com/yahgoo/installVoodooHDA4BSnMont/blob/main/README.md Install VoodooHDA for Big Sur and Monterey]. Here are the exact steps that I've performed. | ||
'''1.''' First we will | '''1.''' First we will install the latest built version (currently 2.9.2) provided within the Chris1111's repository: [https://github.com/chris1111/VoodooHDA-OC/releases/tag/V1 VoodooHDA OC]. This is the easiest way to get VoodooHDA's <u>preferences pane</u> operational. The repository is little bit outdated but the PrefPane is not changed since 2018. At all this step is '''optional'''. | ||
Download the file [https://github.com/chris1111/VoodooHDA-OC/files/5752212/VoodooHDA.OC.dmg.zip VoodooHDA OC.dmg.zip]. Then run the contained package. You will need to open <u>System Settings</u> and at the bottom of the <u>Privacy & Security</u> menu allow the usage of <u>VoodooHDA OC.dmg</u>. After that go back to the file and run the package again. Follow the [https://www.youtube.com/watch?v=GBDCQBqf4_k video guide] provided by the author. Note you may need interact again with <u>System Settings</u> > <u>Privacy & Security</u>. | Download the file [https://github.com/chris1111/VoodooHDA-OC/files/5752212/VoodooHDA.OC.dmg.zip VoodooHDA OC.dmg.zip]. Then run the contained package. You will need to open <u>System Settings</u> and at the bottom of the <u>Privacy & Security</u> menu allow the usage of <u>VoodooHDA OC.dmg</u>. After that go back to the file and run the package again. Follow the [https://www.youtube.com/watch?v=GBDCQBqf4_k video guide] provided by the author. Note you may need interact again with <u>System Settings</u> > <u>Privacy & Security</u>. |
Latest revision as of 20:36, 15 April 2023
Proxmox Setup and MacOS Installation
I've followed the guide provided by i12bretro and have installed MacOS 13 Venture on my PVE:
- YouTube: Running a MacOS Monterey VM in Proxmox VE (also much comments about GPU PT are provided there)
- Guide: Running a MacOS Monterey VM in Proxmox VE (local copy of the guide)
During the installation I've used the resources provided within the resources section. Here is shown my final configuration file.
cat /etc/pve/qemu-server/207.conf
agent: 0
args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -global nec-usb-xhci.msi=off -cpu host,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc,+pcid,+xsave,+xsaveopt,check
audio0: device=intel-hda,driver=spice
bios: ovmf
boot: order=virtio0
cores: 4
cpu: host
efidisk0: ssd-1TB:207/vm-207-disk-0.qcow2,efitype=4m,size=528K
machine: q35
memory: 16384
meta: creation-qemu=7.0.0,ctime=1666276060
name: MacOS.13
net0: vmxnet3=C2:63:A3:4E:7E:E7,bridge=vmbr0,firewall=1
numa: 1
ostype: other
scsihw: virtio-scsi-pci
smbios1: uuid=ac933204-a2a1-4915-aeee-60259bfb3fc1
sockets: 4
spice_enhancements: videostreaming=all
tablet: 1
tpmstate0: ssd-1TB:207/vm-207-disk-1.raw,size=4M,version=v2.0
usb0: spice,usb3=1
usb1: spice,usb3=1
usb2: spice,usb3=1
vga: qxl,memory=128
virtio0: local-lvm:vm-207-disk-0,discard=on,size=80G
vmgenid: 64c40db4-c6f3-4c42-b9ed-95a02e08fa15
# Tested args which provide worse performance
args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -global nec-usb-xhci.msi=off -cpu Penryn,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+avx2,+aes,+fma,+fma4,+bmi1,+bmi2,+xsave,+xsaveopt,check -device intel-hda,id=sound5,bus=pci.0,addr=0x18 -device hda-micro,id=sound5-codec0,bus=sound5.0,cad=0 -device hda-duplex,id=sound5-codec1,bus=sound5.0,cad=1 -device hda-output
- Note my Proxmox VE host is installed on Think Server TD350 with Intel Xeon E5-2673 v.3 and I do not need to pass much additional CPU args.
- I've tried with different Intel processor types and found that the Penryn type (used in the most internet guides) causes much greater CPU usage at the host level. IMO IvyBridge is better choice. Currently I'm using Hos type – in my case it is Haswell-EP architecture.
- In additional I've found that the number of the cores can't be greater than 4 (but you can increase the sockets if you want to pass more cores), otherwise the VM hangs at boot.
After moving the ProxmoxVE host to a machine based on AMD Ryzen 9 5900X 12-Core Processor, I was need to change some options. The correct args configuration I found within the section "Upgrading from macOS Monterey" of the article "Installing macOS 13 Ventura on Proxmox 7.2" in Nicholas Sherlock's blog. Below is my current configuration file.
cat /etc/pve/qemu-server/1050.conf
agent: 1
args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -global nec-usb-xhci.msi=off -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off -cpu Haswell-noTSX,vendor=GenuineIntel,+invtsc,+hypervisor,kvm=on,vmware-cpuid-freq=on
audio0: device=intel-hda,driver=spice
bios: ovmf
boot: order=virtio0
cores: 8
cpu: Haswell
cpuunits: 1024
efidisk0: local-lvm:vm-1050-disk-0,efitype=4m,size=4M
machine: q35
memory: 8196
meta: creation-qemu=7.0.0,ctime=1666276060
name: MacOS.13
net0: vmxnet3=26:B2:9C:37:29:26,bridge=vmbr0,firewall=1
numa: 0
onboot: 1
ostype: other
scsihw: virtio-scsi-pci
smbios1: uuid=de4a7e04-a553-413d-a136-a7218bdf95ae
sockets: 1
spice_enhancements: videostreaming=all
tablet: 1
tpmstate0: local-lvm:vm-1050-disk-1,size=4M,version=v2.0
usb0: spice,usb3=1
usb1: spice,usb3=1
usb2: spice,usb3=1
vga: qxl,memory=128
virtio0: local-lvm:vm-1050-disk-2,discard=on,size=80G
vmgenid: 1a90942a-6107-4ce6-ba04-50db6f01c986
Post Installation Setup
Currently I'm using Spice/QXL for display driver. Note there is not MacOS guest tool available and this is the reason we can't change the resolution within the guest.
Switch the Resolution while using SPICE/QXL
We can set different resolutions within the OpenCore EFI settings by the following steps (as reference see the section Configuring Booting Without OpenCore Mounted from the manual cited above).
- Use MountEFI and mount the EFI.
- Use the MacOS's file manager and navigate to the mounted EFI partition.
- Edit the file
EFI/OC/config.plist
– find and modify the following<string>
directive, note only one resolution will be accepted and the fallback resolution is that defined in the OVMF EFI settings.<key>Resolution</key> <string>1920x1080@32</string>
<string>1280x960@32</string>
<string>1280x960@16</string>
Here is a helper script that rotates two templates of EFI/OC/config-{1920x1080,1280x960}.plist
– note you need to prepare the templates that will be manipulated by the script.
nano ~/bin/change-resolution.sh
#!/bin/bash
# List the available devices
# diskutil list
function main() {
if [[ ! -z ${1+x} ]]
then
diskutil unmount /Volumes/efi 2>/dev/null
mkdir -p /Volumes/efi
mount -t msdos /dev/disk0s1 /Volumes/efi
sleep 1
if [[ -f /Volumes/efi/EFI/OC/config-${1}.plist ]]
then
echo "Template in use: /Volumes/efi/EFI/OC/config-${1}.plist"
sleep 1
cp /Volumes/efi/EFI/OC/{config-$1,config}.plist
sleep 1
diskutil unmount /Volumes/efi
reboot
exit
fi
diskutil unmount /Volumes/efi
fi
sleep 1
echo "Usage: $0 '1920x1080|1280x960'"
}
# https://unix.stackexchange.com/a/269080
FUNC=$(declare -f main)
sudo bash -c "$FUNC; main $@"
change-resolution.sh "1280x960"
Using other Display adapter types as "Standard VGA", "VMWare compatible" and "VirtIO-GPU" will allow you to change the resolution from the MacOS guest itself, but the Spice connection is much better than the VNC connection that you can use with these devices. Using these devices could be helpful if you using Team Viewer as client.
Change the OpenCore's Picker Settings
You can change the OpenCore's boot menu Picker options, via config.plist
file in the following way:
- Use MountEFI and mount the EFI.
- Use the MacOS's file manager and navigate to the mounted EFI partition.
- Edit the file
EFI/OC/config.plist
and modify the following directives:<key>ShowPicker</key> <true/> <!-- Set this to 'false' if you want to disable the picker --> <key>Timeout</key> <integer>5</integer> <!-- 0 will disable the timeout, currently it is 5 seconds -->
All available options are described within the OpenCore's Configuration manual (PDF file). Here is a video guide: How to skip OpenCore boot picker. Also for a convenience you can use the OpenCore Configurator tool.
Enable the Audio while using SPICE/QXL
In my case getting the audio operational is critical, because I'm actually doing this setup for browser compatibility tests of web pages and other applications. Otherwise the flash videos and HTML 5 videos fails in Safari.
So I've tested the following successful solutions:
- Setup dummy output by the help of Soundflower (YouTube):After that open System Settings and at the bottom of the Privacy & Security menu allow the usage of Soundflower and restart.
brew install Caskroom/cask/soundflower
- Use Team Viewer: Install team Team Viewer Host application (or the full application) it will set an Aggregate audio device. Setup the application to accept direct LAN connections and use Team Viewer as client to connect to the guest via its IP. I think having dummy output setup by Soundflower increases the audio quality and availability via Team Viewer.
- Use Spice client:
- Pass an audio device from the remote instance: Within the Spice client attach some USB audio device – i.e. Bluetooth adapter and connect Headphones to that device from the guest MacOS. In this case you should create enough number of USB devices which use Spice driver within the Proxmox's VM configuration.
- Setup VoodooHDA as it is shown in the following section.
Setup VoodooHDA and Make the Audio Available within Spice
A good clue how to install VoodooHDA on MacOS 13 Venture is provide by Yahgoo at GitHub: Install VoodooHDA for Big Sur and Monterey. Here are the exact steps that I've performed.
1. First we will install the latest built version (currently 2.9.2) provided within the Chris1111's repository: VoodooHDA OC. This is the easiest way to get VoodooHDA's preferences pane operational. The repository is little bit outdated but the PrefPane is not changed since 2018. At all this step is optional.
Download the file VoodooHDA OC.dmg.zip. Then run the contained package. You will need to open System Settings and at the bottom of the Privacy & Security menu allow the usage of VoodooHDA OC.dmg. After that go back to the file and run the package again. Follow the video guide provided by the author. Note you may need interact again with System Settings > Privacy & Security.
1. Reboot the system and within OpenCore's Picker choice Recovery mode. Then disable Disable System Integrity Protection Temporarily otherwise later when we need to use kmutil
you will expire the error "Bad code signature". Once you are in the recovery mode, launch Terminal from the Utilities menu (from the top bar). and execute the following commands.
csrutil clear
csrutil disable
csrutil authenticated-root disable
reboot
3. After the reboot use MountEFI or mount EFI manually as it is shown below. Use diskutil list
to find which is your EFI device – in my case it is disk0s1
.
sudo mkdir -p /Volumes/efi
sudo mount -t msdos /dev/disk0s1 /Volumes/efi
4. Then use the file explorer and navigate to the EFI/OC
directory.
5. Use the OpenCore Configurator app and open the file EFI/OC/config.plist
. You will need to open System Settings and at the bottom of the Privacy & Security menu allow the usage of OpenCore Configurator.
6. Within the OpenCore Configurator navigate to the NVRAM section and find the entry csr-active-config
. Make sure its value is 0x0285
or 000285
. (My original value was 260F and to be honest haven't tried the following steps without changing it.) Save the file and close the configurator application.
7. Download VoodooHDA. At the time I'm writing the article the latest version is 3.0.1.
8. Open a terminal window and execute the following commands.
sudo cp -R ~/Downloads/VoodooHDA.kext /Volumes/efi/EFI/OC/Kexts
sudo cp -R ~/Downloads/VoodooHDA.kext /Library/Extensions
9. Run the following command.
sudo kmutil load -p /Library/Extensions/voodooHDA.kext
Then: 1) Go to System Settings and at the bottom of the Privacy & Security menu allow the usage of VoodooHDA. 2) Restart the MacOS.
10. That's it. After the reboot the sound controller should be available:
- Check System Settings > Sound, and System Information > Audio.
- Check the sound via a Spice connection.
References
Resouces
- RuTracker.org: MacOS Ventura 13.0 Beta 8 [ISO] [Intel/Apple]
- Corpnewt at GitHub: MountEFI
- Thenickdude at GitHub: KVM OpenCore
- Softpedia: Hackintool (mac) download
- Mackie 100 projects: OpenCore Configurator
- Source Forge: VoodooHDA
- Chris1111 at GitHub: VoodooHDA‑2.9.2‑Clover | VoodooHDA-OpenCore > Download
- InstanelyMac: VoodooHDA 3.0.1 Discussion
MacOS usage
- Digital Ocean: How To Install and Use Homebrew on macOS
- Ask Different: Does MacOS have equivalent command line tools like
lshw
orlspci
? - Sickcodes at GitHub: OSX-optimizer (i.e. Skip the GUI login screen…)
- The Mac Admin: Mounting the EFI Boot Partition on MacOS X
- Rocket Yard: How to make your drive icons show up in MacOS
Miscellaneous
- Another useful guide provided by Austin's Nerdy Things:
- Nicholas Sherlock: My MacOS Monterey / Proxmox setup
- Mac Ports: Quick start | spice-server
- Unix and Linux: Long line wrapping in Nano
- ProxmoxVE Wiki: Manual: qm.conf
- ProxmoxVE Wiki: SPICE