[libvirt] [PATCH 06/11] qemu: Add handling for VSERPORT_CHANGE event

Eric Blake eblake at redhat.com
Thu Nov 20 13:11:41 UTC 2014

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141120/55d411c5/attachment-0001.sig>

More information about the libvir-list mailing list