"CPU model 'host' requires KVM or HVF"
…
This is not the most useful error message I have ever seen
Discussion
"CPU model 'host' requires KVM or HVF"
…
This is not the most useful error message I have ever seen
Okay so it appears KVM is the standard VM management layer on Linux, and HVF is the standard VM management layer on MacOS.
This makes the error message seem the more curious, because I got the error on Windows. Is what the error message really saying "You cannot use -cpu host on Windows"?
UPDATE: The fix turned out to be to simply remove "-cpu host" from my invocation. "-cpu host" appears to be banned on Windows, but omitting -cpu entirely is allowed.
I think what I"m suppsoed to do here is figure out which of a hundred or so x86_64 micro variations I have, like there's some specific string that corresponds to the exact i5 I have, you can get a list of the strings by running `qemu -cpu help` but I don't know how to figure out which one is correct
But it lets me say nothing. OK
@mcc I think this is so you can "teleport" a VM between hosts. You can't change the CPU features once the guest has started so you may want to offer a restricted set so that the running instance can be moved to another machine without compatibility problems.
@mcc I might be wrong, but I think that -cpu host might require hardware virtualisation, because only in that case can it just pass through the actual feature set of the host CPU (it's not a simulation), whereas with the software virtualisation it is emulating a CPU and it can't just match the host one (after all, the host CPU very likely has features that QEMU can't emulate)
@hikari then what does it do if I don't pass -cpu ?
@mcc that would be my read, yeah.
if you're using WHPX (-accel whpx) on x86_64 I'm 99% sure you can omit the `-cpu host` flag because I do not remember needing to touch that when I last used it.
@gsuberland @mcc If I remember correctly, not setting the CPU type and/or flags, I’ve had issues with it where it would not advertise AVX etc to the guest OS
@mcc -accel whpx probably, depending on what features you have turned on in Windows.
I hit several bugs with this option.
-accel help *may* work - I don't have QEMU on my current machine and the Windows binaries I have access to are several months out of date.
@mcc did you actually enable kvm? (-accel kvm)
no, it doesn't do that automatically
@mcc@mastodon.social @r@glauca.space @QuaternionCats@sleeping.town host emulation requires hardware virtualization
hardware virtualization requires HAXM on Windows, which you must install yourself, and requires Hyper-V support to be removed, and also Qemu dropped support for it in 8.0 so if you're running that or newer then hardware virtualization is not possible
if reproducing your bug does not require host emulation then you can just set the cpu model manually, e.g. with -cpu SandyBridge
@linear @mcc @QuaternionCats @r HAXM has been unnecessary since 2018, unmaintained since 2023, and no longer functional since 2025
@mcc HVF is macOS Hypervisor Framework (which I had to look at recently for something)