> > > +
> > > + driver = dom->conn->privateData;
> > > + qemuDriverLock(driver);
> > > + vm = virDomainFindByUUID(&driver->domains, dom->uuid);
> > > + if (!vm) {
> > > + qemuReportError(VIR_ERR_NO_DOMAIN, _("cannot find domain '%s'"),
> > > + dom->name);
> > > + goto unlock_out;
> > > + }
> > > +
> > > + if (qemuDomainObjBeginJobWithDriver(driver, vm) < 0) {
> > > + /*
> > > + * For now, just allow updating inactive domains. Further
> > > development
> > > + * will allow updating both active domain and its config file at
> > > + * the same time.
> > > + */
> > > + qemuReportError(VIR_ERR_INVALID_ARG,
> > > + _("cannot update alive domain : %s"),
> > > __FUNCTION__);
> >
> > I think we can silently fail here. Currently this function
> > (qemuDomainModifyDevicePersistent)
> > is called only for modifying inactive domains.
> >
> It seems...."virDomainObjIsActive(vm) check" is lacked..
Yes. What about checking for flag VIR_DOMAIN_DEVICE_MODIFY_LIVE? This
flag is set if domain is active, for example, see cmdAttachDisk().
>
> Above 'if' returns true only when timeout..
>
--
Thanks,
Hu Tao
--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list