virtctl安装(最好跟kubevirt版本保持一致):
1.export VERSION=$(curl -s https://api.github.com/repos/kubevirt/kubevirt/releases | grep tag_name | grep -v -- '-rc' | head -1 | awk -F': ' '{print $2}' | sed 's/,//' | xargs)
2.curl -L -o /usr/local/bin/virtctl https://github.com/kubevirt/kubevirt/releases/download/$VERSION/virtctl-$VERSION-linux-amd64
github下载比较慢,建议手工下载https://github.com/kubevirt/kubevirt/releases/download/$VERSION/virtctl-$VERSION-linux-amd64对应的文件。并上传到/usr/local/bin。
假设安装的是v0.58.1版本,则地址为https://github.com/kubevirt/kubevirt/releases/download/v0.58.1/virtctl-v0.58.1-linux-amd64
3.
mv /usr/local/bin/virtctl-v0.58.1-linux-amd64 /usr/local/bin/virtctl
chmod +x /usr/local/bin/virtctl
4. 通过virtctl连接现有的虚机vmi(假设虚机名字为:testvmi-nocloud)
virtctl console testvmi-nocloud
vnc安装:
yum install -y tigervnc