linux-meta-kvm kernel has CPU count capped at 64
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxd |
New
|
Undecided
|
Unassigned | ||
linux-meta-kvm (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
The linux-kvm kernel appears to have a hard-coded limit of 64 configured CPUs regardless of what is configured on the hypervisor (LXD/QEMU) side. I believe this includes images in the lxd ubuntu: image remote ( https:/
This is preventing LXD VMs being configured with more than 64 vCPUs. This is affecting cloud images with this -kvm kernel pre-installed, so 22.04 LTS and below.
If we are unable to fix this in -kvm, then the request here would be to re-generate these images to instead use the -generic or -virtual kernels.
Workaround
---
With that said, the workaround is to simply install either the linux-virtual or linux-generic metapackages as they in turn install the generic kernel that does not have this limitation.
Repro
---
Configure a 70 cpu VM using the ubuntu:jammy image
$ lxc launch ubuntu:jammy testvm --vm -c limits.memory=12GB -c limits.cpu=70
$ lxc config get testvm limits.cpu
70
$ lxc exec testvm -- nproc
64
looking at this closer, maybe something resolved with the LXD team
The ubuntu: repo here: https:/ /cloud- images. ubuntu. com/releases/ jammy/release/ already has the generic image alongside the -kvm kernel ones
Perhaps maybe LXD can be made to point ubuntu:<release> to these non-kvm builds instead? Not sure if the stock cloud images are going to be compatible with the distorbuild versions though.