From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFQDh-0007Vu-Ur for qemu-devel@nongnu.org; Mon, 17 Feb 2014 10:35:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFQDb-0005CT-C1 for qemu-devel@nongnu.org; Mon, 17 Feb 2014 10:34:57 -0500 Received: from mail4.gandi.net ([217.70.183.210]:42072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFQDa-0005BF-Vx for qemu-devel@nongnu.org; Mon, 17 Feb 2014 10:34:51 -0500 Date: Mon, 17 Feb 2014 16:36:42 +0100 From: William Dauchy Message-ID: <20140217153642.GI2390@gandi.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gTY1JhLGodeuSBqf" Content-Disposition: inline Subject: [Qemu-devel] device_del id missing after blockdev-add List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, imain@redhat.com --gTY1JhLGodeuSBqf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, I'm starting qemu with the following config in order to test drive hotremove and hotadd: [drive "disk1"] if =3D "none" id =3D "disk1" cache =3D "none" aio =3D "native" format =3D "raw" file =3D "/dev/sda" [device "disk1"] driver =3D "scsi-hd" drive =3D "disk1" scsi-id =3D "1" removable =3D "on" vendor =3D "gandi.net" dpofua =3D "off" I'm now testing device removable without any problem: (QEMU) device_del id=3Ddisk1 { u'return': { }} (QEMU)=20 {u'timestamp': {u'seconds': 1392645815, u'microseconds': 484557}, u'data': = {u'device': u'disk1', u'path': u'/machine/peripheral/disk1'}, u'event': u'D= EVICE_DELETED'} then, I want to readd the disk, without anyproblem too (with the same id): { "execute": "blockdev-add", "arguments": {'options' : {'driver': 'raw', 'i= d':'disk1', 'file': {'driver': 'file', 'filename': '/dev/sda'}}} } { "device_add", "arguments": {'driver':'scsi-hd', 'drive':'disk1', 'scsi-i'= :1, 'removable':on} } The issue is when I want to hot remove the disk again: (QEMU) device_del id=3Ddisk1 { u'error': { u'class': u'DeviceNotFound', u'desc': u"Device 'disk1' not found"}} the output of query-block is the same everywhere: { u'device': u'disk1', u'inserted': { u'backing_file_depth': 0, u'bps': 0, u'bps_rd': 0, u'bps_wr': 0, 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/s= da', u'format': u'raw', u'virtual-size': 3221= 225472}, u'iops': 0, u'iops_rd': 0, u'iops_wr': 0, u'ro': False}, u'io-status': u'ok', u'locked': False, u'removable': True, u'tray_open': False, u'type': u'unknown'}]} I guess blockdev-add is not storing the device details as it's done when using the configuration file, i.e, id is not stored correctly when using blockdev-add. Should I consider this as a bug or I wait for the merge of blockdev-del and ignore device_del command? In all cases I guess device_del should work in this case too. these tests were done using the last version available on the git repo (using master branch) Regards, --=20 William --gTY1JhLGodeuSBqf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlMCLIoACgkQ1I6eqOUidQEmqQCgk/S3XNOo//wh5DBQAYxASOtk r6QAniYE9PXNMP3I/f4ISTiHLnb7c3Bp =RPda -----END PGP SIGNATURE----- --gTY1JhLGodeuSBqf--