Description of problem: Creating a VM with 2 cpus, gets created with only 1 cpu. Version-Release number of selected component (if applicable): CNV-1.3 How reproducible: When trying to create a VM with cpu-manager enabled as per the 2nd option, https://github.com/kubevirt/user-guide/blob/master/workloads/virtual-machines/dedicated-cpu.md#requesting-dedicated-cpu-resources The below format does not result in 2 cpus. I used this YAML format, which causes the issue. apiVersion: kubevirt.io/v1alpha2 kind: VirtualMachineInstance spec: domain: cpu: dedicatedCpuPlacement: true resources: limits: cpu: 2 memory: 2Gi Steps to Reproduce: 1. Create a VM with above vm spec. 2. 3. Actual results: Expected results: Creation of the VM with 2 cpus, when checked vi nproc or cat /proc/cpuinfo. Additional info: I had enabled and configured my setup with cpu-manager feature-gates. https://github.com/kubevirt/kubevirt/issues/1602
https://github.com/kubevirt/kubevirt/pull/1604 the fix from above kubevirt issue, seems to be this.
(In reply to Kedar Bidarkar from comment #1) > https://github.com/kubevirt/kubevirt/pull/1604 the fix from above kubevirt > issue, seems to be this. Yep. This PR is already part of the release-0.9 branch.
Created attachment 1504671 [details] VMI Fedora28 cloud resources Tried by using the attached vm-spec file, but still see only 1 vcpu in the created VM. [fedora@vmi-fedora28-cloud-res ~]$ cat /proc/cpuinfo | grep -i ^processor | wc -l 1 [fedora@vmi-fedora28-cloud-res ~]$ TESTED with CNV-1.3.0-11 /kubevirt-0.9.5
Kedar, please provide `kubectl get -o yaml VMNAME` for the running VM.
Created attachment 1504681 [details] output of vmi with -o yaml Output via, "oc get vmi vmi-fedora28-cloud-res -o yaml"
Can you please try: apiVersion: kubevirt.io/v1alpha2 kind: VirtualMachineInstance spec: domain: cpu: cores: 2 dedicatedCpuPlacement: true … Without limits/requests.
Without limits and requests it does work fine.
spec.domain.cpu_cores approach works fine as expected; but spec.domain.resources.requests.cpu does not work and hence this bug.
I checked this with CNV-1.4 and it works fine now, I feel we can now move this to MODIFIED state. Will be attaching the results for the same shortly.
Created attachment 1520556 [details] CPU resources requests limits works fine
moving to Verified based on comment #13
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2019:0417