跳转至

修正配置

参数修正

我们之前 macOS 的虚拟机的 ID 为 103,所以我们可以通过这个 ID 直接来编辑虚拟机的配置( Web 界面功能有限,直接编辑配置可以更灵活定制):

Bash
nano /etc/pve/qemu-server/103.conf 

根据自己的 CPU 类别,在第 1 行添加如下配置:

macOS < 13.X

  • intel CPU
INI
args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -cpu host,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc
  • AMD CPU
INI
args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -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

macOS = 13.X Ventura

如果您的 CPU 不支持,或者您希望能够在 Proxmox 节点之间迁移正在运行的 VM,则可以从 -cpu 列表中删除“+invtsc”功能。

  • intel CPU
INI
args: -device isa-applesmc,osk="THE-OSK-YOU-EXTRACTED-GOES-HERE" -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 host,vendor=GenuineIntel,+invtsc,+hypervisor,kvm=on,vmware-cpuid-freq=on
  • AMD CPU
INI
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

修改 CD 光盘

接着修改我们的 CD 光盘配置,删掉「media=cdrom」换成「cache=unsafe」,最终的配置效果如下:


最后更新: 2023-03-06