You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 4, 2024. It is now read-only.
Currently kubevirt-disk-uploader is
hardcoded to export only from a single
source "VirtualMachine" (kind).
Extend API to allow export from multiple sources:
- VirtualMachine
- VirtualMachineSnapshot
- PersistentVolumeClaim
Signed-off-by: Ben Oukhanov <[email protected]>
Copy file name to clipboardexpand all lines: README.md
+21-9
Original file line number
Diff line number
Diff line change
@@ -4,27 +4,39 @@ Extracts disk and uploads it to a container registry.
4
4
5
5
## About
6
6
7
-
A tool designed to automate the extraction of disks from KubeVirt Virtual Machines, package them into [Container Disks](https://kubevirt.io/user-guide/virtual_machines/disks_and_volumes/#containerdisk), and upload them to the Container Registry.
7
+
A tool designed to automate the extraction of disk, rebuild as [Container Disk](https://kubevirt.io/user-guide/virtual_machines/disks_and_volumes/#containerdisk) and upload to the Container Registry.
8
8
9
-
## Workflow
9
+
## Usage
10
10
11
-
KubeVirt Disk Uploader -> Download VM Disk -> Build New Container Disk -> Push To Container Registry
11
+
These are the supported export sources:
12
12
13
-
## Installation
13
+
- VirtualMachine (VM)
14
+
- VirtualMachineSnapshot (VM Snapshot)
15
+
- PersistentVolumeClaim (PVC)
16
+
17
+
Data from the source can be exported only when it is not used.
14
18
15
19
**Prerequisites**
16
20
17
-
1. Ensure Virtual Machine (VM) is powered off. Data from VM can be exported only when it is not used.
18
-
2. Modify [kubevirt-disk-uploader](https://github.com/codingben/kubevirt-disk-uploader/blob/main/kubevirt-disk-uploader.yaml#L58) arguments (VM Namespace, VM Name, Volume Name, Image Destination, Enable or Disable System Preparation and Push Timeout).
19
-
3. Modify [kubevirt-disk-uploader-credentials](https://github.com/codingben/kubevirt-disk-uploader/blob/main/kubevirt-disk-uploader.yaml#L65-L74) of the external container registry (Username, Password and Hostname).
- Modify [kubevirt-disk-uploader-credentials](https://github.com/codingben/kubevirt-disk-uploader/blob/main/kubevirt-disk-uploader.yaml#L65-L74) of the external container registry.
command.Flags().StringVar(&opts.exportSourceNamespace, "export-source-namespace", "", "namespace of the export source")
133
+
command.Flags().StringVar(&opts.exportSourceName, "export-source-name", "", "name of the export source")
134
+
command.Flags().StringVar(&opts.volumeName, "volumename", "", "name of the volume (if source kind is 'pvc', then volume name is equal to source name)")
135
+
command.Flags().StringVar(&opts.imageDestination, "imagedestination", "", "destination of the image in container registry")
136
+
command.Flags().IntVar(&opts.pushTimeout, "pushtimeout", 60, "push timeout of container disk to registry")
0 commit comments