Closed devimc closed 6 years ago
workaround: set default_vcpus=2 in configuration file
I think the 96
is probably coming from:
It's a shame that:
qemu-system-arm
has this limitation.qemu
doesn't provide a way to dump out such limits.
If it did, we could query it at build time and then take the lower of the build-time and runtime values.
yes, I guess that 96 is the number of physical 'cpu's on the host, and the qemu can't handle it (as you say, sadly). The workaround of modifying the toml is valid, but a little limiting. It will do for now I think though.
Well in case of ARM, we can find the maximum of CPUs that can be used by Qemu, and put that into a constant into virtcontainers qemu.go
.
And in case we use qemu for ARM, we check the number of CPUs requested, that we cast to this max.
Yes, we could do that. But what happens when qemu raises the limit on ARM? We might not notice and the user will be artificially limited to a smaller number of cpus.
@devimc - could you paste in the full qemu command-line? I've done a bit of digging and it appears that to overcome this limitation, we need to be running qemu with:
-machine virt,gic-version=$value,accel=kvm
The default $value
of gic-version
is 2
, which seems to be limited to 8 cpus. Since your system appears to have 96 cpus, we need to set either gic-version=3
or gic-version=host
(better).
Ah - I see you already have that fix in https://github.com/containers/virtcontainers/pull/614 ;)