From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <pve-devel-bounces@lists.proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 9B5CB1FF15E for <inbox@lore.proxmox.com>; Tue, 8 Apr 2025 16:23:15 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C26EA1F7C1; Tue, 8 Apr 2025 16:23:12 +0200 (CEST) From: Dominik Csapak <d.csapak@proxmox.com> To: pve-devel@lists.proxmox.com Date: Tue, 8 Apr 2025 16:22:39 +0200 Message-Id: <20250408142239.3527806-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.022 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH docs] virtual machines: document importing disks from import storage X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com> 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