smartxworks / virtink

Lightweight Virtualization Add-on for Kubernetes
Apache License 2.0
504 stars 42 forks source link

VM could not start in centos:7 for kernel 3.10.0-1160.45.1.el7.x86_64 but work in 5.4.15-1.el7.elrepo.x86_64 #49

Closed weixiao-huang closed 2 years ago

weixiao-huang commented 2 years ago

We have a k8s cluster built in two nodes

image

both use centos7 but have different kernel version 3.10.0-1160.45.1.el7.x86_64 and 5.4.15-1.el7.elrepo.x86_64. And I found that only in 5.4.15-1.el7.elrepo.x86_64 the VM can start, the other has the pod error below

[root@test-0011 virtink]# k get po vm-test-vm-tlt7v -owide
NAME               READY   STATUS   RESTARTS   AGE   IP            NODE                             NOMINATED NODE   READINESS GATES
vm-test-vm-tlt7v   0/1     Error    0          14m   172.16.1.32   test-0003.host   <none>           <none>

[root@test-0011 virtink]# k logs -f vm-test-vm-tlt7v
thread 'vmm' panicked at 'called `Result::unwrap()` on an `Err` value: CheckExtensions(Capability missing: ImmediateExit)', vmm/src/vm.rs:731:48
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error booting VM: ResponseRecv(RecvError)

So whether it seems cloud-hypervisor does not support 3.10.0-1160.45.1.el7.x86_64 host kernel version?

weixiao-huang commented 2 years ago

It seems a bug in cloud hypervisor and I open https://github.com/cloud-hypervisor/cloud-hypervisor/issues/4579 in cloud hypervisor

fengye87 commented 2 years ago

That's a known issue of Cloud Hypervisor. 3.10.0 is too old. And since Cloud Hypervisor is using io_uring, to get proper VM IO performance, a host kernel newer than 5.6 is recommended.

carezkh commented 2 years ago

@weixiao-huang Yes, cloud-hypervisor can not start VMs in Centos7. Currently Virtink uses cloud-hypervisor v26.0, and some KVM extensions are needed in this version, the minimum Linux kernel version required is V4.11.

fengye87 commented 2 years ago

Added doc about minimal and recommended host kernel versions. Closing this issue.