I kind of understand the concept of vcpu. You can assign as many vcpus as you like and the scheduler will assign a VM’s tasks to on the same number of physical cpus if they are available. If physical cpus are not available, those tasks basically wait until the assigned cpu is free.
So, what is the significance of assigning a cpu value and a vcpu value in a VM template? For example, what does it mean if I assign 1 cpu and 4 vcpu? and vice versa. Thanks!
CPU: amount of the host cpu reserved for this VM. This is used by the scheduler, and it guides the number of VMs sento to a host.
A host with 4 cores (shown as cpu = 400) can run
1 vm with cpu=4
or 2 VMs with cpu=2
or 8 VMs with cpu=0.5
This value has no effect on the actual VM at the hypervisor level.
vCPU: defines the number of cpus for the actual VM. Or put another way: number of cpus that the guest sees. This value has no effect on the VM placement or quota usage.
Perfect explanation. Is there a way to not display CPU value in the template and instead display the vCPU? Considering your last example, when user clicks on a template with 0.5 CPU and 8 vCPU what he sees in capacity section is CPU 0.5 even though inside the VM shows 8 cores.