Closed yangxiaoliang closed 8 months ago
Looks like you didn't tell vm to use dedicated cpu in the first place, you might want to add dedicatedCpuPlacement: true
in spec.domain.cpu
, then ensure your node affinity will correct filter out node that use cpu manager with static policy
or your vm will be result in pending. Please see https://kubevirt.io/user-guide/virtual_machines/dedicated_cpu_resources/ for detail
Looks like you didn't tell vm to use dedicated cpu in the first place, you might want to add
dedicatedCpuPlacement: true
inspec.domain.cpu
, then ensure your node affinity will correct filter out node that usecpu manager with static policy
or your vm will be result in pending. Please see https://kubevirt.io/user-guide/virtual_machines/dedicated_cpu_resources/ for detail
Thanks for your reply @simonyangcj , actually we don't want the cpu pinning happens ...
my apologizes, this seems like might relate to kubernetes cpu manager. Does this host enable cpu manager. Please run cat /var/lib/kubelet/cpu_manager_state
to checkout whether cpu manager is enabled
my apologizes, this seems like might relate to kubernetes cpu manager. Does this host enable cpu manager. Please run
cat /var/lib/kubelet/cpu_manager_state
to checkout whether cpu manager is enabled
Paste the result as below:
this means the cpu manager is not eanbled ?
and from the cgroup settings, the virt-launcher pod not been pinned to any cores:
following is the kubelet start command:
You r right, CPU manager is not enabled. But your kubelet config looks a bit odd, i checked kubelet 1.16 doesn't seem like there are a config --cpuset-cpus
, I assume it might has something to do with it. Another possibility is OS level CPU isolation you might want give a check.
We discussed this on the KubeVirt community meeting; it would be helpful if you upgrade to supported versions of K8s and KubeVirt to gain more community support. Please review https://github.com/kubevirt/kubevirt/blob/9cf6dbb3e33c9ec9e9af8b18eb115c7fb9f7c311/docs/release.md?plain=1#L27C19-L27C19
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
/close
@kubevirt-bot: Closing this issue.
What happened: Created 5 VMs with flavor 4c/4g/100g on a host, once all the 5 VMs started, then execute command
taskset -pc ${vm-pid}
in order to get the cpu pinning info, but I got an unexpected result as the vCPU of all the 5 VMs were pinned to the first 2 cores. The result shown in below picture:What you expected to happen: The vCPU of VM can be pinned to different cores OR Don't pinning.
How to reproduce it (as minimally and precisely as possible):
Create 5 VMs with yaml like below:
Additional context:
VMI Yaml:
virt-launcher Pod Yaml
VM XML
the output of
lscpu
from host:Environment:
virtctl version
): v0.43.0kubectl version
): 1.16uname -a
): Linux hh-hulk-k8s-ep-test189.mt 4.18.0-147.mt20200626.413.el8_1.x86_64 #1 SMP Fri Jun 26 10:27:19 CST 2020 x86_64 x86_64 x86_64 GNU/Linux