On Fri, Jul 22, 2016 at 01:42:44PM +0200, Peter Krempa wrote:
On Fri, Jul 22, 2016 at 12:08:45 +0200, Guido Günther wrote:
> We have a qemuMonitorDriveDel now so use it
> ---
> src/qemu/qemu_hotplug.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
> index e8a30d5..6232a0e 100644
> --- a/src/qemu/qemu_hotplug.c
> +++ b/src/qemu/qemu_hotplug.c
> @@ -678,11 +678,12 @@ qemuDomainAttachSCSIDisk(virConnectPtr conn,
> return ret;
>
> exit_monitor:
> - /* XXX should call 'drive_del' on error but this does not exist yet */
> - if (driveAdded)
> - VIR_WARN("qemuMonitorAddDevice failed on %s (%s)", drivestr,
devstr);
> -
> orig_err = virSaveLastError();
> + if (driveAdded && qemuMonitorDriveDel(priv->mon, drivestr) < 0)
{
This won't work. You need to delete the drive by alias.
See commit 64c6695f1ad72f0a99faace5deb1caf7effa2275
Thanks! John's patch from the "Various hotplug cleanup" series handles
this with alias already so I'll not update this one.
Cheers,
-- Guido