我是一名 Arch Linux 用户。我从如何使用 qemu 启动物理 Windows 分区?使用来自的 QEMU 设置repo 的 shell 脚本文件并修改为:
qemu-system-x86_64 \
-enable-kvm \
-m 8G \
-machine q35,accel=kvm \
-smp cores=4,threads=4,sockets=1 \
-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 virtio \
-device ich9-intel-hda -device hda-output \
-usb -device usb-kbd -device usb-mouse \
-device qemu-xhci,id=xhci -device usb-host,bus=xhci.0,vendorid=0x14cd,productid=0x6116 \
-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=none,format=qcow2,file=ESP.qcow2 \
-device ide-hd,bus=sata.2,drive=ESP \
-drive id=SystemDisk,if=none,file=/dev/sdf \
-device ide-hd,bus=sata.4,drive=SystemDisk \
我的高清fdisk
:
Disk /dev/sdf: 465,78 GiB, 500107860992 bytes, 976773166 sectors
Disk model: Storage Device
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: D61073AE-0D2D-40E6-BEBB-6D80D02E3E36
Device Start End Sectors Size Type
/dev/sdf1 40 409639 409600 200M EFI System
/dev/sdf2 409640 975503591 975093952 465G Apple HFS/HFS+
/dev/sdf3 975503592 976773127 1269536 619,9M Apple boot
我收到了错误:
WARNING: Image format was not specified for '/dev/sdf' and probing guessed raw.
Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Specify the 'raw' format explicitly to remove the restrictions.
ALSA lib pcm_dmix.c:1090:(snd_pcm_dmix_open) unable to open slave
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
ALSA lib pcm_dmix.c:1090:(snd_pcm_dmix_open) unable to open slave
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `dac'
我也尝试使用该设置-drive id=SystemDisk,if=none,file=/dev/sdf,format=raw,media=disk \
,但没有成功。