[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PATCH 2/4] block/vpc: tests for auto-dete
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [Qemu-block] [PATCH 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images |
Date: |
Wed, 24 Feb 2016 16:49:15 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
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 <address@hidden>
>>
>>> +echo
>>> +echo === Testing VPC Autodetect ===
>>> +echo
>>> +_use_sample_img virtualpc-dynamic.vhd.bz2
>>> +
>>> +_launch_qemu -drive file="${TEST_IMG}",id=disk,format=vpc
>>> +h1=$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 can
>> test the same:
>>
>> $QEMU_IO -c "open -o file=${TEST_IMG},id=disk,format=vpc" -c "map"
>>
>> Kevin
>
> 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=" in the open command with -o,
> so I felt a bit silly after your email.
>
> 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:
>
> # ./qemu-io -c "open -o file=/tmp/hyperv2012r2-dynamic.vhd,format=vpc" -c
> "map"
> can't open: Cannot find device=/tmp/hyperv2012r2-dynamic.vhd nor
> node_name=/tmp/hyperv2012r2-dynamic.vhd
>
> 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.
And I completely skipped this block...
$QEMU_IO resolves to _qemu_io_wrapper; this function will eventually
invoke "$QEMU_IO_PROG" $QEMU_IO_OPTIONS; and $QEMU_IO_OPTIONS resolves
to "-f $IMGFMT --cache $CACHEMODE". Therefore, you don't need to worry
about autodetection anyway.
Max
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create, (continued)
[Qemu-devel] [PATCH 2/4] block/vpc: tests for auto-detecting VPC and Hyper-V VHD images, Jeff Cody, 2016/02/23
[Qemu-devel] [PATCH 4/4] block/vpc: add tests for image creation force_size parameter, Jeff Cody, 2016/02/23