qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Adding an overlay with 'blockdev-add' fails with: "Paramete


From: Kashyap Chamarthy
Subject: [Qemu-devel] Adding an overlay with 'blockdev-add' fails with: "Parameter 'driver' is missing"
Date: Thu, 23 Feb 2017 15:40:34 +0100
User-agent: Mutt/1.6.0.1 (2016-04-01)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]