[libvirt PATCH 0/9] qemu: report guest disks informations

marcandre.lureau@redhat.com posted 9 patches 3 years, 5 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20201120180948.203254-1-marcandre.lureau@redhat.com
include/libvirt/libvirt-domain.h |   1 +
src/libvirt-domain.c             |  17 +++
src/libvirt_private.syms         |   1 +
src/qemu/qemu_agent.c            | 182 +++++++++++++++++++++++--------
src/qemu/qemu_agent.h            |  25 ++++-
src/qemu/qemu_driver.c           | 103 ++++++++++++++++-
src/qemu/qemu_monitor_json.c     |  34 +-----
src/util/virjson.c               |  30 +++++
src/util/virjson.h               |   1 +
tests/qemuagenttest.c            | 111 +++++++++++++++++++
tools/virsh-domain.c             |   6 +
11 files changed, 430 insertions(+), 81 deletions(-)
[libvirt PATCH 0/9] qemu: report guest disks informations
Posted by marcandre.lureau@redhat.com 3 years, 5 months ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Hi,

The following series extends virDomainGetGuestInfo to report disk informations
provided by the new QGA "guest-get-disks" command in QEMU 5.2.

Please review,

Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1899527

Marc-André Lureau (9):
  qemu_agent: rename qemuAgentDiskInfo->qemuAgentDiskAddress
  qemu_agent: export qemuAgentDiskAddressFree & add g_auto
  qemu_agent: factor out qemuAgentGetDiskAddress
  util: json: add virJSONValueObjectGetStringArray convenience
  qemu: use virJSONValueObjectGetStringArray
  qemu_agent: add qemuAgentGetDisks
  domain: add disk informations to virDomainGetGuestInfo
  qemu_driver: report guest disk informations
  virsh: add --disk informations to guestinfo command

 include/libvirt/libvirt-domain.h |   1 +
 src/libvirt-domain.c             |  17 +++
 src/libvirt_private.syms         |   1 +
 src/qemu/qemu_agent.c            | 182 +++++++++++++++++++++++--------
 src/qemu/qemu_agent.h            |  25 ++++-
 src/qemu/qemu_driver.c           | 103 ++++++++++++++++-
 src/qemu/qemu_monitor_json.c     |  34 +-----
 src/util/virjson.c               |  30 +++++
 src/util/virjson.h               |   1 +
 tests/qemuagenttest.c            | 111 +++++++++++++++++++
 tools/virsh-domain.c             |   6 +
 11 files changed, 430 insertions(+), 81 deletions(-)

-- 
2.29.0


Re: [libvirt PATCH 0/9] qemu: report guest disks informations
Posted by Marc-André Lureau 3 years, 4 months ago
On Fri, Nov 20, 2020 at 10:10 PM <marcandre.lureau@redhat.com> wrote:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Hi,
>
> The following series extends virDomainGetGuestInfo to report disk
> informations
> provided by the new QGA "guest-get-disks" command in QEMU 5.2.
>
> Please review,
>

ping


> Fixes:
> https://bugzilla.redhat.com/show_bug.cgi?id=1899527
>
> Marc-André Lureau (9):
>   qemu_agent: rename qemuAgentDiskInfo->qemuAgentDiskAddress
>   qemu_agent: export qemuAgentDiskAddressFree & add g_auto
>   qemu_agent: factor out qemuAgentGetDiskAddress
>   util: json: add virJSONValueObjectGetStringArray convenience
>   qemu: use virJSONValueObjectGetStringArray
>   qemu_agent: add qemuAgentGetDisks
>   domain: add disk informations to virDomainGetGuestInfo
>   qemu_driver: report guest disk informations
>   virsh: add --disk informations to guestinfo command
>
>  include/libvirt/libvirt-domain.h |   1 +
>  src/libvirt-domain.c             |  17 +++
>  src/libvirt_private.syms         |   1 +
>  src/qemu/qemu_agent.c            | 182 +++++++++++++++++++++++--------
>  src/qemu/qemu_agent.h            |  25 ++++-
>  src/qemu/qemu_driver.c           | 103 ++++++++++++++++-
>  src/qemu/qemu_monitor_json.c     |  34 +-----
>  src/util/virjson.c               |  30 +++++
>  src/util/virjson.h               |   1 +
>  tests/qemuagenttest.c            | 111 +++++++++++++++++++
>  tools/virsh-domain.c             |   6 +
>  11 files changed, 430 insertions(+), 81 deletions(-)
>
> --
> 2.29.0
>
>
>

-- 
Marc-André Lureau
Re: [libvirt PATCH 0/9] qemu: report guest disks informations
Posted by Michal Privoznik 3 years, 4 months ago
On 11/20/20 7:09 PM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Hi,
> 
> The following series extends virDomainGetGuestInfo to report disk informations
> provided by the new QGA "guest-get-disks" command in QEMU 5.2.
> 
> Please review,
> 
> Fixes:
> https://bugzilla.redhat.com/show_bug.cgi?id=1899527
> 
> Marc-André Lureau (9):
>    qemu_agent: rename qemuAgentDiskInfo->qemuAgentDiskAddress
>    qemu_agent: export qemuAgentDiskAddressFree & add g_auto
>    qemu_agent: factor out qemuAgentGetDiskAddress
>    util: json: add virJSONValueObjectGetStringArray convenience
>    qemu: use virJSONValueObjectGetStringArray
>    qemu_agent: add qemuAgentGetDisks
>    domain: add disk informations to virDomainGetGuestInfo
>    qemu_driver: report guest disk informations
>    virsh: add --disk informations to guestinfo command
> 
>   include/libvirt/libvirt-domain.h |   1 +
>   src/libvirt-domain.c             |  17 +++
>   src/libvirt_private.syms         |   1 +
>   src/qemu/qemu_agent.c            | 182 +++++++++++++++++++++++--------
>   src/qemu/qemu_agent.h            |  25 ++++-
>   src/qemu/qemu_driver.c           | 103 ++++++++++++++++-
>   src/qemu/qemu_monitor_json.c     |  34 +-----
>   src/util/virjson.c               |  30 +++++
>   src/util/virjson.h               |   1 +
>   tests/qemuagenttest.c            | 111 +++++++++++++++++++
>   tools/virsh-domain.c             |   6 +
>   11 files changed, 430 insertions(+), 81 deletions(-)
> 

Patches look good. A huge sorry for letting these slip the release. To 
make it up to you, I'm proposing couple of adjustments and if you agree 
I will squash in proposed diffs before pushing - so that you don't have 
to send v2.

Tentative:
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

Michal

Re: [libvirt PATCH 0/9] qemu: report guest disks informations
Posted by Marc-André Lureau 3 years, 4 months ago
Hi

On Mon, Nov 30, 2020 at 11:16 PM Michal Privoznik <mprivozn@redhat.com> wrote:
>
> On 11/20/20 7:09 PM, marcandre.lureau@redhat.com wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > Hi,
> >
> > The following series extends virDomainGetGuestInfo to report disk informations
> > provided by the new QGA "guest-get-disks" command in QEMU 5.2.
> >
> > Please review,
> >
> > Fixes:
> > https://bugzilla.redhat.com/show_bug.cgi?id=1899527
> >
> > Marc-André Lureau (9):
> >    qemu_agent: rename qemuAgentDiskInfo->qemuAgentDiskAddress
> >    qemu_agent: export qemuAgentDiskAddressFree & add g_auto
> >    qemu_agent: factor out qemuAgentGetDiskAddress
> >    util: json: add virJSONValueObjectGetStringArray convenience
> >    qemu: use virJSONValueObjectGetStringArray
> >    qemu_agent: add qemuAgentGetDisks
> >    domain: add disk informations to virDomainGetGuestInfo
> >    qemu_driver: report guest disk informations
> >    virsh: add --disk informations to guestinfo command
> >
> >   include/libvirt/libvirt-domain.h |   1 +
> >   src/libvirt-domain.c             |  17 +++
> >   src/libvirt_private.syms         |   1 +
> >   src/qemu/qemu_agent.c            | 182 +++++++++++++++++++++++--------
> >   src/qemu/qemu_agent.h            |  25 ++++-
> >   src/qemu/qemu_driver.c           | 103 ++++++++++++++++-
> >   src/qemu/qemu_monitor_json.c     |  34 +-----
> >   src/util/virjson.c               |  30 +++++
> >   src/util/virjson.h               |   1 +
> >   tests/qemuagenttest.c            | 111 +++++++++++++++++++
> >   tools/virsh-domain.c             |   6 +
> >   11 files changed, 430 insertions(+), 81 deletions(-)
> >
>
> Patches look good. A huge sorry for letting these slip the release. To
> make it up to you, I'm proposing couple of adjustments and if you agree
> I will squash in proposed diffs before pushing - so that you don't have
> to send v2.
>


Fine to me,

> Tentative:
> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
>

thanks!


Re: [libvirt PATCH 0/9] qemu: report guest disks informations
Posted by Michal Privoznik 3 years, 4 months ago
On 12/1/20 8:07 AM, Marc-André Lureau wrote:
> Hi
> 

>> Tentative:
>> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
>>

This is now pushed.

Michal

Re: [libvirt PATCH 0/9] qemu: report guest disks informations
Posted by Han Han 3 years, 4 months ago
On Sat, Nov 21, 2020 at 2:11 AM <marcandre.lureau@redhat.com> wrote:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Hi,
>
> The following series extends virDomainGetGuestInfo to report disk
> informations
> provided by the new QGA "guest-get-disks" command in QEMU 5.2.
>
> Please review,
>
> Fixes:
> https://bugzilla.redhat.com/show_bug.cgi?id=1899527
>
> Marc-André Lureau (9):
>   qemu_agent: rename qemuAgentDiskInfo->qemuAgentDiskAddress
>   qemu_agent: export qemuAgentDiskAddressFree & add g_auto
>   qemu_agent: factor out qemuAgentGetDiskAddress
>   util: json: add virJSONValueObjectGetStringArray convenience
>   qemu: use virJSONValueObjectGetStringArray
>   qemu_agent: add qemuAgentGetDisks
>   domain: add disk informations to virDomainGetGuestInfo
>   qemu_driver: report guest disk informations
>   virsh: add --disk informations to guestinfo command
>
>  include/libvirt/libvirt-domain.h |   1 +
>  src/libvirt-domain.c             |  17 +++
>  src/libvirt_private.syms         |   1 +
>  src/qemu/qemu_agent.c            | 182 +++++++++++++++++++++++--------
>  src/qemu/qemu_agent.h            |  25 ++++-
>  src/qemu/qemu_driver.c           | 103 ++++++++++++++++-
>  src/qemu/qemu_monitor_json.c     |  34 +-----
>  src/util/virjson.c               |  30 +++++
>  src/util/virjson.h               |   1 +
>  tests/qemuagenttest.c            | 111 +++++++++++++++++++
>  tools/virsh-domain.c             |   6 +
>  11 files changed, 430 insertions(+), 81 deletions(-)
>
> --
> 2.29.0
>
>
> Works for me on qemu-5.2.0-0.7.rc2.fc34.x86_64:
For the guest with qemu-guest-agent-5.2.0-0.7.rc2.fc34.x86_64:
➜  ~ virsh guestinfo pc --disks
disks.count         : 2
disks.0.name        : /dev/vda1
disks.0.partition   : yes
disks.0.dependencies.count: 1
disks.0.dependencies.0.name: /dev/vda
disks.1.name        : /dev/vda
disks.1.partition   : no
disks.1.alias       : vda

For the guest with qemu-guest-agent-4.1.1-1.fc31.x86_64:
➜  ~ virsh guestinfo new --disks
error: internal error: unable to execute QEMU agent command
'guest-get-disks': The command guest-get-disks has not been found



-- 
Tested-by: Han Han <hhan@redhat.com>