mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
hotplug: Check for alias in disk detach
If the QEMU_CAPS_DEVICE is set, then ensure the disk device alias has been properly set in prior to making the calls to detach the device.
This commit is contained in:
parent
65be7572d2
commit
5d02a9a0c5
@ -2998,6 +2998,12 @@ qemuDomainDetachVirtioDiskDevice(virQEMUDriverPtr driver,
|
||||
}
|
||||
}
|
||||
|
||||
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE) &&
|
||||
!detach->info.alias) {
|
||||
if (qemuAssignDeviceDiskAlias(vm->def, detach, priv->qemuCaps) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
qemuDomainMarkDeviceForRemoval(vm, &detach->info);
|
||||
|
||||
qemuDomainObjEnterMonitor(driver, vm);
|
||||
|
Loading…
x
Reference in New Issue
Block a user