Skip to content

Conversation

@last-genius
Copy link
Contributor

Final touches for qcow2 VDI import/export - add it as one of the supported formats and plumb through the calls to the python script for export and qcow-stream library for import via qcow_tool_wrapper and qcow-stream-tool.

qcow-stream-tool is a thin wrapper executable over qcow-stream, so that xapi doesn't have to use Lwt code in its process (it's not thread-safe, see #6573 for the discussion on this)


This was tested manually, confirmed to have the same behaviour as the previous version (#6573)


This PR requires the following additions to the specfile:

@@ -166,6 +172,7 @@ Requires: hwdata
 Requires: /usr/sbin/ssmtp
 Requires: stunnel >= 5.55
 Requires: vhd-tool
+Requires: qcow-stream-tool
 Requires: libffi
 Requires: busybox
 Requires: iproute
@@ -397,9 +404,15 @@ This packages contains plugins registering to the RRD daemon and exposing variou
 %package -n vhd-tool
 Summary: Command-line tools for manipulating and streaming .vhd format files

+%package -n qcow-stream-tool
+Summary: Minimal CLI wrapper for qcow-stream
+
 %description -n vhd-tool
 Simple command-line tools for manipulating and streaming .vhd format file.

+%description -n qcow-stream-tool
+Minimal CLI wrapper for qcow-stream
+
 %package -n xcp-networkd
 Summary:  Simple host network management service for the xapi toolstack
 Requires: ethtool
@@ -1339,6 +1353,9 @@ done
 /opt/xensource/libexec/get_nbd_extents.py
 /opt/xensource/libexec/python_nbd_client.py

+%files -n qcow-stream-tool
+%{_bindir}/qcow-stream-tool
+
 %files -n xcp-networkd
 %{_sbindir}/xcp-networkd
 %{_bindir}/networkd_db

@last-genius
Copy link
Contributor Author

last-genius commented Jul 16, 2025

weird test failed, even though it passes locally and passed in my fork. i'm re-running it

@last-genius last-genius force-pushed the asv/qcow-tool branch 2 times, most recently from b9b5de1 to 6e41c2c Compare July 16, 2025 13:24
qcow-stream uses Lwt, which is not thread-safe, so we want to avoid using it in
the xapi process. Create a CLI wrapper for calls to qcow-stream.

Signed-off-by: Andrii Sultanov <[email protected]>
This patch allows to pass "qcow2" as a supported format when calling VDI
export and import.

Qcow_tool_wrapper is added as a helper that calls the Python script for export
(conversion from raw to qcow2 stream) and the qcow-tool CLI tool (ocaml-qcow
library) for import (conversion from qcow2 stream to raw).

Signed-off-by: Guillaume <[email protected]>
Signed-off-by: Andrii Sultanov <[email protected]>
Also add an mli file for qcow_tool_wrapper

Signed-off-by: Andrii Sultanov <[email protected]>
@last-genius
Copy link
Contributor Author

I am merging this. Please note the necessary change to the specfile given in the PR description.

@last-genius last-genius added this pull request to the merge queue Jul 16, 2025
Merged via the queue into xapi-project:master with commit 2364685 Jul 16, 2025
16 checks passed
@robhoes
Copy link
Member

robhoes commented Jul 18, 2025

I am merging this. Please note the necessary change to the specfile given in the PR description.

It also needs a new xs-opam release...

@last-genius
Copy link
Contributor Author

I am merging this. Please note the necessary change to the specfile given in the PR description.

It also needs a new xs-opam release...

Yes, indeed, preferrably with xapi-project/xs-opam#735 merged first.

Sorry, I missed that there hasn't been a new release in a month+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants