[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] hotremoving a disk qmp/hmp
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] hotremoving a disk qmp/hmp |
Date: |
Tue, 18 Nov 2014 15:22:50 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
William Dauchy <address@hidden> writes:
> Hello,
>
> When hotremoving a disk I'm using the QMP API with device_del command;
>
> Previous query-block command result:
>
> { u'device': u'disk1',
> u'inserted': { u'backing_file_depth': 0,
> u'bps': 0,
> u'bps_rd': 0,
> u'bps_wr': 0,
> u'detect_zeroes': u'off',
> u'drv': u'raw',
> u'encrypted': False,
> u'encryption_key_missing': False,
> u'file': u'/dev/sda',
> u'image': { u'actual-size': 0,
> u'dirty-flag': False,
> u'filename': u'/dev/sda',
> u'format': u'raw',
> u'virtual-size': 3221225472},
> u'iops': 0,
> u'iops_rd': 0,
> u'iops_wr': 0,
> u'ro': False},
> u'io-status': u'ok',
> u'locked': True,
> u'removable': True,
> u'tray_open': False,
> u'type': u'unknown'}
This is block backend "disk1".
> After a device_del command I have the same thing but "'locked': False"
I presume you're deleting the device using backend "disk1".
What kind of device is this? PCI, perhaps?
> Then I can also do `eject device=disk1` which bring me to:
>
> { u'device': u'disk1',
> u'io-status': u'ok',
> u'locked': False,
> u'removable': True,
> u'tray_open': False,
> u'type': u'unknown'}
>
> But I did not found a way to completely remove the disk1 entry in order
> to be able to add it again.
> To complete the operation I need to use the old HMP API and use
> `drive_del` command.
>
> Did I miss something? or is it still something missing in QMP API?
Please show us a complete QMP conversation.