diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 95ed6c0658c123de1a24ca755e1142304982ecb7..476e3ed2d56a9b4cad0b98a173d8629c39b2db64 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3189,6 +3189,7 @@ qemuProcessReconnect(void *opaque) int reason; virQEMUDriverConfigPtr cfg; virCapsPtr caps = NULL; + size_t i; memcpy(&oldjob, &data->oldjob, sizeof(oldjob)); @@ -3230,6 +3231,15 @@ qemuProcessReconnect(void *opaque) if (qemuUpdateActiveUsbHostdevs(driver, obj->def) < 0) goto error; + /* XXX: Need to change as long as lock is introduced for + * qemu_driver->sharedDisks. + */ + for (i = 0; i < obj->def->ndisks; i++) { + if (qemuAddSharedDisk(driver, obj->def->disks[i], + obj->def->name) < 0) + goto error; + } + if (qemuProcessUpdateState(driver, obj) < 0) goto error;