[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Adding an overlay with 'blockdev-add' fails with: "Para
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] Adding an overlay with 'blockdev-add' fails with: "Parameter 'driver' is missing" |
Date: |
Thu, 23 Feb 2017 10:51:38 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 02/23/2017 10:33 AM, Kashyap Chamarthy wrote:
> On Thu, Feb 23, 2017 at 04:11:21PM +0100, Markus Armbruster wrote:
>> Kashyap Chamarthy <address@hidden> writes:
>>
>>> TL;DR: Using `blockdev-add` to create an overlay file succeeds with QEMU
>>> 2.7.0, however the *same* test fails with QEMU from Git (plus a
>>> couple of patch series from mailing list). Details below.
>>
>> commit 0153d2f50bc2ad3f41810d838fcf66acbf10f07a
>> Author: Kevin Wolf <address@hidden>
>> Date: Fri Oct 7 17:05:04 2016 +0200
>>
>> block: Remove "options" indirection from blockdev-add
>
> [...]
>
>> Sorry for the confusion! Early adopters always have the most fun ;)
>
> Ah, I see, thanks for the pointer.
>
> I tried to come up with the below JSON, after looking at the QAPI schema
> documentation (from qemu/qapi/block-core.json), still I seem to be
> tripping up somewhere. Now it doesn't recognize the 'backing' option:
>
> $ socat UNIX:./qmp-sock READLINE,history=$HOME/.qmp_history,prompt='QMP> '
> [...]
> QMP> {
> QMP> "execute":"blockdev-add",
> QMP> "arguments":{
> QMP> "driver":"qcow2",
> QMP> "node-name":"node1"
> QMP> },
Oops, you ended your arguments too soon.
> QMP> "file":{
> QMP> "driver":"file",
> QMP> "filename":"/export/target.qcow2"
> QMP> },
> QMP> "backing":{
Here, you passed "file" and "backing" as siblings of "execute", but they
should be children of "arguments".
> QMP> "driver":"qcow2",
> QMP> "file":{
> QMP> "driver":"file",
> QMP> "filename":"/export/base.qcow2"
> QMP> }
> QMP> }
> QMP> }
> {"error": {"class": "GenericError", "desc": "QMP input object member
> 'backing' is unexpected"}}
> QMP>
Try (untested on my end) this rewrite of your original post (just
removing the '"options":{' and corresponding '}' from that listing):
{
"execute": "blockdev-add",
"arguments": {
"backing": "virtio0",
"driver": "qcow2",
"id": "virtio1",
"file": {
"driver": "file",
"filename": "/export/target.qcow2"
}
}
}
or this attempt at your current post:
{ "execute":"blockdev-add",
"arguments":{
"driver":"qcow2",
"node-name":"node1"
"file":{
"driver":"file",
"filename":"/export/target.qcow2"
},
"backing":{
"driver":"qcow2",
"file":{
"driver":"file",
"filename":"/export/base.qcow2"
}
}
}
}
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature