Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions modules/virt-image-upload-commands.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,32 @@
= Image upload commands

[role="_abstract"]
You can use the following `virtctl image-upload` commands to upload a VM image to a data volume.
You can use the following `virtctl image-upload` commands to upload a VM disk image or tar archive to a data volume.

.Image upload commands
[width="100%",cols="1a,2a",options="header"]
|===
|Command |Description
|`virtctl image-upload dv <datavolume_name> --image-path=</path/to/image> --no-create`
|Upload a VM image to a data volume that already exists.
|Upload a VM disk image to a data volume that already exists.

|`virtctl image-upload dv <datavolume_name> --size=<datavolume_size> --image-path=</path/to/image>`
|Upload a VM image to a new data volume of a specified requested size.
|Upload a VM disk image to a new data volume of a specified requested size.

|`virtctl image-upload dv <datavolume_name> --datasource --size=<datavolume_size> --image-path=</path/to/image>`
|Upload a VM image to a new data volume and create an associated `DataSource` object for it.
|Upload a VM disk image to a new data volume and create an associated `DataSource` object for it.

|`virtctl image-upload dv <datavolume_name> --archive-path=</path/to/archive> --no-create`
|Upload a tar archive to a data volume that already exists.

|`virtctl image-upload dv <datavolume_name> --size=<datavolume_size> --archive-path=</path/to/archive>`
|Upload a tar archive to a new data volume of a specified requested size.
|===

[NOTE]
====
* Use `--image-path` to upload VM disk images. Supported formats include `ISO`, `IMG`, `QCOW2`, and gzip-compressed images, such as `.img.gz`. Containerized Data Importer (CDI) automatically decompresses gzip-compressed images during upload.
* Use `--archive-path` to upload a tar archive that contains one or more files, such as a disk image created with `tar -cvf disk.tar disk.img`. CDI extracts the contents of the archive during upload.
* Specify either `--image-path` or `--archive-path`. You cannot specify both flags in the same command.
* Do not use `--archive-path` with gzip-compressed disk images. A gzip-compressed image, such as `disk.img.gz`, is not a tar archive. Upload these images by using `--image-path` instead.
====
2 changes: 2 additions & 0 deletions modules/virt-uploading-image-virtctl.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ $ virtctl image-upload dv <datavolume_name> \
[NOTE]
====
* If you do not want to create a new data volume, omit the `--size` parameter and include the `--no-create` flag.
* Use `--image-path` to upload VM disk images, including gzip-compressed images such as `.img.gz`. CDI automatically decompresses gzip-compressed images during upload.
* Use `--archive-path` only to upload tar archives, such as `disk.tar`. Do not use this flag with gzip-compressed disk images.
* When uploading a disk image to a PVC, the PVC size must be larger than the size of the uncompressed virtual disk.
* To allow insecure server connections when using HTTPS, use the `--insecure` parameter. When you use the `--insecure` flag, the authenticity of the upload endpoint is *not* verified.
====
Expand Down