I've seen that people run VMs with KVM and QEMU Virtual CPUs but when I'm creating a VM using virt-manager it only show my real cpu cores not virtual CPUs. how can I activate QEMU Virtual CPU?



When you configure a VM it gives you the option of assigning a number of CPU's. These -are- virtual CPU's. Generally the configuration presents these CPU's as copies of what the physical host contains but you do have the option of selecting a different CPU type, assuming that type is compatible with the physical hardware in the box.

| improve this answer | |
  • Thanks, I have a Corei7 with 8 cores, and when I'm creating a VM, maximum core number is 8, so can I create 6 VMs that each one of them has 4 cores? (totally 24 cores) – Zim3r Jun 29 '12 at 18:42
  • Yes - the total number of cores in all VM's can exceed the number of cores in the box. One of the hypervisor's main jobs is managing this CPU oversubscription. – rnxrx Jun 29 '12 at 18:45
  • Thanks again, what about RAM? can I assign more than what I have already to VMs ? – Zim3r Jun 29 '12 at 18:50
  • I believe you're limited to the amount of physical memory for any given VM but you can (as in the case of CPU) overcommit memory. So, for example, you could allocate 4G of RAM to 16 VM's on a physical host with only 4G, but to do so is a horrible idea. The concept with virtualization is that not all vm's are active at the same time and, as such, idle capacity from one instance can be applied to another. The aggressiveness with which these resources are (over)allocated varies tremendously based on specific requirements. – rnxrx Jun 29 '12 at 19:53
  • Now I understand. Thanks a lot, It's really nice of you. – Zim3r Jun 29 '12 at 20:09

I don't see why you should use the QEMU vCPU on a single host. It is really there for baseline compatibility for live migration between several different hosts. As for overcomitting, you can, but whether or not you should is a different question. It all depends on the actual loads the VMs are running.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.