diff --git a/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/README.md b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/README.md new file mode 100644 index 00000000000..cf45dce7b5e --- /dev/null +++ b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/README.md @@ -0,0 +1,46 @@ +# get this party started + +1. ensure you have a default storage class selected +``` +ocs-storagecluster-ceph-rbd (default) openshift-storage.rbd.csi.ceph.com Delete Immediate true 7h50m +``` + +2. Create the VM's +Note.. these vm's already have the label for changeBlockTracking: true + +``` +oc create -f cirros-test-1.yaml , can also include test-2,3 +``` + +3. Create the pv/pvc that will store the qocw2 snapshots + +``` +oc create -f pushBackupPV.yaml +``` + +4. Create an optional filebrowsers container to inspect files on the above pv/pvc + +``` +oc create -f filebrowser.yaml +``` + +5. Create the virtualMachineBackupTracker instance + +``` +oc create -f virtualMachineBackupTracker.yaml +``` + +6. Take a full andn incremental backup + +Full: the first backup will always be a full backup +``` +oc create -f virtualMachineBackupFull.yaml +``` +Incremetnal: any new backup using the same tracker will be incremental +``` +oc create -f virtualMachineBackupInc1.yaml +``` + +See my results in RESULTS + + diff --git a/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/RESULTS/NOTES b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/RESULTS/NOTES new file mode 100644 index 00000000000..cd4879fa299 --- /dev/null +++ b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/RESULTS/NOTES @@ -0,0 +1,9 @@ +# Notes + +After downloading the qcow2 files to my laptop.. check the size of files + +``` +-rw-r--r--. 1 whayutin whayutin 896K Jan 14 09:28 vmbackup-cirros-test-cont-1-inc-1-volume0.qcow2 +-rw-r--r--. 1 whayutin whayutin 151M Jan 14 09:29 vmbackup-cirros-test-cont-1-volume0.qcow2 +``` + diff --git a/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/RESULTS/vmbackup_results_full b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/RESULTS/vmbackup_results_full new file mode 100644 index 00000000000..7b94b8ab0e4 --- /dev/null +++ b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/RESULTS/vmbackup_results_full @@ -0,0 +1,37 @@ +oc -n cirros-test-cont get virtualmachineBackup vmbackup-cirros-test-cont-1 -o yaml +apiVersion: backup.kubevirt.io/v1alpha1 +kind: VirtualMachineBackup +metadata: + creationTimestamp: "2026-01-14T15:40:55Z" + finalizers: + - backup.kubevirt.io/vmbackup-protection + generation: 1 + name: vmbackup-cirros-test-cont-1 + namespace: cirros-test-cont + resourceVersion: "392611" + uid: 649409e7-84e7-47af-a12f-6cd6356e6fd7 +spec: + pvcName: pushbackup-pv + source: + apiGroup: backup.kubevirt.io + kind: VirtualMachineBackupTracker + name: vmbackuptracker-cirros-test-cont-1 +status: + checkpointName: vmbackup-cirros-test-cont-1-2026-01-14_15-40-55 + conditions: + - lastProbeTime: null + lastTransitionTime: "2026-01-14T15:41:04Z" + reason: 'Completed VirtualMachineBackup, warning: Failed freezing guest filesystem: + virError(Code=86, Domain=10, Message=''Guest agent is not responding: QEMU guest + agent is not connected'')' + status: "False" + type: Progressing + - lastProbeTime: null + lastTransitionTime: "2026-01-14T15:41:04Z" + reason: 'Completed VirtualMachineBackup, warning: Failed freezing guest filesystem: + virError(Code=86, Domain=10, Message=''Guest agent is not responding: QEMU guest + agent is not connected'')' + status: "True" + type: Done + type: Full + diff --git a/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/RESULTS/vmbackup_results_inc1 b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/RESULTS/vmbackup_results_inc1 new file mode 100644 index 00000000000..8ee213549c7 --- /dev/null +++ b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/RESULTS/vmbackup_results_inc1 @@ -0,0 +1,36 @@ +oc -n cirros-test-cont get virtualmachineBackup vmbackup-cirros-test-cont-1-inc-1 -o yaml +apiVersion: backup.kubevirt.io/v1alpha1 +kind: VirtualMachineBackup +metadata: + creationTimestamp: "2026-01-14T15:45:26Z" + finalizers: + - backup.kubevirt.io/vmbackup-protection + generation: 1 + name: vmbackup-cirros-test-cont-1-inc-1 + namespace: cirros-test-cont + resourceVersion: "396946" + uid: e5415790-5fad-4077-8d5a-8ea7003abfec +spec: + pvcName: pushbackup-pv + source: + apiGroup: backup.kubevirt.io + kind: VirtualMachineBackupTracker + name: vmbackuptracker-cirros-test-cont-1 +status: + checkpointName: vmbackup-cirros-test-cont-1-inc-1-2026-01-14_15-45-26 + conditions: + - lastProbeTime: null + lastTransitionTime: "2026-01-14T15:45:30Z" + reason: 'Completed VirtualMachineBackup, warning: Failed freezing guest filesystem: + virError(Code=86, Domain=10, Message=''Guest agent is not responding: QEMU guest + agent is not connected'')' + status: "False" + type: Progressing + - lastProbeTime: null + lastTransitionTime: "2026-01-14T15:45:30Z" + reason: 'Completed VirtualMachineBackup, warning: Failed freezing guest filesystem: + virError(Code=86, Domain=10, Message=''Guest agent is not responding: QEMU guest + agent is not connected'')' + status: "True" + type: Done + type: Incremental diff --git a/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/RESULTS/vmbackup_tracker.yaml b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/RESULTS/vmbackup_tracker.yaml new file mode 100644 index 00000000000..e6a506466d7 --- /dev/null +++ b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/RESULTS/vmbackup_tracker.yaml @@ -0,0 +1,18 @@ +apiVersion: backup.kubevirt.io/v1alpha1 +kind: VirtualMachineBackupTracker +metadata: + creationTimestamp: "2026-01-14T15:37:52Z" + generation: 1 + name: vmbackuptracker-cirros-test-cont-1 + namespace: cirros-test-cont + resourceVersion: "396932" + uid: 41db29e7-412a-40c5-9a37-c044594febf2 +spec: + source: + apiGroup: kubevirt.io + kind: VirtualMachine + name: cirros-test-cont-1 +status: + latestCheckpoint: + creationTime: "2026-01-14T15:45:30Z" + name: vmbackup-cirros-test-cont-1-inc-1-2026-01-14_15-45-26 diff --git a/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/cirros-test-1.yaml b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/cirros-test-1.yaml new file mode 100644 index 00000000000..fadf9b20071 --- /dev/null +++ b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/cirros-test-1.yaml @@ -0,0 +1,59 @@ +apiVersion: kubevirt.io/v1 +kind: VirtualMachine +metadata: + annotations: + generation: 1 + labels: + app: cirros-test-cont-1 + changedBlockTracking: "true" + name: cirros-test-cont-1 + namespace: cirros-test-cont +spec: + dataVolumeTemplates: + - metadata: + annotations: + cdi.kubevirt.io/storage.deleteAfterCompletion: "false" + creationTimestamp: null + name: cirros-test-cont-1-dv + spec: + pvc: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 150Mi + volumeMode: Block + source: + registry: + pullMethod: node + url: docker://quay.io/kubevirt/cirros-container-disk-demo + running: true + template: + metadata: + creationTimestamp: null + name: cirros-test-cont-1 + spec: + architecture: amd64 + domain: + devices: + disks: + - disk: + bus: virtio + name: volume0 + interfaces: + - masquerade: {} + name: default + rng: {} + machine: + type: q35 + resources: + requests: + memory: 256M + networks: + - name: default + pod: {} + terminationGracePeriodSeconds: 0 + volumes: + - dataVolume: + name: cirros-test-cont-1-dv + name: volume0 diff --git a/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/cirros-test-2.yaml b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/cirros-test-2.yaml new file mode 100644 index 00000000000..dee88c53a2d --- /dev/null +++ b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/cirros-test-2.yaml @@ -0,0 +1,79 @@ +apiVersion: kubevirt.io/v1 +kind: VirtualMachine +metadata: + annotations: + generation: 1 + labels: + app: cirros-test-cont-2 + changedBlockTracking: "true" + name: cirros-test-cont-2 + namespace: cirros-test-cont +spec: + dataVolumeTemplates: + - metadata: + annotations: + cdi.kubevirt.io/storage.deleteAfterCompletion: "false" + creationTimestamp: null + name: cirros-test-cont-2-dv + spec: + pvc: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 150Mi + volumeMode: Block + source: + registry: + pullMethod: node + url: docker://quay.io/kubevirt/cirros-container-disk-demo + - metadata: + annotations: + cdi.kubevirt.io/storage.deleteAfterCompletion: "false" + name: cirros-test-cont-2-home-dv + spec: + pvc: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 150Mi + volumeMode: Block + source: + blank: {} + running: true + template: + metadata: + creationTimestamp: null + name: cirros-test-cont-2 + spec: + architecture: amd64 + domain: + devices: + disks: + - disk: + bus: virtio + name: volume0 + - disk: + bus: virtio + name: volume1 + interfaces: + - masquerade: {} + name: default + rng: {} + machine: + type: q35 + resources: + requests: + memory: 256M + networks: + - name: default + pod: {} + terminationGracePeriodSeconds: 0 + volumes: + - dataVolume: + name: cirros-test-cont-2-dv + name: volume0 + - dataVolume: + name: cirros-test-cont-2-home-dv + name: volume1 diff --git a/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/cirros-test-3.yaml b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/cirros-test-3.yaml new file mode 100644 index 00000000000..23718b28dfb --- /dev/null +++ b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/cirros-test-3.yaml @@ -0,0 +1,59 @@ +apiVersion: kubevirt.io/v1 +kind: VirtualMachine +metadata: + annotations: + generation: 1 + labels: + app: cirros-test-cont-3 + changedBlockTracking: "true" + name: cirros-test-cont-3 + namespace: cirros-test-cont +spec: + dataVolumeTemplates: + - metadata: + annotations: + cdi.kubevirt.io/storage.deleteAfterCompletion: "false" + creationTimestamp: null + name: cirros-test-cont-3-dv + spec: + pvc: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 150Mi + volumeMode: Block + source: + registry: + pullMethod: node + url: docker://quay.io/kubevirt/cirros-container-disk-demo + running: true + template: + metadata: + creationTimestamp: null + name: cirros-test-cont-3 + spec: + architecture: amd64 + domain: + devices: + disks: + - disk: + bus: virtio + name: volume0 + interfaces: + - masquerade: {} + name: default + rng: {} + machine: + type: q35 + resources: + requests: + memory: 256M + networks: + - name: default + pod: {} + terminationGracePeriodSeconds: 0 + volumes: + - dataVolume: + name: cirros-test-cont-3-dv + name: volume0 diff --git a/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/filebrowser.yaml b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/filebrowser.yaml new file mode 100644 index 00000000000..9b54f20808a --- /dev/null +++ b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/filebrowser.yaml @@ -0,0 +1,69 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: pvc-browser + namespace: cirros-test-cont +spec: + replicas: 1 + selector: + matchLabels: + app: pvc-browser + template: + metadata: + labels: + app: pvc-browser + spec: + containers: + - name: browser + image: docker.io/filebrowser/filebrowser:latest + env: + - name: FB_NOAUTH + value: "true" + args: + - -p + - "8080" + - -a + - "0.0.0.0" + - -r + - /mnt + - -d + - /tmp/filebrowser.db + - --noauth + ports: + - containerPort: 8080 + volumeMounts: + - name: storage + mountPath: /mnt + - name: config-volume + mountPath: /config + volumes: + - name: storage + persistentVolumeClaim: + claimName: pushbackup-pv + - name: config-volume + emptyDir: {} +--- +apiVersion: v1 +kind: Service +metadata: + name: pvc-browser-service + namespace: cirros-test-cont +spec: + selector: + app: pvc-browser + ports: + - protocol: TCP + port: 8080 + targetPort: 8080 +--- +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + name: pvc-browser-route + namespace: cirros-test-cont +spec: + to: + kind: Service + name: pvc-browser-service + port: + targetPort: 8080 \ No newline at end of file diff --git a/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/pushBackupPV.yaml b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/pushBackupPV.yaml new file mode 100644 index 00000000000..6528977e490 --- /dev/null +++ b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/pushBackupPV.yaml @@ -0,0 +1,29 @@ +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: pushbackup-pv + namespace: cirros-test-cont # Note: PVs are cluster-scoped, namespace here is often ignored by K8s but kept for user context +spec: + capacity: + storage: 500Mi + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + storageClassName: "" + hostPath: + path: "/mnt/data" +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: pushbackup-pv + namespace: cirros-test-cont +spec: + accessModes: + - ReadWriteOnce + storageClassName: "" + volumeName: pushbackup-pv + resources: + requests: + storage: 500Mi \ No newline at end of file diff --git a/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/virtualMachineBackupFull.yaml b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/virtualMachineBackupFull.yaml new file mode 100644 index 00000000000..5a1bfd3f5cf --- /dev/null +++ b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/virtualMachineBackupFull.yaml @@ -0,0 +1,11 @@ +apiVersion: backup.kubevirt.io/v1alpha1 +kind: VirtualMachineBackup +metadata: + name: vmbackup-cirros-test-cont-1 + namespace: cirros-test-cont +spec: + source: + apiGroup: backup.kubevirt.io + kind: VirtualMachineBackupTracker + name: vmbackuptracker-cirros-test-cont-1 + pvcName: pushbackup-pv diff --git a/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/virtualMachineBackupInc1.yaml b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/virtualMachineBackupInc1.yaml new file mode 100644 index 00000000000..017efd3a71a --- /dev/null +++ b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/virtualMachineBackupInc1.yaml @@ -0,0 +1,11 @@ +apiVersion: backup.kubevirt.io/v1alpha1 +kind: VirtualMachineBackup +metadata: + name: vmbackup-cirros-test-cont-1-inc-1 + namespace: cirros-test-cont +spec: + source: + apiGroup: backup.kubevirt.io + kind: VirtualMachineBackupTracker + name: vmbackuptracker-cirros-test-cont-1 + pvcName: pushbackup-pv diff --git a/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/virtualMachineBackupTracker.yaml b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/virtualMachineBackupTracker.yaml new file mode 100644 index 00000000000..a2a7a5729f9 --- /dev/null +++ b/tests/e2e/sample-applications/virtual-machines/cirros-test/3-vms/cirros-test-with-CNV-CBT/virtualMachineBackupTracker.yaml @@ -0,0 +1,11 @@ +apiVersion: backup.kubevirt.io/v1alpha1 +kind: VirtualMachineBackupTracker +metadata: + name: vmbackuptracker-cirros-test-cont-1 + namespace: cirros-test-cont +spec: + source: + apiGroup: kubevirt.io + kind: VirtualMachine + name: cirros-test-cont-1 +