From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH docs] virtual machines: document importing disks from import storage
Date: Tue, 8 Apr 2025 16:22:39 +0200 [thread overview]
Message-ID: <20250408142239.3527806-1-d.csapak@proxmox.com> (raw)
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.csapak@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 other threads:[~2025-04-08 14:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250408142239.3527806-1-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal