On 11/20/2014 12:47 AM, Peter Krempa wrote:
On 11/20/14 08:44, Wang Rui wrote:
> On 2014/11/19 18:23, Peter Krempa wrote:
>> New qemu added a new event that is emitted when a virtio serial channel
>> is opened in the guest OS. This allows us to update the state of the
>> port in the output-only XML element.
>>
> Hi, Peter
> IIUC, QEMU emitted the event and libvirt saved the state for the next time
> being queryed. 'the output-only XML element' and 'SaveStatus' means
the state
> is not saved persistently.
This saves the state of the port into the status XML and
>
> In case of libvirtd being restarted after state is saved, we'll lose it. Could
> we handle this case?
the status XML is the piece that is reloaded on libvirtd restart for
running VMs. For inactive VMs this doesn't make sense to report.
When reconnecting to the QMP monitor after a libvirtd restart, we need
to query for whether the agent state has changed in the time that
libvirt was not receiving events. At the same time as VSERPORT_CHANGE
was added as an event, Laszlo also enhanced the 'query-chardev' command
to also poll the current connectedness of the agent channel (qemu commit
32a97ea). This series needs to call that command on reconnect instead
of trusting that the state saved prior to libvirtd restart is still valid.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org