Bug 1515817 - [RFE] provide access to information from QEMU Guest Agent
Summary: [RFE] provide access to information from QEMU Guest Agent
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-21 12:29 UTC by Tomáš Golembiovský
Modified: 2020-04-17 13:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-17 13:31:28 UTC
Embargoed:


Attachments (Terms of Use)

Description Tomáš Golembiovský 2017-11-21 12:29:39 UTC
QEMU-GA has evolved a little and does not provide just service functions (shutdown/reboot or file system freeze), but also a bunch of functions that query the information about the guest OS. Such as list of network interfaces with their IP addresses, file systems, date and time, list of active users, etc. Currently, there is no supported way how to access this information.

The interesting commands (at the time of writing) in QEMU-GA are:

    guest-get-fsinfo: information about mounted filesystems
    guest-get-host-name: guest host name
    guest-get-osinfo: inormation about guest OS
    guest-get-timezone: current timzeone
    guest-get-users: list of logged in users
    guest-network-get-interfaces: list of network interfaces and addresses

I can imagine that the current date/time (guest-get-time) could be interesting for some management apps too.

Comment 1 Michal Privoznik 2017-11-21 13:29:47 UTC
(In reply to Tomáš Golembiovský from comment #0)
> QEMU-GA has evolved a little and does not provide just service functions
> (shutdown/reboot or file system freeze), but also a bunch of functions that
> query the information about the guest OS. Such as list of network interfaces
> with their IP addresses, file systems, date and time, list of active users,
> etc. Currently, there is no supported way how to access this information.
> 
> The interesting commands (at the time of writing) in QEMU-GA are:
> 
>     guest-get-fsinfo: information about mounted filesystems
>     guest-get-host-name: guest host name
>     guest-get-osinfo: inormation about guest OS
>     guest-get-timezone: current timzeone
>     guest-get-users: list of logged in users

This one:

>     guest-network-get-interfaces: list of network interfaces and addresses

is already exposed as virDomainInterfaceAddresses(source = VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT);

> 
> I can imagine that the current date/time (guest-get-time) could be
> interesting for some management apps too.

Again, exposed as:

virDomainSetTime();
virDomainGetTime();

Comment 2 Daniel Berrangé 2020-04-17 13:31:28 UTC
Much of this was exposed in the new virDomainGetGuestInfo in v5.7.0


Note You need to log in before you can comment on or make changes to this bug.