Reputation: 49
Attempting to boot from a Live Linux Mint 18.4 (x64) ISO using QEMU under macOS Catalina (with patches to use hvf as hypervisor in place of kvm). I am able to get as far as the boot menu, but attempting to boot into the installer leaves me with a blinking cursor. Booting in verbose mode, I see it hangs at:
clocksource: switched to clocksource tsc
I have also attempted to boot a CentOS and Kali iso. The CentOS VM exits abruptly when booted in verbose mode after a flash of text too fast for me to read, whereas the Kali iso merely shows a black screen, without even a blinking cursor.
I attempted to also boot with the notsc kernel flag enabled, this however merely caused the Mint ISO to hang at
PCI Interrupt Link [LNKB] enabled at IRQ 10
instead, and made no apparent difference in the case of the Kali and CentOS isos.
I'm unsure if this is specifically an hvf issue, but any suggestions are welcome.
These are the command parameters I am launching my VM with.
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
Upvotes: 2
Views: 11611
Reputation: 234
I have had similar issues when using the hvf
accelerator with CPU host passthrough.
When I try to boot the Ubuntu 20.04.1 desktop installer ISO, I get a kernel panic immediately after the boot loader's splash screen.
Using QEMU 5.1 from HomeBrew, I have had success emulating the CPU by using the default qemu64 CPU model.
To explicitly use the emulated CPU, your command-line would look as follows:
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 qemu64
A response to my bug report solved this for me.
Ubuntu 20.04 was crashing because it attempted to use the RDTSCP feature which is supported by the CPU.
The problem is that Hyperkit.Framework fails to pass this feature through, leading to the crash.
If your crash is due to RDTSCP, then the you should be able to fix this by disabling this option.
Disabling this specific feature can be done by providing the CPU type, host
, followed immediately by ,-rdtscp
, like so:
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 host,-rdtscp
Upvotes: 2