PVE Guest MacOS 13 Venture Setup: Difference between revisions

From WikiMLT
Line 55: Line 55:
<string>1280x960@16</string>
<string>1280x960@16</string>
</syntaxhighlight>
</syntaxhighlight>
Here is a helper script that rotates two templates of <code>EFI/OC/'''config-{1920x1080,1280x960}.plist'''</code> - note you need to prepare the two templates.<syntaxhighlight lang="shell" line="1">
Here is a helper script that rotates two templates of <code>EFI/OC/'''config-{1920x1080,1280x960}.plist'''</code> - note you need to prepare the two templates.
<syntaxhighlight lang="shell" line="1">
nano ~/bin/change-resolution.sh
nano ~/bin/change-resolution.sh
</syntaxhighlight><syntaxhighlight lang="bash" line="1">
</syntaxhighlight>
<syntaxhighlight lang="bash" line="1" class="code-continue">
#!/bin/bash
#!/bin/bash


Line 94: Line 96:
FUNC=$(declare -f main)
FUNC=$(declare -f main)
sudo bash -c "$FUNC; main"
sudo bash -c "$FUNC; main"
</syntaxhighlight><syntaxhighlight lang="shell" line="1">
</syntaxhighlight>
<syntaxhighlight lang="shell" line="1" class="mlw-shell-gray">
change-resolution.sh "1280x960"
change-resolution.sh "1280x960"
</syntaxhighlight>'''2.''' Using other Display adapter types as "Standard VGA" and "VirGL 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.
</syntaxhighlight>
 
'''2.''' Using other Display adapter types as "Standard VGA" and "VirGL 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.


Currently I couldn't able to setup any audio device for my MacOS guest, but I need at least dummy sound because otherwise flash videos and HTML5 videos fails in Safari and I'm actually doing this setup for browser compatibility tests of a web page. So the workarounds I've found are the following:
Currently I couldn't able to setup any audio device for my MacOS guest, but I need at least dummy sound because otherwise flash videos and HTML5 videos fails in Safari and I'm actually doing this setup for browser compatibility tests of a web page. So the workarounds I've found are the following:

Revision as of 17:46, 24 October 2022

Prox­mox Set­up and Ma­cOS In­stal­la­tion

Great man­u­al pro­vid­ed by i12bretro which I've used to in­stall Ma­cOS 13 Ven­ture:

Be­low is shown my fi­nal con­fig­u­ra­tion file.

cat /etc/pve/qemu-server/207.conf
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
audio0: device=ich9-intel-hda,driver=spice
bios: ovmf
boot: order=virtio0
cores: 4
cpu: Penryn
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: MacOS13
net0: vmxnet3=C2:63:A3:4E:7E:E7,bridge=vmbr0,firewall=1
numa: 0
ostype: other
scsihw: virtio-scsi-pci
smbios1: uuid=ac933204-a2a1-4915-aeee-60259bfb3fc1
sockets: 4
spice_enhancements: foldersharing=1,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: host=0bda:8179,usb3=1
vga: qxl,memory=128
virtio0: local-lvm:vm-207-disk-0,discard=on,size=80G

Pot In­stal­la­tion Set­up

Cur­rent­ly I'm us­ing Spice/​​​QXL for dis­play dri­ver. Note there is not Ma­cOS guest tool avail­able and this is the rea­son we can't change the res­o­lu­tion with­in the guest.

Switch the Res­o­lu­tion while us­ing SPICE/QXL

We can set dif­fer­ent res­o­lu­tions with­in the Open­Core EFI set­tings by the fol­low­ing steps (as ref­er­ence see the sec­tion Con­fig­ur­ing Boot­ing With­out Open­Core Mount­ed from the man­u­al cit­ed above).

  • Use Moun­tE­FI and mount the EFI.
  • Use the MacOS's file man­ag­er and nav­i­gate to the mount­ed EFI par­ti­tion.
  • Ed­it the file EFI/OC/config.plist – find and mod­i­fy the fol­low­ing <string> di­rec­tive, note on­ly one res­o­lu­tion will be ac­cept­ed and the fall­back res­o­lu­tion is that de­fined in the OVMF UE­FI set­tings:
    <key>Resolution</key>
    <string>1920x1080@32</string>
    
    <string>1280x960@32</string>
    
    <string>1280x960@16</string>
    

Here is a helper script that ro­tates two tem­plates of EFI/OC/config-{1920x1080,1280x960}.plist – note you need to pre­pare the two tem­plates.

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"

2. Us­ing oth­er Dis­play adapter types as "Stan­dard VGA" and "Vir­GL GPU" will al­low you to change the res­o­lu­tion from the Ma­cOS guest it­self, but the Spice con­nec­tion is much bet­ter than the VNC con­nec­tion that you can use with these de­vices. Us­ing these de­vices could be help­ful if you us­ing Team View­er as client.

Cur­rent­ly I couldn't able to set­up any au­dio de­vice for my Ma­cOS guest, but I need at least dum­my sound be­cause oth­er­wise flash videos and HTML5 videos fails in Sa­fari and I'm ac­tu­al­ly do­ing this set­up for brows­er com­pat­i­bil­i­ty tests of a web page. So the workarounds I've found are the fol­low­ing:

  • Use Team View­er: In­stall team Team View­er Host ap­pli­ca­tion (or the full ap­pli­ca­tion) it will set an Ag­gre­gate au­dio de­vice. Set­up the ap­pli­ca­tion to ac­cept di­rect LAN con­nec­tions and use Team View­er to con­nect to the guest via its IP. In this case you should re­move any sound de­vices form the Proxmox's VM con­fig­u­ra­tion, or if you have a sound de­vice de­vice it shouldn't use the Spice dri­ver, oth­er­wise no sound will come from Team View­er.
  • Use Spice client: With­in the Spice client at­tach some USB au­dio de­vice – i.e. Blue­tooth adapter and con­nect Head­phones to that de­vice from the guest Ma­cOS. In this case you should cre­ate enough num­ber of USB de­vices which use Spice dri­ver with­in the Proxmox's VM con­fig­u­ra­tion. Al­so of course you should use SPICE/QXL as Dis­play adapter.

3. You can change the OpenCore's boot menu Pick­er op­tions, via config.plist file in the fol­low­ing way:

  • Use Moun­tE­FI and mount the EFI.
  • Use the MacOS's file man­ag­er and nav­i­gate to the mount­ed EFI par­ti­tion.
  • Ed­it the file EFI/OC/config.plist and mod­i­fy the fol­low­ing di­rec­tives:
    <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 avail­able op­tions are de­scribed with­in the OpenCore's Con­fig­u­ra­tion man­u­al (PDF file).

Down­load Links

Ma­cOS us­age ref­er­ences:

Misc Ref­er­ences