qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] how to dynamically add a block device using qmp?


From: Ken Chiang
Subject: [Qemu-devel] how to dynamically add a block device using qmp?
Date: Fri, 10 Oct 2014 16:52:27 -0700
User-agent: Mutt/1.5.18 (2008-05-17)

Hello,

I am trying to add a block device dynamically using qmp and are having some 
issues.

After successfully adding the block device using "blockdev-add" and verifying 
that it has been added using "query-block", I am unable to see the block device 
in the VM under /dev/sdXX

I am using ubuntu14.04LTS: qmp version: 
{"QMP": {"version": {"qemu": {"micro": 0, "minor": 0, "major": 2}, "package": " 
(Debian 2.0.0+dfsg-2ubuntu1.2)"}, "capabilities": []}}

Here's what I am doing:
1.  /usr/bin/kvm-spice -hda kvmimages/ubuntu.image -m 768 -usbdevice tablet 
-vnc :5 -qmp tcp:localhost:4444,server,nowait

2.  telnet localhost 4444

3.  In the telnet session run:
{"execute":"qmp_capabilities"}
{"return": {}}
{ "execute": "blockdev-add",
   "arguments": { "options" : {
        "id": "disk1",
        "driver": "qcow2",
        "file": { "driver": "file",
            "filename": "testvm.qc2" } } } }
{"return": {}}

{ "execute": "query-block" }

4. query-block returns the device "disk1", but when I check the vm:
   # vncviewer :5
   
there are no new devices.

I thought that maybe it is a hotplug SATA bug detailed here: 
http://ubuntuforums.org/showthread.php?t=1998055

but running:
#rescan-scsi-bus resulted in no new block devices.

Thanks for any help!

Ken



reply via email to

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