From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id EA81B69DB9 for ; Mon, 14 Mar 2022 16:57:40 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E81BB6380 for ; Mon, 14 Mar 2022 16:57:40 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id F3DA06377 for ; Mon, 14 Mar 2022 16:57:39 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id C3A63463BB for ; Mon, 14 Mar 2022 16:57:39 +0100 (CET) Date: Mon, 14 Mar 2022 16:57:33 +0100 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox VE development discussion References: <20220309100919.31512-1-f.ebner@proxmox.com> In-Reply-To: <20220309100919.31512-1-f.ebner@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1647272668.dywyj5zjzo.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.186 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% 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 T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pve-devel] partially-applied: [PATCH-SERIES v12 qemu-server/manager] API for disk import and OVF X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2022 15:57:41 -0000 applied qemu-server patches except 11 and 14-16, see comments on=20 indivudal patches. some unrelated but possibly fix-able as followup things I noticed: - cloning a running VM with an EFI disk fails, the EFI disk is not=20 mirrorable (so we need another check like for TPM state?) - cancelling a running clone doesn't cleanup properly (stops with trying=20 to aquire lock and leaves the target VM locked & existing) On March 9, 2022 11:09 am, Fabian Ebner wrote: > Extend qm importdisk/importovf functionality to the API. >=20 > Changes from v11 (after an off-list discussion with Fabian G.): > * Avoid confusing $dest->{conf} parameter for clone_disk(). > * Require relevant parameters to be set explicitly for EFI/TPM. > * Base calculation of EFI vars size on passed-in parameters. >=20 > Changes from v10: > * Add fix for device unplug issue (patch #1). > * Add fixes related to calling create_disks() (patches #2 #3). > * Refactor clone_disk() in preparation to re-use it for import > (patches #4 #5 #6). > * Add patch to print the newly allocated drive (patch #14). > * Switch to using clone_disk for PVE-managed volumes and check for > VM.Clone in the permission check if there is an owner ID. > * Require :0 syntax when using import-from. Allowing > other values than 0 for the size would be confusing, because > with import-from that size is never used (the size of the source > image is). > * Avoid making all foreach_volume iterators parse with the > extended schema. Instead, provide a custom iterator for the > places where it's actually required. >=20 > Still missing GUI integration for import from ovf, but that will be it's > own series. >=20 > Older discussion: > https://lists.proxmox.com/pipermail/pve-devel/2022-January/051379.html >=20 >=20 > qemu-server: >=20 > Dominic J=C3=A4ger (1): > api: support VM disk import >=20 > Fabian Ebner (15): > device unplug: verify that unplugging scsi disk completed > api: create disks: always activate/update size when attaching existing > volume > api: update: pass correct config when creating disks > clone disk: remove check for min QEMU version 2.7 > clone disk: group source and target parameters > clone disk: pass in efi vars size rather than config > clone disk: allow cloning from an unused or unreferenced disk > efivars size: allow overriding efidisk parameter > schema: add pve-volume-id-or-absolute-path > parse ovf: untaint path when calling file_size_info > api: add endpoint for parsing .ovf files > image convert: allow block device as source > api: factor out check/cleanup for drive params > schema: drive: use separate schema when disk allocation is possible > api: update vm: print drive string for newly allocated/imported drives >=20 > PVE/API2/Qemu.pm | 381 +++++++++++++++++++++++++++-------- > PVE/API2/Qemu/Makefile | 2 +- > PVE/API2/Qemu/OVF.pm | 55 +++++ > PVE/QemuServer.pm | 106 +++++++--- > PVE/QemuServer/Drive.pm | 94 ++++++--- > PVE/QemuServer/ImportDisk.pm | 2 +- > PVE/QemuServer/OVF.pm | 9 +- > 7 files changed, 508 insertions(+), 141 deletions(-) > create mode 100644 PVE/API2/Qemu/OVF.pm >=20 >=20 > manager: >=20 > Fabian Ebner (1): > api: nodes: add readovf endpoint >=20 > PVE/API2/Nodes.pm | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > --=20 > 2.30.2 >=20 >=20 >=20 > _______________________________________________ > pve-devel mailing list > pve-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel >=20