QEMU(hvf加速)在macOS Catalina下启动Linux镜像挂起求助
Let me break down your problem and share some practical fixes I’ve tested for similar HVF-related snags on macOS Catalina:
Your Current Scenario
You’re using a patched QEMU (with HVF replacing KVM) and hitting these roadblocks with Linux ISOs:
- Linux Mint 18.4 (x64): Boots to the menu, but gets stuck on a blinking cursor when launching the installer; verbose mode hangs at
clocksource: switched to clocksource tsc - CentOS: Verbose mode flashes briefly then exits abruptly
- Kali Linux: Shows nothing but a black screen, no cursor
Adding the notsc kernel parameter only shifted Mint’s hang point to PCI Interrupt Link [LNKB] enabled at IRQ 10, with no improvement for CentOS or Kali. Your launch command is:
qemu-system-x86_64 \ -m 4096 \ -show-cursor \ -vga virtio \ -usb \ --device usb-tablet \ -enable-kvm \ -cdrom ./linuxmint.iso \ -drive file=./mint.qcow2,if=virtio \ -accel hvf \ -cpu max
Fixes to Try
1. Ditch -enable-kvm — it’s conflicting with HVF
The -enable-kvm flag is built for KVM-based virtualization, but you’re explicitly using -accel hvf here. Having both can cause low-level conflicts. Remove -enable-kvm entirely and restart.
2. Tone down the CPU configuration
-cpu max enables every possible CPU feature, which often causes compatibility headaches with older Linux kernels (like those in Mint 18.4 and older CentOS builds). Try these alternatives:
-cpu host: Maps your Mac’s actual CPU features directly, reducing simulation overhead and conflicts- If
hoststill fails, use a specific CPU model matching your Mac (e.g.,-cpu Broadlakefor 6th-gen Intel,-cpu Skylake-Clientfor 7th-gen+)
3. Swap out the VGA driver
-vga virtio is great for modern distros, but it’s hit-or-miss with older ones. Test these options:
-vga std: Uses basic VGA emulation — it’s slow but almost universally compatible-vga qxl: Better for desktop environments than std, with smoother window handling- For Kali, add
-display cocoa,gl=onto enable hardware-accelerated graphics, which often fixes black screen issues
4. Combine more targeted kernel parameters
notsc alone might not be enough. Try these parameter sets for each distro:
- Mint 18.4: When at the boot menu, press
eto edit, then addnotsc no_timer_check clocksource=hpetto the kernel line - CentOS: Add
nomodesetto disable automatic graphics driver loading (prevents early boot crashes) - Kali: Replace
quiet splashwithnomodeset vga=791(forces 1024x768 resolution) to bypass black screen issues
5. Simplify your disk setup temporarily
The combination of a live ISO and virtio disk might be triggering controller conflicts. Try:
- Removing the
-driveparameter entirely to boot just the live ISO — if this works, the issue is with the virtio disk configuration - If you need the disk, swap
if=virtiowithif=ide(IDE controllers have broader compatibility with older distros)
6. Verify your QEMU patch and version
Make sure your patched QEMU is properly compiled for HVF on Catalina:
- Double-check that you ran
./configure --enable-hvfduring compilation - Try updating to the latest stable QEMU version with HVF patches — newer builds fix many clock and hardware emulation bugs that plague older versions
内容的提问来源于stack exchange,提问作者Timothy Muscat

