-
Notifications
You must be signed in to change notification settings - Fork 292
Design proposal to support import/export of Qcow2 VDI #6318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Design proposal to support import/export of Qcow2 VDI #6318
Conversation
At XCP-ng, we are working on overcoming the 2TiB limitation for VM disks while preserving essential features. However, we currently cannot export a VDI to a Qcow2 file, nor import one. The purpose of this design proposal is to outline a solution for implementing VDI import/export in Qcow2 format. Signed-off-by: Guillaume <guillaume.thouvenin@vates.tech>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ends a bit abruptly; giving some details early and less and less as the document goes on. It's fine as a way to document an intent - but it is not a full design.
Agree. It is more to initiate the discussion and have some feedback but yes I need to improve it. Are you thinking about the part about qcow-tool? Because for this part I'm not sure about what is needed. I see that command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This work seems lmited scope and reasonable, although a bit light in the details surrounding the work that needs to be done.
I think it's worth explaining one aspect in particular:
What does adding support for Qcow 2 mean for the handler? That is, how does the detection of format work and how it should be modified?
Ok sure. I will add details about this particular aspect and also in general. |
0a8024c
to
d137934
Compare
- Since the format is checked in the handler, we need to add support for `Qcow2`, | ||
as currently only `Raw`, `Tar`, and `Vhd` are supported. | ||
- This requires adding a new type in the `Importexport.Format` module and a new | ||
content type: `"application/qcow2"`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no official type for qcow2, so I recommend against using a mime type that's not prepended with x-
. Following qcow's mime type, I recommend application/x-qemu-disk-2
, removing '-2' might also be acceptable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will update that thanks. I'm also trying to have a better understanding about how vhd-tool serve
and vhd-tool stream
are working because it is not clear yet what is the Unix file descriptor that is used and how it works within the XAPI. So I'm currently having a closer look to the code and I will update the section.
Thanks for the comment about mimetype 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mimetype for qcow2 (and qcow3) is application/octet-stream, but that's hardly useable for our case, using x-qemu-disk or similar is the way to go for detection. I don't have any other useful objections here, the rest looks reasonable.
d5f67ad
Probably should have squashed the fixups before merging? |
not sure why github allowed it |
At XCP-ng, we are working on overcoming the 2TiB limitation for VM disks while preserving essential features.
However, we currently cannot export a VDI to a Qcow2 file, nor import one. The purpose of this design proposal is to outline a solution for implementing VDI import/export in Qcow2 format.