我已经在我的 WSL2 子系统上启用了 KVM 支持,该子系统在 Windows 10 64 位之上运行,并且我尝试启动 mac os X。遗憾的是它不起作用,因为这个错误:
root@DESKTOP-N9UN2H3:/mnt/i/macos-haxm# qemu-system-x86_64 -monitor stdio -no-reboot -machine q35 -m 16G -usb -device usb-kbd -device usb-tablet -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -drive if=pflash,format=raw,readonly,file=/mnt/i/macos-haxm/OVMF_CODE.fd -drive if=pflash,format=raw,file=/mnt/i/MacOS-Haxm/OVMF_VARS-1024x768.fd -smbios type=2 -device ich9-intel-hda -device hda-duplex -device ide-drive,bus=ide.2,drive=Clover -drive id=Clover,if=none,snapshot=on,format=qcow2,file=/mnt/i/MacOS-Haxm/Clover.qcow2 -device ide-drive,bus=ide.1,drive=LinuxHDD -drive id=LinuxHDD,if=none,file=/mnt/i/MacOS-Haxm/images/hdd_catalina.img,format=qcow2 -device ide-drive,bus=ide.0,drive=LinuxDVD -drive id=LinuxDVD,if=none,snapshot=on,media=cdrom,file=/mnt/i/MacOS-Haxm/images/apple/highsierra.iso -netdev tap,id=net0,ifname=tap0,script=no,downscript=no -device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:c9:18:27 -accel kvm
QEMU 4.2.0 monitor - type 'help' for more information
(qemu) qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5181:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5181:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `dac'
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5181:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5181:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `adc'
qemu-system-x86_64: -device ide-drive,bus=ide.2,drive=Clover: warning: 'ide-drive' is deprecated, please use 'ide-hd' or 'ide-cd' instead
qemu-system-x86_64: -device ide-drive,bus=ide.1,drive=LinuxHDD: warning: 'ide-drive' is deprecated, please use 'ide-hd' or 'ide-cd' instead
qemu-system-x86_64: -device ide-drive,bus=ide.0,drive=LinuxDVD: warning: 'ide-drive' is deprecated, please use 'ide-hd' or 'ide-cd' instead
**(qemu) qemu-system-x86_64 : warning : host does not support requested feature : CPUID.80000001H:ECX.svm [bit 2].**
有办法解决这个问题吗?检查下图,谢谢。
答案1
macOS 设计为仅在 Apple 硬件上运行,因此它仅支持特定硬件。模拟硬件可能不受支持。
有项目可以在虚拟机中运行 macOS,但请注意,macOS 的许可证仅允许其在 Apple 硬件上运行,因此这样做在您所在的司法管辖区可能合法,也可能不合法。