kubevirt / kubevirt.github.io

KubeVirt website repo, documentation at https://kubevirt.io/user-guide/
https://kubevirt.io
MIT License
29 stars 109 forks source link

Snapshot is not supported for this volumeSource type [containerdisk] [cloudinitdisk] #906

Closed khalilxg closed 7 months ago

khalilxg commented 1 year ago

so im using kubevirt inside minikube, i was following lab to create a vm via https://kubevirt.io/labs/manifests/vm.yaml

this is minikube addons list: PS C:\Users\USER\Downloads> minikube addons list ----------------------------- ---------- -------------- -------------------------------- ADDON NAME PROFILE STATUS MAINTAINER
ambassador minikube disabled 3rd party (Ambassador)
auto-pause minikube disabled Google
cloud-spanner minikube disabled Google
csi-hostpath-driver minikube enabled ✅ Kubernetes
dashboard minikube disabled Kubernetes
default-storageclass minikube disabled Kubernetes
efk minikube disabled 3rd party (Elastic)
freshpod minikube disabled Google
gcp-auth minikube disabled Google
gvisor minikube disabled Google
headlamp minikube disabled 3rd party (kinvolk.io)
helm-tiller minikube disabled 3rd party (Helm)
inaccel minikube disabled 3rd party (InAccel
[info@inaccel.com])
ingress minikube disabled Kubernetes
ingress-dns minikube disabled Google
istio minikube disabled 3rd party (Istio)
istio-provisioner minikube disabled 3rd party (Istio)
kong minikube disabled 3rd party (Kong HQ)
kubevirt minikube enabled ✅ 3rd party (KubeVirt)
logviewer minikube disabled 3rd party (unknown)
metallb minikube disabled 3rd party (MetalLB)
metrics-server minikube disabled Kubernetes
nvidia-driver-installer minikube disabled Google
nvidia-gpu-device-plugin minikube disabled 3rd party (Nvidia)
olm minikube disabled 3rd party (Operator Framework)
pod-security-policy minikube disabled 3rd party (unknown)
portainer minikube disabled 3rd party (Portainer.io)
registry minikube disabled Google
registry-aliases minikube disabled 3rd party (unknown)
registry-creds minikube disabled 3rd party (UPMC Enterprises)
storage-provisioner minikube enabled ✅ Google
storage-provisioner-gluster minikube disabled 3rd party (Gluster)
volumesnapshots minikube enabled ✅ Kubernetes
----------------------------- ---------- -------------- --------------------------------

*kubevirt version: v1.0.0-alpha.0 installation through: kubectl create -f https://github.com/kubevirt/kubevirt/releases/download/v1.0.0-alpha.0/kubevirt-operator.yaml kubectl create -f https://github.com/kubevirt/kubevirt/releases/download/v1.0.0-alpha.0/kubevirt-cr.yaml

*cdi version : v1.56.0 installation through 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

*virtctl version: v1.0.0-alpha.0

minikube version: v1.30.1 kubectl (minikube's):

kubectl version --short Client Version: v1.25.9 Kustomize Version: v4.5.7 Server Version: v1.26.3

*activated pods: kubectl get pods -A NAMESPACE NAME READY STATUS RESTARTS AGE cdi cdi-apiserver-57d47bc55d-s62dp 1/1 Running 4 (17h ago) 19h cdi cdi-deployment-69d44b67b5-5ff9p 1/1 Running 4 (17h ago) 19h cdi cdi-operator-7c58b4f8c8-b5tm7 1/1 Running 4 (17h ago) 19h cdi cdi-uploadproxy-5b5cc54d48-bhgh4 1/1 Running 4 (17h ago) 19h kube-system coredns-787d4945fb-5q7sk 1/1 Running 4 (17h ago) 19h kube-system csi-hostpath-attacher-0 1/1 Running 4 (17h ago) 19h kube-system csi-hostpath-resizer-0 1/1 Running 4 (17h ago) 19h kube-system csi-hostpathplugin-mf7z5 6/6 Running 25 (17h ago) 19h kube-system etcd-minikube 1/1 Running 0 141m kube-system kube-apiserver-minikube 1/1 Running 0 141m kube-system kube-controller-manager-minikube 1/1 Running 4 (17h ago) 19h kube-system kube-proxy-pcp8p 1/1 Running 4 (17h ago) 19h kube-system kube-scheduler-minikube 1/1 Running 4 (17h ago) 19h kube-system kubevirt-install-manager 1/1 Running 4 (17h ago) 19h kube-system snapshot-controller-7564cc9b9-nk48x 1/1 Running 4 (17h ago) 19h kube-system snapshot-controller-7564cc9b9-p748x 1/1 Running 4 (17h ago) 19h kube-system storage-provisioner 1/1 Running 7 (17h ago) 19h kubevirt virt-api-668c996564-25zf6 1/1 Running 5 (17h ago) 19h kubevirt virt-controller-65d89585-79k59 1/1 Running 4 (17h ago) 19h kubevirt virt-controller-65d89585-jxdp6 1/1 Running 4 (17h ago) 19h kubevirt virt-handler-vdvp8 1/1 Running 3 (17h ago) 19h kubevirt virt-operator-844f987c8-4smjb 1/1 Running 5 (17h ago) 19h kubevirt virt-operator-844f987c8-6gd5x 1/1 Running 4 (17h ago) 19h

*vm description: kubectl describe vm testvm Name: testvm Namespace: default Labels: Annotations: kubevirt.io/latest-observed-api-version: v1 kubevirt.io/storage-observed-api-version: v1alpha3 API Version: kubevirt.io/v1 Kind: VirtualMachine Metadata: Creation Timestamp: 2023-05-09T18:32:08Z Finalizers: kubevirt.io/virtualMachineControllerFinalize Generation: 2 Managed Fields: API Version: kubevirt.io/v1 Fields Type: FieldsV1 fieldsV1: f:metadata: f:annotations: .: f:kubectl.kubernetes.io/last-applied-configuration: f:spec: .: f:template: .: f:metadata: .: f:labels: .: f:kubevirt.io/domain: f:kubevirt.io/size: f:spec: .: f:domain: .: f:devices: .: f:disks: f:interfaces: f:resources: .: f:requests: .: f:memory: f:networks: f:volumes: Manager: kubectl-client-side-apply Operation: Update Time: 2023-05-09T18:32:08Z API Version: kubevirt.io/v1alpha3 Fields Type: FieldsV1 fieldsV1: f:metadata: f:annotations: f:kubevirt.io/latest-observed-api-version: f:kubevirt.io/storage-observed-api-version: f:finalizers: .: v:"kubevirt.io/virtualMachineControllerFinalize": f:spec: f:running: Manager: Go-http-client Operation: Update Time: 2023-05-09T18:32:57Z API Version: kubevirt.io/v1alpha3 Fields Type: FieldsV1 fieldsV1: f:status: .: f:conditions: f:desiredGeneration: f:observedGeneration: f:printableStatus: f:startFailure: .: f:consecutiveFailCount: f:lastFailedVMIUID: f:retryAfterTimestamp: f:volumeSnapshotStatuses: Manager: Go-http-client Operation: Update Subresource: status Time: 2023-05-09T18:45:23Z Resource Version: 67791 UID: 6f52ff6d-128d-43e3-83ee-81745525f802 Spec: Running: true Template: Metadata: Creation Timestamp: Labels: kubevirt.io/domain: testvm kubevirt.io/size: small Spec: Domain: Devices: Disks: Disk: Bus: virtio Name: containerdisk Disk: Bus: virtio Name: cloudinitdisk Interfaces: Masquerade: Name: default Machine: Type: q35 Resources: Requests: Memory: 64M Networks: Name: default Pod: Volumes: Container Disk: Image: quay.io/kubevirt/cirros-container-disk-demo Name: containerdisk Cloud Init No Cloud: userDataBase64: SGkuXG4= Name: cloudinitdisk Status: Conditions: Last Probe Time: 2023-05-09T18:45:23Z Last Transition Time: 2023-05-09T18:45:23Z Message: VMI does not exist Reason: VMINotExists Status: False Type: Ready Last Probe Time: Last Transition Time: Status: True Type: LiveMigratable Desired Generation: 2 Observed Generation: 2 Printable Status: CrashLoopBackOff Start Failure: Consecutive Fail Count: 6 Last Failed VMIUID: 5daf8d9c-5204-4dcd-a141-fd29adbb9c22 Retry After Timestamp: 2023-05-09T18:50:23Z Volume Snapshot Statuses: Enabled: false Name: containerdisk Reason: Snapshot is not supported for this volumeSource type [containerdisk] Enabled: false Name: cloudinitdisk Reason: Snapshot is not supported for this volumeSource type [cloudinitdisk] Events: Type Reason Age From Message


Normal SuccessfulDelete 15m virtualmachine-controller Stopped the virtual machine by deleting the virtual machine instance 0f77b5d0-8cf2-43c7-9820-0d847cd90a47 Normal SuccessfulDelete 15m virtualmachine-controller Stopped the virtual machine by deleting the virtual machine instance e2e65a43-bdc0-4fed-a60f-c7050ed03690 Normal SuccessfulDelete 14m virtualmachine-controller Stopped the virtual machine by deleting the virtual machine instance f17a0be1-4186-49be-99b5-ca02104ecc48 Normal SuccessfulDelete 12m virtualmachine-controller Stopped the virtual machine by deleting the virtual machine instance 97699ddf-adef-4ecf-8650-c7aa3e6b5c29 Normal SuccessfulDelete 8m46s virtualmachine-controller Stopped the virtual machine by deleting the virtual machine instance 5d13a4a3-2188-4a95-9f9f-3431790eca41 Normal SuccessfulCreate 3m46s (x6 over 15m) virtualmachine-controller Started the virtual machine by creating the new virtual machine instance testvm Normal SuccessfulDelete 3m30s virtualmachine-controller Stopped the virtual machine by deleting the virtual machine instance 5daf8d9c-5204-4dcd-a141-fd29adbb9c22

steps performed: enable cpu virtualization check, enabling kvm check, dowloading minikube( only 1 node ), dowloading latest kubevirt/cdi, check kubevirt pods, download kubevirt/virtio-container-disk:latest, creating the /manifest/vm.yaml, got that error

zhaorendong commented 1 year ago

I face the same problem in v0.59.1

cwilkers commented 10 months ago

The message you picked out is not acutally an error, it's just the Reason given for not enabling snapshots on the container disk. The real reason the VM is not working is in that crashloopbackoff. Can you include output from the virt-launcher Pod created by your VM, or from the VMI?

Also, you can format your code text in github by using markdown's triple-backtick:

``` code goes here ```