From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYbc3-00033v-UQ for qemu-devel@nongnu.org; Wed, 24 Feb 2016 10:44:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYbc3-0000ze-3X for qemu-devel@nongnu.org; Wed, 24 Feb 2016 10:44:27 -0500 References: <4a7fc43138fff7dfbebfaf993835b315ea50d01b.1456274059.git.jcody@redhat.com> <20160224102329.GD4485@noname.redhat.com> <20160224154013.GE23671@localhost.localdomain> From: Max Reitz Message-ID: <56CDCFD5.3010004@redhat.com> Date: Wed, 24 Feb 2016 16:44:21 +0100 MIME-Version: 1.0 In-Reply-To: <20160224154013.GE23671@localhost.localdomain> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Vpf0n4OSnlIvHgmFIuET7BAkdHvT5nMqX" Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody , Kevin Wolf Cc: pl@kamp.de, qemu-devel@nongnu.org, qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Vpf0n4OSnlIvHgmFIuET7BAkdHvT5nMqX Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 24.02.2016 16:40, Jeff Cody wrote: > On Wed, Feb 24, 2016 at 11:23:29AM +0100, Kevin Wolf wrote: >> Am 24.02.2016 um 01:47 hat Jeff Cody geschrieben: >>> This tests auto-detection, and overrides, of VHD image sizes created >>> by Virtual PC and Hyper-V. >>> >>> This adds two sample images: >>> >>> hyperv2012r2-dynamic.vhd.bz2 - dynamic VHD image created with Hyper-V= >>> virtualpc-dynamic.vhd.bz2 - dynamic VHD image created with Virtual= PC >>> >>> Signed-off-by: Jeff Cody >> >>> +echo >>> +echo =3D=3D=3D Testing VPC Autodetect =3D=3D=3D >>> +echo >>> +_use_sample_img virtualpc-dynamic.vhd.bz2 >>> + >>> +_launch_qemu -drive file=3D"${TEST_IMG}",id=3Ddisk,format=3Dvpc >>> +h1=3D$QEMU_HANDLE >>> + >>> +_send_qemu_cmd $h1 'qemu-io disk "map"' "sectors" >>> +_send_qemu_cmd $h1 'quit' "" >> >> I would avoid the big hammer of starting qemu processes when qemu-io c= an >> test the same: >> >> $QEMU_IO -c "open -o file=3D${TEST_IMG},id=3Ddisk,format=3Dvpc" -c "ma= p" >> >> Kevin >=20 > The reason I used a qemu process before, was difficulty passing in the > drive options to qemu-io. I futzed around a bit with the new > --image-opts, but I hadn't tried "file=3D" in the open command with -o,= > so I felt a bit silly after your email. >=20 > However, this doesn't seem to work, now that I've tried it. Is it > broken, or am I doing something wrong? Here is what I get: >=20 > # ./qemu-io -c "open -o file=3D/tmp/hyperv2012r2-dynamic.vhd,format=3Dv= pc" -c "map" > can't open: Cannot find device=3D/tmp/hyperv2012r2-dynamic.vhd nor node= _name=3D/tmp/hyperv2012r2-dynamic.vhd Try: $QEMU_IO -c "open -o driver=3Dvpc ${TEST_IMG}" Max >=20 > Technically, I could just rely on image format autodetection since the > current test images are dynamic and not fixed, and use -o to pass the > vpc specific options. I just hate to rely on autodetection anymore. >=20 > -Jeff >=20 --Vpf0n4OSnlIvHgmFIuET7BAkdHvT5nMqX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWzc/VAAoJEDuxQgLoOKytfu4H+wTfIkEaUEA8rFEHSjvvYIwO qo8t64+hhgCQ4SoIW6ITFcSYmIdVMpYD8D3bRpbCRvN9ETueObL2re379OyskZs8 B+3dnj3LXxwzWSkORiGmG29Gb8z5cnMCG8OlfPVxG6HXlQ41WfWZw0jzTApAiGXr 9CUZ2ap5LJ2pBGaPr8C5JRwi8zxglAtHmSJHumMy920z/NBFrjVHnTwgprdwGJXx nFc9y3kXMYl2ypbQiTrSH8kE/gim8I5sHMkv2wIUY4F6xbFzp7FyYBapc+DKEzvJ qelpKBn1pv3/btA1QF17c6qSfAlnwz6gHO1d8ost6Jycx3ecv5WhpTWka+LaE9Y= =BM9U -----END PGP SIGNATURE----- --Vpf0n4OSnlIvHgmFIuET7BAkdHvT5nMqX--