Change the default path of the kubelet pod

31 views
Skip to first unread message

Meteor Cai

unread,
Aug 17, 2025, 10:34:41 PMAug 17
to kubevirt-dev
When I change the working path of kubelet through the KUBELET_ROOT_DIR parameter or by creating a soft link, it will eventually lead to the failure of vmi creation. Why? 
How can I change the default path of the kubelet pod without affecting the operation of kubevirt?

Meteor Cai

unread,
Aug 17, 2025, 11:08:00 PMAug 17
to kubevirt-dev
the log of virt-handler is as follows:

{"component":"virt-handler","level":"info","msg":"Generic Allocate: resourceName: kvm","pos":"generic_device.go:240","timestamp":"2025-08-18T03:04:22.950611Z"}
{"component":"virt-handler","level":"info","msg":"Generic Allocate: request: [&ContainerAllocateRequest{DevicesIDs:[kvm899],}]","pos":"generic_device.go:241","timestamp":"2025-08-18T03:04:22.950752Z"}
{"component":"virt-handler","level":"info","msg":"Generic Allocate: resourceName: tun","pos":"generic_device.go:240","timestamp":"2025-08-18T03:04:22.952823Z"}
{"component":"virt-handler","level":"info","msg":"Generic Allocate: request: [&ContainerAllocateRequest{DevicesIDs:[tun648],}]","pos":"generic_device.go:241","timestamp":"2025-08-18T03:04:22.952933Z"}
{"component":"virt-handler","level":"info","msg":"Generic Allocate: resourceName: vhost-net","pos":"generic_device.go:240","timestamp":"2025-08-18T03:04:22.955218Z"}
{"component":"virt-handler","level":"info","msg":"Generic Allocate: request: [&ContainerAllocateRequest{DevicesIDs:[vhost-net191],}]","pos":"generic_device.go:241","timestamp":"2025-08-18T03:04:22.955326Z"}
{"component":"virt-handler","kind":"","level":"info","msg":"VMI is in phase: Scheduled | Domain does not exist","name":"kubevirt-topsci-1l600-01--1658245098","namespace":"default","pos":"vm.go:1364","timestamp":"2025-08-18T03:04:28.105198Z","uid":"d26b7363-9703-4d2b-8af0-feafc94909c0"}
{"component":"virt-handler","kind":"","level":"info","msg":"migration is block migration because of containerdisk volume","name":"kubevirt-topsci-1l600-01--1658245098","namespace":"default","pos":"vm.go:1788","timestamp":"2025-08-18T03:04:28.111043Z","uid":"d26b7363-9703-4d2b-8af0-feafc94909c0"}
{"component":"virt-handler","kind":"","level":"info","msg":"migration is block migration because of cloudinitdisk volume","name":"kubevirt-topsci-1l600-01--1658245098","namespace":"default","pos":"vm.go:1788","timestamp":"2025-08-18T03:04:28.111110Z","uid":"d26b7363-9703-4d2b-8af0-feafc94909c0"}
{"component":"virt-handler","level":"error","msg":"cannot compute checksums as containerdisk/kernelboot containers seem to have been terminated","pos":"vm.go:570","timestamp":"2025-08-18T03:04:28.111172Z"}
{"component":"virt-handler","kind":"","level":"info","msg":"VMI is in phase: Failed | Domain does not exist","name":"kubevirt-topsci-1l600-01--1658245098","namespace":"default","pos":"vm.go:1364","timestamp":"2025-08-18T03:04:28.144224Z","uid":"d26b7363-9703-4d2b-8af0-feafc94909c0"}
{"component":"virt-handler","kind":"","level":"info","msg":"Performing final local cleanup for vmi with uid d26b7363-9703-4d2b-8af0-feafc94909c0","name":"kubevirt-topsci-1l600-01--1658245098","namespace":"default","pos":"vm.go:1503","timestamp":"2025-08-18T03:04:28.144390Z","uid":"d26b7363-9703-4d2b-8af0-feafc94909c0"}
{"component":"virt-handler","kind":"","level":"info","msg":"No container disk mount entries found to unmount","name":"kubevirt-topsci-1l600-01--1658245098","namespace":"default","pos":"mount.go:330","timestamp":"2025-08-18T03:04:28.144516Z","uid":"d26b7363-9703-4d2b-8af0-feafc94909c0"}
{"component":"virt-handler","kind":"","level":"info","msg":"Cleaning up remaining hotplug volumes","name":"kubevirt-topsci-1l600-01--1658245098","namespace":"default","pos":"mount.go:747","timestamp":"2025-08-18T03:04:28.144607Z","uid":"d26b7363-9703-4d2b-8af0-feafc94909c0"}
{"component":"virt-handler","kind":"Domain","level":"info","msg":"Removing domain from cache during final cleanup","name":"kubevirt-topsci-1l600-01--1658245098","namespace":"default","pos":"vm.go:1534","timestamp":"2025-08-18T03:04:28.144770Z","uid":""}

Jed Lejosne

unread,
Aug 20, 2025, 10:31:40 AMAug 20
to kubevirt-dev
Hi,
The kubelet path is currently hardcoded to /var/lib/kubelet in KubeVirt (see https://github.com/kubevirt/kubevirt/blob/main/pkg/util/util.go#L24)
I'd suggest opening a feature request in https://github.com/kubevirt/kubevirt/issues to make it configurable.

Thanks,
Jed

Meteor Cai

unread,
Aug 27, 2025, 1:51:03 AM (10 days ago) Aug 27
to kubevirt-dev
I solved this problem by mounting a directory to /var/lib/kubelet .

Thank you very much.

Reply all
Reply to author
Forward
0 new messages