• KSV
  • ksv1.6.0创建虚拟机无法进入console问题。

创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。如果未按模板创建问题,管理员有权关闭问题。
确保帖子格式清晰易读,用 markdown code block 语法格式化代码块。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。

操作系统信息

Windows10系统下使用vmware workstation v16.1.2创建8核16G虚拟机,开启CPU虚拟化。

vmware虚拟机使用NAT网络模式,默认网关192.168.5.2

[root@ksv ~]# cat /etc/redhat-release 
CentOS Linux release 7.9.2009 (Core)
[root@ksv ~]# uname -a
Linux ksv 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@ksv ~]# 

Kubernetes版本信息

[root@ksv ~]# kubectl version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.6+k3s1", GitCommit:"df033fa248bc2c9f636e4c0ff2b782cb8edbbf10", GitTreeState:"clean", BuildDate:"2021-11-04T00:25:14Z", GoVersion:"go1.16.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.6+k3s1", GitCommit:"df033fa248bc2c9f636e4c0ff2b782cb8edbbf10", GitTreeState:"clean", BuildDate:"2021-11-04T00:25:14Z", GoVersion:"go1.16.8", Compiler:"gc", Platform:"linux/amd64"}
[root@ksv ~]# 

容器运行时

[root@ksv ~]# crictl version 
Version:  0.1.0
RuntimeName:  containerd
RuntimeVersion:  v1.4.11-k3s1
RuntimeApiVersion:  v1alpha2
[root@ksv ~]# 

KSV版本信息

kubesphere-virtualization-x86_64-v1.6.0.tar.gz

问题是什么

创建的虚拟机无法进入console。

[root@ksv ~]# kubectl get vmi
NAME         AGE   PHASE     IP           NODENAME   READY
i-f4f8ahqp   11m   Running   10.136.0.2   ksv        True
[root@ksv ~]# 
[root@ksv ~]# kubectl get pod
NAME                             READY   STATUS    RESTARTS   AGE
virt-launcher-i-f4f8ahqp-nhz4j   1/1     Running   0          11m
[root@ksv ~]# 
[root@ksv ~]# virtctl console i-f4f8ahqp
Successfully connected to i-f4f8ahqp console. The escape sequence is ^]

一直停在`The escape sequence is ^]`,按回车也没反应。

pod ip可以ping通,vmi ip不能ping通。

[root@ksv ~]# kubectl get pod -owide    
NAME                             READY   STATUS    RESTARTS   AGE   IP             NODE   NOMINATED NODE   READINESS GATES
virt-launcher-i-f4f8ahqp-nhz4j   1/1     Running   0          12m   10.233.64.49   ksv    <none>           1/1
[root@ksv ~]# 
[root@ksv ~]# ping 10.233.64.49
PING 10.233.64.49 (10.233.64.49) 56(84) bytes of data.
64 bytes from 10.233.64.49: icmp_seq=1 ttl=63 time=0.566 ms
64 bytes from 10.233.64.49: icmp_seq=2 ttl=63 time=0.298 ms
^C
--- 10.233.64.49 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.298/0.432/0.566/0.134 ms
[root@ksv ~]# 
[root@ksv ~]# ping 10.136.0.2
PING 10.136.0.2 (10.136.0.2) 56(84) bytes of data.

从vnc也无法进入虚拟机。