qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Adding an overlay with 'blockdev-add' fails with: "Parameter 'driver' is missing"
@ 2017-02-23 14:40 Kashyap Chamarthy
  2017-02-23 15:11 ` Markus Armbruster
  0 siblings, 1 reply; 6+ messages in thread
From: Kashyap Chamarthy @ 2017-02-23 14:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru

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.

QEMU invocation:

  $ qemu-system-x86_64 -display none \
     -nodefconfig -nodefaults -m 512 -device virtio-scsi-pci,id=scsi \
     -device virtio-serial-pci \
     -drive file=./base.qcow2,format=qcow2,if=virtio \
     -monitor stdio -qmp unix:./qmp-sock,server,nowait

With QEMU 2.7.0
---------------

$ qemu-system-x86_64 --version
QEMU emulator version 2.7.0(qemu-2.7.0-8.fc24) [...]

Create the overlay file: 

    $ qemu-img create -f qcow2 /export/target.qcow2 1G

$ ./qmp-shell -v -p /export/qmp-sock

(QEMU) blockdev-add options={"id":"virtio1","driver":"qcow2","file":{"driver":"file","filename":"/export/target.qcow2"},"backing":"virtio0"}
{
    "execute": "blockdev-add", 
    "arguments": {
        "options": {
            "backing": "virtio0", 
            "driver": "qcow2", 
            "id": "virtio1", 
            "file": {
                "driver": "file", 
                "filename": "/export/target.qcow2"
            }
        }
    }
}
{
    "return": {}
}
(QEMU) 

* * *

With Git Master (v2.8.0-1462-g612bb5d-dirty)
--------------------------------------------

Note: I applied these three patch series:

  - [PATCH v2 00/24] QemuOpts util/cutils: Fix and clean up number
    conversions"
  - [PATCH 00/14] qobject: Cleanups, mostly in tests
  - [PATCH 0/2] qapi: Improve qobject input visitor error reporting

So, I'm here:

  $ git describe
	pull-block-2017-02-21-81-g612bb5d

The same test as above (but with the QEMU from Git + above patch
series):

- Stop system QEMU
- Start QEMU built from Git (with the above patches)
- Try to add 'target.qcow2' block device via `blockdev-add`, it now
  fails as below:

  [...]
  (QEMU)
  {
      "execute": "blockdev-add", 
      "arguments": {
          "options": {
              "backing": "virtio0", 
              "driver": "qcow2", 
              "id": "virtio1", 
              "file": {
                  "driver": "file", 
                  "filename": "/export/target.qcow2"
              }
          }
      }
  }
  {
      "error": {
          "class": "GenericError", 
          "desc": "Parameter 'driver' is missing"
      }
  }
  (QEMU) 

* * *

Is this a regression or am I missing something?

-- 
/kashyap

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-02-24 11:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-23 14:40 [Qemu-devel] Adding an overlay with 'blockdev-add' fails with: "Parameter 'driver' is missing" Kashyap Chamarthy
2017-02-23 15:11 ` Markus Armbruster
2017-02-23 16:33   ` Kashyap Chamarthy
2017-02-23 16:51     ` Eric Blake
2017-02-24 10:53       ` Kashyap Chamarthy
2017-02-24 11:43         ` Kashyap Chamarthy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).