From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFKkT-00079w-7t for qemu-devel@nongnu.org; Thu, 16 Nov 2017 09:02:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFKkI-0000ER-RL for qemu-devel@nongnu.org; Thu, 16 Nov 2017 09:02:33 -0500 References: <0e6cc220-814a-17fd-4fd7-7b0665d34e81@redhat.com> <30b54865-2255-d13d-a054-afcf5bbd06b2@redhat.com> <20171115202440.GJ19514@redhat.com> <7b11bb2b-b93d-e8ff-f396-703c93549d0d@redhat.com> <20171115202938.GN2787@redhat.com> <5b6f8758-5e3e-e759-1592-2768eb85b322@redhat.com> <04518567-9905-c22c-78f8-ea9dcde7e7ac@redhat.com> From: Max Reitz Message-ID: Date: Thu, 16 Nov 2017 15:02:08 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vLvXJq6BeUAMU5PcrrjW4toqi7aEegpDD" Subject: Re: [Qemu-devel] [Libguestfs] [qemu-img] support for XVA List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gandalf Corvotempesta Cc: "Richard W.M. Jones" , Qemu-block , qemu-devel@nongnu.org, libguestfs This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vLvXJq6BeUAMU5PcrrjW4toqi7aEegpDD From: Max Reitz To: Gandalf Corvotempesta Cc: "Richard W.M. Jones" , Qemu-block , qemu-devel@nongnu.org, libguestfs Message-ID: Subject: Re: [Libguestfs] [Qemu-devel] [qemu-img] support for XVA References: <0e6cc220-814a-17fd-4fd7-7b0665d34e81@redhat.com> <30b54865-2255-d13d-a054-afcf5bbd06b2@redhat.com> <20171115202440.GJ19514@redhat.com> <7b11bb2b-b93d-e8ff-f396-703c93549d0d@redhat.com> <20171115202938.GN2787@redhat.com> <5b6f8758-5e3e-e759-1592-2768eb85b322@redhat.com> <04518567-9905-c22c-78f8-ea9dcde7e7ac@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2017-11-16 11:08, Gandalf Corvotempesta wrote: > 2017-11-15 23:55 GMT+01:00 Max Reitz : >> https://xanclic.moe/convert-xva.rb -- does this work? >> (It seems to works on the two example images I found...) >> >> An example is in the code, you use it like this: >> >> $ ./convert-xva.rb ~/Downloads/stats-appliance-2.36.020502.xva Ref:73 >=20 >=20 > It doesn't work on huge images: >=20 > # time convert-xva.rb 20171115_193814_efff_.xva Ref:10 -O qcow2 disk1.q= cow2 > /usr/bin/convert-xva.rb:119:in `exec': Argument list too long - > qemu-img (Errno::E2BIG) > from /usr/bin/convert-xva.rb:119:in `
' >=20 > real 9m41.414s > user 0m19.280s > sys 0m3.260s Well, there is this: https://github.com/XanClic/qemu.rb/blob/master/examples/convert-xva-onlin= e.rb That should get around that restriction, but currently it is stupidly slow (because it just issues all 1 MB copy operations simultaneously), and it doesn't use qemu-img convert. Instead, it uses a real qemu with block jobs. Ideally, you'd use it like this: $ ./convert-xva-online.rb ~/Downloads/stats-appliance-2.36.020502.xva Ref:73 81936 M $ qemu-img create -f qcow2 [whatever options you need] disk1.qcow2 \ 81936M Formatting 'disk1.qcow2', fmt=3Dqcow2 size=3D85916123136 encryption=3Doff= cluster_size=3D65536 lazy_refcounts=3Doff refcount_bits=3D16 $ ./convert-xva-online.rb ~/Downloads/stats-appliance-2.36.020502.xva \ Ref:73 \ '{"driver":"qcow2", "detect-zeroes":"unmap", "discard":"unmap", "file":{"driver":"file","filename":"disk1.qcow2"}}' Adding block devices... Starting block jobs... 100.00 % of jobs completed (Maybe I can get it faster.) Max --vLvXJq6BeUAMU5PcrrjW4toqi7aEegpDD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQFGBAEBCAAwFiEEkb62CjDbPohX0Rgp9AfbAGHVz0AFAloNmmASHG1yZWl0ekBy ZWRoYXQuY29tAAoJEPQH2wBh1c9ABEgH/3PjMLeHkowc44lV8g3ht5d4GozIHa+X I3g3nPOte7csKKy2n6oGNEJjLpWkPZX9RCvnl7gbqwlENiRqd5CSoXAJ0NMjXIqg 6fuKB0+xhXtdZSQXLavDkoSMdmNXB9BI5y3aE/cHbcecfU5ufR1c0yzrZMFm+bsK 3YfUcUq4+V2tlK+sQB2iH8VYOrc9oxs5iYVztr5Qdw+Sm4bkCjmFtrgVsBx785NX X/dV5A24odvfH3UlOeUCJtaMCQMbaipCUt6NH0sRo/khOyGwEzYTv/xTw8RNThO+ 4jGShssCSgOR+C9XakC7lWSsnf4fnwVf10OfRmApRSiteBLsAtQZVOc= =8EtC -----END PGP SIGNATURE----- --vLvXJq6BeUAMU5PcrrjW4toqi7aEegpDD--