Explain which formats can be imported and what the requirements for the
storage are (content type). Give an example on how to import into an
existing and new guest.

Also note that images are copied, not moved and that they can't
reference external files.

Signed-off-by: Dominik Csapak <d.csa...@proxmox.com>
---
 qm.adoc | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/qm.adoc b/qm.adoc
index 539912a..1d42891 100644
--- a/qm.adoc
+++ b/qm.adoc
@@ -1961,6 +1961,39 @@ and attaching it to the VM's SCSI controller:
 
 The VM is ready to be started.
 
+[[qm_import_disk_images]]
+Import Disk Images
+~~~~~~~~~~~~~~~~~~
+
+Disk images in the formats `qcow2`, `vmdk` and `raw` can be imported directly
+from a storage marked with the `import` content type. You can upload these
+files in the UI, or put it in the correct folder yourself (usually
+`/path/to/your/storage/import/`).
+
+To import the disk into an existing guest you can use the `import-from` option
+of the disk API.
+
+Here is an example to import the image `disk.qcow2` from the storage `source`
+into the guest with VMID 100 to the storage `local`.
+
+----
+# qm set 100 --scsi0 local:0,import-from=source:import/disk.qcow2
+----
+
+The same syntax is available for vm creation:
+
+----
+# qm create 100 --scsi0 local:0,import-from=source:import/disk.qcow2
+----
+
+These options are also available over the API.
+
+Images imported this way are copied to the target storage and converted into
+the correct format. The original image will not be modified or deleted.
+
+NOTE: Disk importing has a few security restrictions. For example, they can not
+reference external images.
+
 
 ifndef::wiki[]
 include::qm-cloud-init.adoc[]
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to