Ubuntu – How to test KVM guest CPU maximum allocation limit

central-processing-unitkvm-virtualizationUbuntu

Running Ubuntu 13.04 Host and vm Guest.
Using virtio for hdd, nic. Max-allocaion CPU cores is 6, minimum is 2.
here is a screenshot for clarification: http://i.imgur.com/GmYQBMP.png

Ive made a vm with virt-manager just to play with, and to test out kvm.
Alright, I have a decent understand how the memory balloon driver works, but I still dont know how to test if the guest OS can utilize the max setting for cpu cores. From what i gather, the host will start one thread of qemu for each core allocated per vm.

When i run htop inside the guest, it only shows two cores. (also here is the output of cat /proc/cpuinfo: https://gist.github.com/anonymous/93a361545130923537da )

How can I "force" the guest to allocate the other 4 cores so that it can show 6 cores in htop?
Is there a way to do this?

Best Answer

There is no max-min allocation, you allocate a specific number and that's it. The "min-max" you see is what is allocatable, if you don't pick a number, you will get the minimum, which is "2" in this case. If you want to allocate 6 cores to the VM, you need to explicitly do that