mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
qemu: Add the new disk src into shared disk table when updating disk
We should record the new disk src in the shared disk table for updating disk (CD-ROM or Floppy) API. Fortunately, we only allow to update the disk source now, otherwise we might also want to set the unpriv_sgio setting.
This commit is contained in:
parent
4b143ab231
commit
65f61e4594
@ -6067,6 +6067,10 @@ qemuDomainChangeDiskMediaLive(virDomainObjPtr vm,
|
||||
}
|
||||
dev->data.disk = tmp;
|
||||
|
||||
/* Add the new disk src into shared disk hash table */
|
||||
if (qemuAddSharedDisk(driver, dev->data.disk, vm->def->name) < 0)
|
||||
goto end;
|
||||
|
||||
ret = qemuDomainChangeEjectableMedia(driver, vm, disk, orig_disk, force);
|
||||
if (ret == 0) {
|
||||
dev->data.disk = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user