Bug 1919535 - Can not get the disks of windows guest via guest agent
Summary: Can not get the disks of windows guest via guest agent
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: virtio-win
Version: 8.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Virtualization Maintenance
QA Contact: dehanmeng
URL:
Whiteboard:
Depends On: 1915198
Blocks: 1934497
TreeView+ depends on / blocked
 
Reported: 2021-01-23 14:03 UTC by Lili Zhu
Modified: 2021-05-18 16:26 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1934497 (view as bug list)
Environment:
Last Closed: 2021-05-18 16:25:58 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1915198 0 unspecified CLOSED Rebase mingw-qemu-ga-win to qemu 5.2 2022-07-31 09:47:54 UTC

Description Lili Zhu 2021-01-23 14:03:48 UTC
Description of problem:
Can not get the disks of windows guest

Version-Release number of selected component (if applicable):
virtio-win-1.9.15-0.el8.noarch
qemu-kvm-5.2.0-3.module+el8.4.0+9499+42e58f08.x86_64
libvirt-daemon-7.0.0-1.module+el8.4.0+9464+3e71831a.x86_64

How reproducible:
100%

Steps to Reproduce:
1. prepare a windows with guest agent device
# virsh qemu-agent-command win2k19 '{"execute":"guest-get-time"}'
{"return":1611363375334000000}

2. try to get the disks of windows guest
# virsh qemu-agent-command win2k19 '{"execute":"guest-get-disks"}'
error: internal error: unable to execute QEMU agent command 'guest-get-disks': The command guest-get-disks has not been found

Actual results:
Can not get the disks of windows guest

Additional info:
https://lists.nongnu.org/archive/html/qemu-devel/2020-10/msg03071.html
It can be seen from this patch, implementation of guest-get-disks for Windows has been added to qga in qemu-kvm

Comment 1 Basil Salman 2021-01-24 19:55:25 UTC
This patches that add support for guest-get-disks are not yet included in the downstream build,
this will be fixed after downstream rebase to qemu-5.2.0.

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

Comment 2 lijin 2021-01-25 01:58:49 UTC
Should we close this bug as dup of bz1915198?

Comment 4 Basil Salman 2021-01-25 10:19:30 UTC
It is not a duplicate, but both bugs should be resolved once BZ#1915198 be resolved.
I suggest to keep this BZ open to track and test {"execute":"guest-get-disks"}, when the needed changes are done.

Comment 5 lijin 2021-01-26 01:34:13 UTC
(In reply to Basil Salman from comment #4)
> It is not a duplicate, but both bugs should be resolved once BZ#1915198 be
> resolved.

I rememeber there are other commands not supported until the resbase resolved.
Do we need to file bugs for each of them?
I'm asking since qga QE are aware of the issues, but we thought they will be resolved in rebase process so we did not file bugs so far.
If bugs are needed, we will file them.

> I suggest to keep this BZ open to track and test
> {"execute":"guest-get-disks"}, when the needed changes are done.

Comment 6 Lili Zhu 2021-01-26 02:02:04 UTC
Hi, 

I filed this bug because it will kind of block the verification of Bug #1899527.

Since in Bug #1899527, the feature is not requested for Linux guests only.

I mean, could we track the "guest-get-disks" issue for windows guest in this bug, then 

I can mark Bug #1899527 as verified. Thanks.

Comment 7 Yvugenfi@redhat.com 2021-01-26 08:42:18 UTC
(In reply to lijin from comment #5)
> (In reply to Basil Salman from comment #4)
> > It is not a duplicate, but both bugs should be resolved once BZ#1915198 be
> > resolved.
> 
> I rememeber there are other commands not supported until the resbase
> resolved.
> Do we need to file bugs for each of them?
> I'm asking since qga QE are aware of the issues, but we thought they will be
> resolved in rebase process so we did not file bugs so far.
> If bugs are needed, we will file them.
> 
> > I suggest to keep this BZ open to track and test
> > {"execute":"guest-get-disks"}, when the needed changes are done.

I suggest filing BZs. This way we will be sure that nothing was missed during rebase.

Thanks,
Yan.

Comment 8 lijin 2021-01-26 08:47:40 UTC
(In reply to Lili Zhu from comment #6)
> Hi, 
> 
> I filed this bug because it will kind of block the verification of Bug
> #1899527.
> 
> Since in Bug #1899527, the feature is not requested for Linux guests only.
> 
> I mean, could we track the "guest-get-disks" issue for windows guest in this
> bug, then 
> 
> I can mark Bug #1899527 as verified. Thanks.

Yes according to latest comments.
Thanks

Comment 13 Basil Salman 2021-02-24 22:36:10 UTC
Hi Dehan,

Scratch build with changes:
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=35146591
can this build be verified for this bug too?

Thanks in advance,
Basil

Comment 14 dehanmeng 2021-02-25 00:59:37 UTC
(In reply to Basil Salman from comment #13)
> Hi Dehan,
> 
> Scratch build with changes:
> https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=35146591
> can this build be verified for this bug too?
> 
> Thanks in advance,
> Basil

Hi Basil,
Okay, sure, Will use this new build to check and update result asap. thanks for your effort, Basil.

BR
Dehan

Comment 15 dehanmeng 2021-02-25 06:30:57 UTC
Hi Basil, qga command {"guest-get-disks"} of new build works well. 

reproduce with previous mingw-qemu-ga-win-101.2.0-1.el7ev
step to verify:
1. boot up win2019 guest with serial and qga.
2. connect with guest and execute qga command.

Actual result;
{"execute":"guest-get-disks"}
{"error": {"class": "CommandNotFound", "desc": "The command guest-get-disks has not been found"}}
Expected result:
return disks info of guest successfully.

Verify with this build qemu-ga-win-102.0.0-1.el8.noarch.rpm
step to verify:
1. boot up win2019 guest with serial and qga.
2. connect with guest and execute qga command.

Actually result:
{"execute":"guest-get-disks"}
{"return": [{"name": "\\\\.\\PhysicalDrive0", "partition": false, "address": {"bus-type": "sas", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\.\\PhysicalDrive0", "target": 0}}]}

Expected result:
as above.

Comment 19 Basil Salman 2021-03-06 19:57:26 UTC
Build that resolves this bug:
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=35297151

Comment 20 dehanmeng 2021-03-07 12:32:28 UTC
reproduce with previous mingw-qemu-ga-win-101.2.0-1.el7ev on win10-64(q35)
step to reproduce and actual/expected results as comment15

verify with qemu-ga-win-102.0.0-1.el8.noarch.rpm on win10-64(q35)
step to verify and actual/expected results as above

Comment 21 dehanmeng 2021-03-11 09:57:12 UTC
Hi all, 
The newest qemu-ga-win came out and it has been passed from my side.  the whole test loop and new cases got passed as well.  No further errors and regression issues were found now. Thanks everyone for the time and effort.

Cheers
Dehan

Comment 22 dehanmeng 2021-03-11 09:58:19 UTC
(In reply to dehanmeng from comment #21)
> Hi all, 
> The newest qemu-ga-win came out and it has been passed from my side.  the
> whole test loop and new cases got passed as well.  No further errors and
> regression issues were found now. Thanks everyone for the time and effort.
> 
> Cheers
> Dehan

the qemu-ga-win version is mingw-qemu-ga-win-102.0.0-2.el8

Comment 26 errata-xmlrpc 2021-05-18 16:25:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (virtio-win bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:1959


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