On Mon, Mar 05, 2012 at 06:25:43PM +0800, Osier Yang wrote: > With this patch, libvirt won't start the guest with the medium > source which already ejected by guest when doing migration, or > saving/restoring. > --- > src/qemu/qemu_process.c | 7 +++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c > index 387811a..a75209d 100644 > --- a/src/qemu/qemu_process.c > +++ b/src/qemu/qemu_process.c > @@ -1038,6 +1038,13 @@ qemuProcessHandleTrayMoved(qemuMonitorPtr mon ATTRIBUTE_UNUSED, > event = virDomainEventTrayMovedNewFromObj(vm, > devAlias, > trayOpened); > + > + /* Update disk tray status */ > + disk->tray_status = trayOpened; > + if (virDomainSaveStatus(driver->caps, driver->stateDir, vm) < 0) { > + VIR_WARN("Unable to save status on vm %s after tray moved event", > + vm->def->name); > + } > } > > virDomainObjUnlock(vm); ACK, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@xxxxxxxxxxxx | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list