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 054E11FF16F for <inbox@lore.proxmox.com>; Tue, 13 May 2025 09:17:22 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B112219CFD; Tue, 13 May 2025 09:17:41 +0200 (CEST) Message-ID: <8096a392-2cb8-4f5f-9014-8e974dea898c@proxmox.com> Date: Tue, 13 May 2025 09:17:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: "DERUMIER, Alexandre" <alexandre.derumier@groupe-cyllene.com>, "pve-devel@lists.proxmox.com" <pve-devel@lists.proxmox.com> References: <20250422115141.808427-1-alexandre.derumier@groupe-cyllene.com> <mailman.47.1745322774.394.pve-devel@lists.proxmox.com> <38bad46d-cba2-4afe-8f82-eee8aa80c9a1@proxmox.com> <mailman.214.1746542932.394.pve-devel@lists.proxmox.com> <3534d9cd994e60ca891cb5ad443ff572e387c33c.camel@groupe-cyllene.com> <66612251-dbec-4803-9590-62486c10b65f@proxmox.com> <0e129451ee74c8e13d8f3087ff3edf52efb1c220.camel@groupe-cyllene.com> <9dafa637-b0b4-4646-9cb3-2ef17ba98ef8@proxmox.com> <3f363e6e281acb4abadee5cc521a313c4c815a1f.camel@groupe-cyllene.com> Content-Language: en-US From: Fiona Ebner <f.ebner@proxmox.com> In-Reply-To: <3f363e6e281acb4abadee5cc521a313c4c815a1f.camel@groupe-cyllene.com> X-SPAM-LEVEL: Spam detection results: 0 AWL -0.035 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [readthedocs.io, patchew.org] Subject: Re: [pve-devel] [PATCH qemu-server 02/14] blockdev: cmdline: convert drive to blockdev syntax 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> Am 12.05.25 um 17:33 schrieb DERUMIER, Alexandre: > - >> (for example, they are an "size" option on drive not existing on >> blockdev for example, I have wrote details on the patch 3/14.) > >>> I do think we still need the size (would need to be tested), because >>> OVMF would get confused when the image is padded/too large. The >>> commit >>> message for 818ce80ec1a89c4abee61145c858b9323180e31b you mention in >>> 03/14 describes this. > >>> We might need to use a similar approach as proposed in > i.e. using >>> FUSE/NBD export for such images. Alternatively we could check how >>> difficult it would be to add a size setting for blockdev. > > > I have checked the qemu code, it seem that the raw driver have a size > && offset parameters > > They are some examples with nbd export > > in qemu changelog: > > "5. Exporting a partition can still be done by utilizing the --image- > opts option with a raw blockdev using the offset and size parameters > layered on top of any other existing blockdev. > For example, if partition 1 is 100MiB long starting at 1MiB, the old > command: > qemu-nbd -t -P 1 -f qcow2 file.qcow2 > > ---> > > qemu-nbd -t --image-opts > driver=raw,offset=1M,size=100M,file.driver=qcow2,file.file.driver=file, > file.file.filename=file.qcow2 > " > > or in > https://github.com/qemu/qemu/blob/7be29f2f1a3f5b037d27eedbd5df9f441e8c8c16/docs/tools/qemu-nbd.rst#L248 > > " > qemu-nbd \ > --object tls-creds-x509,id=tls0,endpoint=server,dir=/path/to/qemutls > \ > --object 'authz-simple,id=auth0,identity=CN=laptop.example.com,,\ > O=Example Org,,L=London,,ST=London,,C=GB' \ > --tls-creds tls0 --tls-authz auth0 \ > -t -x subset -p 10810 \ > --image-opts > driver=raw,offset=1M,size=1M,file.driver=file,file.filename=file.raw > " > > > libvirt implementation: > https://patchew.org/Libvirt/cover.1579193759.git.pkrempa@redhat.com/4b8e0bd263f8f4a63e0c124eda9d21d02fbd55f4.1579193759.git.pkrempa@redhat.com/ > > > > Seem that it can be set directly in the format node if it's raw, or > like a filter node before the format node Right, so for EFI, we don't need an export and just set the size directly with the raw driver :) We don't need to do any special handling for qcow2 (we already don't do any special handling right now), because there, we already allocate with the correct virtual size. https://qemu.readthedocs.io/en/master/interop/qemu-qmp-ref.html#object-QMP-block-core.BlockdevOptionsRaw _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel