# 获取最新稳定版
export VERSION=$(curl -s https://api.github.com/repos/kubevirt/containerized-data-importer/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
kubectl create -f https://github.com/kubevirt/containerized-data-importer/releases/download/v1.56.0/cdi-operator.yaml
kubectl create -f https://github.com/kubevirt/containerized-data-importer/releases/download/v1.56.0/cdi-cr.yaml
kubectl get svc
virtctl image-upload --image-path /root/centos7-50g.qcow2 --size 500Gi --storage-class nfs-client --access-mode ReadWriteOnce --uploadproxy-url=https://10.106.173.20 pvc test-kubevirt --insecure
如果拉取镜像超时使用如下方式上传即可
virtctl image-upload pvc pvc002 --image-path=/tmp/centos7.9-moban.qcow2 --uploadproxy-url=https://10.111.53.15 --insecure
文档更新时间: 2023-03-27 12:08 作者:admin