qemu default selected CPU

CanadaGuy

Well-Known Member
Nov 19, 2019
53
6
48
42
I'm trying to wrap my head around the CPU instruction sets exposed by Qemu (KVM?). It seems that the default selected cpu of kvm64 seems like a poor choice for a remotely modern CPU, and now causes issues with RHEL 9 OSes:

https://www.qemu.org/docs/master/system/i386/cpu.html

https://developers.redhat.com/blog/...level#architectural_considerations_for_rhel_9

I don't want to start a philosophical debate, I'd just like to understand the default, and perhaps if there is a way to configure a new default for new VMs? Is there a reason the highest instruction set supported by the host isn't selected by default? I have read there are live migration issues that drive CPU selection among a clusters, but I'm wondering what (if any) else there is?
 
It's for compatibility reasons. To quote the docs:
This has a downside though. If you want to do a live migration of VMs between different hosts, your VM might end up on a new system with a different CPU type. If the CPU flags passed to the guest are missing, the qemu process will stop. To remedy this Qemu has also its own CPU type kvm64, that Proxmox VE uses by defaults. kvm64 is a Pentium 4 look a like CPU type, which has a reduced CPU flags set, but is guaranteed to work everywhere.

If you have just a single machine and want the best performance, cpu=host is usually what you want. If you have a cluster and require live migration, you probably want to setup a custom cpu type.

You can't set a default (at least not without modifying the code, which actually shouldn't be too difficult). As a workaround, you can create a template VM and clone that.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!