--- Begin Message ---
-
> (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.pkre...@redhat.com/4b8e0bd263f8f4a63e0c124eda9d21d02fbd55f4.1579193759.git.pkre...@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





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

Reply via email to