Bug 1565431

Summary: "Disk" is [] in the result of guest-get-fsinfo cmd which is odd
Product: Red Hat Enterprise Linux 8 Reporter: xiagao
Component: virtio-winAssignee: Virtualization Maintenance <virt-maint>
virtio-win sub component: qemu-ga-win QA Contact: Virtualization Bugs <virt-bugs>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: unspecified    
Priority: high CC: ailan, lijin, mtessun, vrozenfe
Version: 8.0   
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-14 02:03:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
qemu-ga service status
none
event viewer log
none
pkg info
none
qemu-ga service stop
none
file system of guest none

Description xiagao 2018-04-10 02:30:43 UTC
Description of problem:
as summary

Version-Release number of selected component (if applicable):
mingw-qemu-ga-win-7.5.0-2.el7ev
virtio-win-1.9.4-2.el7

How reproducible:
100%

Steps to Reproduce:
1.boot up windows guest with virtio serial driver and qemu-ga-win installed.

2.issue fsfreeze cmd from host
#nc -U /var/tmp/qga.sock
{"return": [{"name": "\\\\?\\Volume{2738039e-2104-11e8-a1e0-806e6f6e6963}\\", "mountpoint": "F:\\", "disk": [], "type": "CDFS"}, {"name": "\\\\?\\Volume{10ea4f69-0000-0000-0000-d01200000000}\\", "mountpoint": "C:\\", "disk": [], "type": "NTFS"}, {"name": "\\\\?\\Volume{f7ddab2c-0000-0000-0000-010000000000}\\", "mountpoint": "D:\\", "disk": [], "type": "NTFS"}, {"name": "\\\\?\\Volume{c124f37b-0000-0000-0000-010000000000}\\", "mountpoint": "E:\\", "disk": [], "type": "NTFS"}, {"name": "\\\\?\\Volume{10ea4f69-0000-0000-0000-100000000000}\\", "mountpoint": "S:\\", "disk": [], "type": "NTFS"}]}


Actual results:
as step 2. "disk": []

Expected results:
disk field should not be empty.

Additional info:
test fsinfo cmd with rhel7.5 guest,get the following result.
{"return": [{"name": "sdb1", "mountpoint": "/boot", "disk": [{"bus-type": "ide", "bus": 0, "unit": 0, "pci-controller": {"bus": 0, "slot": 1, "domain": 0, "function": 1}, "target": 0}], "type": "xfs"}, {"name": "dm-0", "mountpoint": "/", "disk": [{"bus-type": "ide", "bus": 0, "unit": 0, "pci-controller": {"bus": 0, "slot": 1, "domain": 0, "function": 1}, "target": 0}], "type": "xfs"}]}

Comment 2 Sameeh Jubran 2018-05-31 08:20:32 UTC
Tried to reproduce,

* boot up windows guest with virtio serial driver and qemu-ga-win installed.
* issue fsfreeze cmd from host {"execute":"guest-fsfreeze-freeze"} it didnt return what was stated by the you, it returned the number of disks frozen {"return": 2}, Which is supposed to be correct according to the qemu-ga documentation.

* issue get-fsinfo {"execute":"guest-get-fsinfo"} DID get something similar, (GuestFilesystemInfo object), and Disk is []

NOTE: couldn't run get-fsinfo when the fs was frozen, had to thaw the fs then run get-fsinfo.
NOTE: in the documentation of get-fsinfo it is state that Disk will be empty if the disk type is not supported

Reference https://qemu.weilnetz.de/doc/qemu-ga-ref.html

Comment 3 xiagao 2018-06-21 05:28:42 UTC
(In reply to Sameeh Jubran from comment #2)
> Tried to reproduce,
> 
> * boot up windows guest with virtio serial driver and qemu-ga-win installed.
> * issue fsfreeze cmd from host {"execute":"guest-fsfreeze-freeze"} it didnt
> return what was stated by the you, it returned the number of disks frozen
> {"return": 2}, Which is supposed to be correct according to the qemu-ga
> documentation.
> 
> * issue get-fsinfo {"execute":"guest-get-fsinfo"} DID get something similar,
> (GuestFilesystemInfo object), and Disk is []
> 
> NOTE: couldn't run get-fsinfo when the fs was frozen, had to thaw the fs
> then run get-fsinfo.
> NOTE: in the documentation of get-fsinfo it is state that Disk will be empty
> if the disk type is not supported
> 
> Reference https://qemu.weilnetz.de/doc/qemu-ga-ref.html

First, sorry to confuse you from comment 0, I just issue {"execute":"guest-get-fsinfo"} cmd not {"execute":"guest-fsfreeze-freeze"} cmd.

And the disk is local disk but not Network filesystems (such as CIFS and NFS).

Test it again and get the same result, so I think "disk": [] is not correct.

# nc -U /tmp/qga-win7 
 {"execute":"guest-get-fsinfo"}
{"return": [{"name": "\\\\?\\Volume{4d9a17d1-707c-11e8-8573-806e6f6e6963}\\", "mountpoint": "F:\\", "disk": [], "type": "CDFS"}, {"name": "\\\\?\\Volume{4d9a17d0-707c-11e8-8573-806e6f6e6963}\\", "mountpoint": "E:\\", "disk": [], "type": "CDFS"}, {"name": "\\\\?\\Volume{3475515e-708c-11e8-bc41-806e6f6e6963}\\", "mountpoint": "C:\\", "disk": [], "type": "NTFS"}, {"name": "\\\\?\\Volume{4d9a17ca-707c-11e8-8573-806e6f6e6963}\\", "mountpoint": "D:\\", "disk": [], "type": "NTFS"}, {"name": "\\\\?\\Volume{3475515d-708c-11e8-bc41-806e6f6e6963}\\", "mountpoint": "S:\\", "disk": [], "type": "NTFS"}]}

Comment 4 xiagao 2018-06-21 05:35:51 UTC
(In reply to xiagao from comment #3)
> (In reply to Sameeh Jubran from comment #2)
> > Tried to reproduce,
> > 
> > * boot up windows guest with virtio serial driver and qemu-ga-win installed.
> > * issue fsfreeze cmd from host {"execute":"guest-fsfreeze-freeze"} it didnt
> > return what was stated by the you, it returned the number of disks frozen
> > {"return": 2}, Which is supposed to be correct according to the qemu-ga
> > documentation.
> > 
> > * issue get-fsinfo {"execute":"guest-get-fsinfo"} DID get something similar,
> > (GuestFilesystemInfo object), and Disk is []
> > 
> > NOTE: couldn't run get-fsinfo when the fs was frozen, had to thaw the fs
> > then run get-fsinfo.
> > NOTE: in the documentation of get-fsinfo it is state that Disk will be empty
> > if the disk type is not supported
> > 
> > Reference https://qemu.weilnetz.de/doc/qemu-ga-ref.html
> 
> First, sorry to confuse you from comment 0, I just issue
> {"execute":"guest-get-fsinfo"} cmd not {"execute":"guest-fsfreeze-freeze"}
> cmd.
> 
> And the disk is local disk but not Network filesystems (such as CIFS and
> NFS).
> 
> Test it again and get the same result, so I think "disk": [] is not correct.
> 
> # nc -U /tmp/qga-win7 
>  {"execute":"guest-get-fsinfo"}
> {"return": [{"name":
> "\\\\?\\Volume{4d9a17d1-707c-11e8-8573-806e6f6e6963}\\", "mountpoint":
> "F:\\", "disk": [], "type": "CDFS"}, {"name":
> "\\\\?\\Volume{4d9a17d0-707c-11e8-8573-806e6f6e6963}\\", "mountpoint":
> "E:\\", "disk": [], "type": "CDFS"}, {"name":
> "\\\\?\\Volume{3475515e-708c-11e8-bc41-806e6f6e6963}\\", "mountpoint":
> "C:\\", "disk": [], "type": "NTFS"}, {"name":
> "\\\\?\\Volume{4d9a17ca-707c-11e8-8573-806e6f6e6963}\\", "mountpoint":
> "D:\\", "disk": [], "type": "NTFS"}, {"name":
> "\\\\?\\Volume{3475515d-708c-11e8-bc41-806e6f6e6963}\\", "mountpoint":
> "S:\\", "disk": [], "type": "NTFS"}]}

C: D: S: is in local and filesystem is NTFS.

Comment 5 Sameeh Jubran 2018-06-21 15:14:06 UTC
Hi,

The issue should be fixed in the following build, can you please confirm this?

https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16818633

Comment 6 xiagao 2018-06-22 06:03:59 UTC
(In reply to Sameeh Jubran from comment #5)
> Hi,
> 
> The issue should be fixed in the following build, can you please confirm
> this?
> 
> https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16818633

Qemu guest agent service will be stopped status after issuing  {"execute":"guest-get-fsinfo"} cmd. I take a screenshot about qemu-ga service in attachment.

Comment 7 xiagao 2018-06-22 06:05:01 UTC
Created attachment 1453655 [details]
qemu-ga service status

qemu-ga service status after trigger get fsinfo cmd

Comment 8 Sameeh Jubran 2018-06-24 13:35:58 UTC
(In reply to xiagao from comment #7)
> Created attachment 1453655 [details]
> qemu-ga service status
> 
> qemu-ga service status after trigger get fsinfo cmd

The crash seems to be fixed by this commit:
https://github.com/qemu/qemu/commit/9bd8e9330ade42878b19a5172131087220d590d5#diff-7f29c3e51a7b387cc7717e7be4f6e205

I'll apply it and build a version to test it :)

Comment 9 Sameeh Jubran 2018-06-24 15:36:53 UTC
Can you please confirm that in this build the issue is fixed?

https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16850812

Comment 10 xiagao 2018-06-25 02:58:29 UTC
Created attachment 1454223 [details]
event viewer log

Still hit this issue. Service is stopped status after run get-fsinfo cmd.

Comment 11 Sameeh Jubran 2018-06-27 13:57:23 UTC
The issue should be fixed in the following build:

https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16889965

I have sent two patches upstream which fix the issue:
https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg07500.html

Can you please confirm that the issue is fixed?

Thanks :)

Comment 12 xiagao 2018-07-11 09:13:44 UTC
Test mingw-qemu-ga-win-7.6.0-2.el7ev, but still hit this issue like comment 10.

Comment 13 Sameeh Jubran 2018-07-11 09:35:58 UTC
(In reply to xiagao from comment #12)
> Test mingw-qemu-ga-win-7.6.0-2.el7ev, but still hit this issue like comment
> 10.

I have just tested it and it seems to be working for me. No crashes what so ever. Are you sure that you did uninstall the earlier version that was installed?

Comment 14 xiagao 2018-07-12 10:18:32 UTC
(In reply to Sameeh Jubran from comment #13)
> (In reply to xiagao from comment #12)
> > Test mingw-qemu-ga-win-7.6.0-2.el7ev, but still hit this issue like comment
> > 10.
> 
> I have just tested it and it seems to be working for me. No crashes what so
> ever. Are you sure that you did uninstall the earlier version that was
> installed?

I tried twice, it actually hit crash.You can check the attachment about my test pkg info.

Comment 15 xiagao 2018-07-12 10:18:55 UTC
Created attachment 1458338 [details]
pkg info

Comment 16 Sameeh Jubran 2018-07-12 10:20:45 UTC
(In reply to xiagao from comment #15)
> Created attachment 1458338 [details]
> pkg info

Can you please give me access to the machine??

Comment 28 xiagao 2018-07-17 00:36:03 UTC
Also failed.

# yum install http://download.eng.bos.redhat.com/brewroot/work/tasks/9252/17189252/mingw-qemu-ga-win-7.6.0-2.el7ev.src.rpm -y
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
mingw-qemu-ga-win-7.6.0-2.el7ev.src.rpm                                                                                                                                                     |  47 MB  00:00:15     
Examining /var/tmp/yum-root-tvI1YW/mingw-qemu-ga-win-7.6.0-2.el7ev.src.rpm: mingw-qemu-ga-win-7.6.0-2.el7ev.src
Cannot add package http://download.eng.bos.redhat.com/brewroot/work/tasks/9252/17189252/mingw-qemu-ga-win-7.6.0-2.el7ev.src.rpm to transaction. Not a compatible architecture: src
Error: Nothing to do

Comment 29 Sameeh Jubran 2018-07-17 05:39:17 UTC
(In reply to xiagao from comment #28)
> Also failed.
> 
> # yum install
> http://download.eng.bos.redhat.com/brewroot/work/tasks/9252/17189252/mingw-
> qemu-ga-win-7.6.0-2.el7ev.src.rpm -y
> Loaded plugins: product-id, search-disabled-repos, subscription-manager
> This system is not registered with an entitlement server. You can use
> subscription-manager to register.
> mingw-qemu-ga-win-7.6.0-2.el7ev.src.rpm                                     
> |  47 MB  00:00:15     
> Examining /var/tmp/yum-root-tvI1YW/mingw-qemu-ga-win-7.6.0-2.el7ev.src.rpm:
> mingw-qemu-ga-win-7.6.0-2.el7ev.src
> Cannot add package
> http://download.eng.bos.redhat.com/brewroot/work/tasks/9252/17189252/mingw-
> qemu-ga-win-7.6.0-2.el7ev.src.rpm to transaction. Not a compatible
> architecture: src
> Error: Nothing to do

You should be using the following rpm as it is the one that has the binaries. The one that you were using has the sources:

http://brew-task-repos.usersys.redhat.com/repos/scratch/sjubran/mingw-qemu-ga-win/7.6.0/2.el7ev/noarch/qemu-ga-win-7.6.0-2.el7ev.noarch.rpm

Comment 30 xiagao 2018-07-19 03:29:10 UTC
Tested the temp build, there is no qemu-ga crashed and can get result.

{"execute":"guest-get-fsinfo"}
{"return": [{"name": "\\\\?\\Volume{7d9c10b7-8914-11e8-81e7-806e6f6e6963}\\", "mountpoint": "E:\\", "disk": [{"bus-type": "unknown", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "target": 0}], "type": "CDFS"}, {"name": "\\\\?\\Volume{7d9c10b6-8914-11e8-81e7-806e6f6e6963}\\", "mountpoint": "D:\\", "disk": [{"bus-type": "unknown", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "target": 0}], "type": "CDFS"}, {"name": "\\\\?\\Volume{3eb920f1-898f-11e8-ae9d-806e6f6e6963}\\", "mountpoint": "C:\\", "disk": [{"bus-type": "unknown", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": 0, "function": 2}, "target": 0}], "type": "NTFS"}, {"name": "\\\\?\\Volume{3eb920f0-898f-11e8-ae9d-806e6f6e6963}\\", "mountpoint": "S:\\", "disk": [{"bus-type": "unknown", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": 0, "function": 1}, "target": 0}], "type": "NTFS"}]}

But bus-type is "unknown", I think it's not correct.
Use the same qemu cmd line for rhel guest,get the following result. 


{"execute":"guest-get-fsinfo"}
{"return": [{"name": "sda1", "mountpoint": "/boot", "disk": [{"bus-type": "scsi", "bus": 0, "unit": 0, "pci-controller": {"bus": 0, "slot": 5, "domain": 0, "function": 0}, "target": 0}], "type": "xfs"}, {"name": "dm-0", "mountpoint": "/", "disk": [{"bus-type": "scsi", "bus": 0, "unit": 0, "pci-controller": {"bus": 0, "slot": 5, "domain": 0, "function": 0}, "target": 0}], "type": "xfs"}]}

Comment 31 Sameeh Jubran 2018-07-19 09:06:22 UTC
(In reply to xiagao from comment #30)
> Tested the temp build, there is no qemu-ga crashed and can get result.
> 
> {"execute":"guest-get-fsinfo"}
> {"return": [{"name":
> "\\\\?\\Volume{7d9c10b7-8914-11e8-81e7-806e6f6e6963}\\", "mountpoint":
> "E:\\", "disk": [{"bus-type": "unknown", "bus": 0, "unit": 0,
> "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1},
> "target": 0}], "type": "CDFS"}, {"name":
> "\\\\?\\Volume{7d9c10b6-8914-11e8-81e7-806e6f6e6963}\\", "mountpoint":
> "D:\\", "disk": [{"bus-type": "unknown", "bus": 0, "unit": 0,
> "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1},
> "target": 0}], "type": "CDFS"}, {"name":
> "\\\\?\\Volume{3eb920f1-898f-11e8-ae9d-806e6f6e6963}\\", "mountpoint":
> "C:\\", "disk": [{"bus-type": "unknown", "bus": 0, "unit": 0,
> "pci-controller": {"bus": -1, "slot": -1, "domain": 0, "function": 2},
> "target": 0}], "type": "NTFS"}, {"name":
> "\\\\?\\Volume{3eb920f0-898f-11e8-ae9d-806e6f6e6963}\\", "mountpoint":
> "S:\\", "disk": [{"bus-type": "unknown", "bus": 0, "unit": 0,
> "pci-controller": {"bus": -1, "slot": -1, "domain": 0, "function": 1},
> "target": 0}], "type": "NTFS"}]}
> 
> But bus-type is "unknown", I think it's not correct.
> Use the same qemu cmd line for rhel guest,get the following result. 
> 
> 
> {"execute":"guest-get-fsinfo"}
> {"return": [{"name": "sda1", "mountpoint": "/boot", "disk": [{"bus-type":
> "scsi", "bus": 0, "unit": 0, "pci-controller": {"bus": 0, "slot": 5,
> "domain": 0, "function": 0}, "target": 0}], "type": "xfs"}, {"name": "dm-0",
> "mountpoint": "/", "disk": [{"bus-type": "scsi", "bus": 0, "unit": 0,
> "pci-controller": {"bus": 0, "slot": 5, "domain": 0, "function": 0},
> "target": 0}], "type": "xfs"}]}

Some bus types are not identified by Windows. Is this virtio-scsi?

Anyways we query Windows for the bus type and Windows returns the bus type, if it is unknown by Windows API we can do nothing about it as from qemu-ga we send an ioctl through Windows to the disk itself. You can see that done in the qemu-ga here: https://github.com/qemu/qemu/blob/master/qga/commands-win32.c#L586

If this is indeed the virtio-scsi then the Windows driver should support the ioctl "IOCTL_STORAGE_QUERY_PROPERTY" along with STORAGE_PROPERTY_QUERY.

Vadim can you please confirm this? Does the virtio-scsi support this IRP?

Comment 32 Vadim Rozenfeld 2018-07-19 10:26:29 UTC
(In reply to Sameeh Jubran from comment #31)
> (In reply to xiagao from comment #30)
> > Tested the temp build, there is no qemu-ga crashed and can get result.
> > 
> > {"execute":"guest-get-fsinfo"}
> > {"return": [{"name":
> > "\\\\?\\Volume{7d9c10b7-8914-11e8-81e7-806e6f6e6963}\\", "mountpoint":
> > "E:\\", "disk": [{"bus-type": "unknown", "bus": 0, "unit": 0,
> > "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1},
> > "target": 0}], "type": "CDFS"}, {"name":
> > "\\\\?\\Volume{7d9c10b6-8914-11e8-81e7-806e6f6e6963}\\", "mountpoint":
> > "D:\\", "disk": [{"bus-type": "unknown", "bus": 0, "unit": 0,
> > "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1},
> > "target": 0}], "type": "CDFS"}, {"name":
> > "\\\\?\\Volume{3eb920f1-898f-11e8-ae9d-806e6f6e6963}\\", "mountpoint":
> > "C:\\", "disk": [{"bus-type": "unknown", "bus": 0, "unit": 0,
> > "pci-controller": {"bus": -1, "slot": -1, "domain": 0, "function": 2},
> > "target": 0}], "type": "NTFS"}, {"name":
> > "\\\\?\\Volume{3eb920f0-898f-11e8-ae9d-806e6f6e6963}\\", "mountpoint":
> > "S:\\", "disk": [{"bus-type": "unknown", "bus": 0, "unit": 0,
> > "pci-controller": {"bus": -1, "slot": -1, "domain": 0, "function": 1},
> > "target": 0}], "type": "NTFS"}]}
> > 
> > But bus-type is "unknown", I think it's not correct.
> > Use the same qemu cmd line for rhel guest,get the following result. 
> > 
> > 
> > {"execute":"guest-get-fsinfo"}
> > {"return": [{"name": "sda1", "mountpoint": "/boot", "disk": [{"bus-type":
> > "scsi", "bus": 0, "unit": 0, "pci-controller": {"bus": 0, "slot": 5,
> > "domain": 0, "function": 0}, "target": 0}], "type": "xfs"}, {"name": "dm-0",
> > "mountpoint": "/", "disk": [{"bus-type": "scsi", "bus": 0, "unit": 0,
> > "pci-controller": {"bus": 0, "slot": 5, "domain": 0, "function": 0},
> > "target": 0}], "type": "xfs"}]}
> 
> Some bus types are not identified by Windows. Is this virtio-scsi?
> 
> Anyways we query Windows for the bus type and Windows returns the bus type,
> if it is unknown by Windows API we can do nothing about it as from qemu-ga
> we send an ioctl through Windows to the disk itself. You can see that done
> in the qemu-ga here:
> https://github.com/qemu/qemu/blob/master/qga/commands-win32.c#L586
> 
> If this is indeed the virtio-scsi then the Windows driver should support the
> ioctl "IOCTL_STORAGE_QUERY_PROPERTY" along with STORAGE_PROPERTY_QUERY.
> 
> Vadim can you please confirm this? Does the virtio-scsi support this IRP?

Technically a storage miniport doesn't deal with IOCTL_STORAGE_QUERY_PROPERTY IRP directly. It is a class driver job. But yes, class should return the relevant information collected from virtio-scsi miniport driver (and not only)  in response to such request. In case of virtio-scsi the bus type should be BusTypeSas (0x0A).

Comment 33 xiagao 2018-07-24 11:29:17 UTC
(In reply to Vadim Rozenfeld from comment #32)
> (In reply to Sameeh Jubran from comment #31)
> > (In reply to xiagao from comment #30)
> > > Tested the temp build, there is no qemu-ga crashed and can get result.
> > > 
> > > {"execute":"guest-get-fsinfo"}
> > > {"return": [{"name":
> > > "\\\\?\\Volume{7d9c10b7-8914-11e8-81e7-806e6f6e6963}\\", "mountpoint":
> > > "E:\\", "disk": [{"bus-type": "unknown", "bus": 0, "unit": 0,
> > > "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1},
> > > "target": 0}], "type": "CDFS"}, {"name":
> > > "\\\\?\\Volume{7d9c10b6-8914-11e8-81e7-806e6f6e6963}\\", "mountpoint":
> > > "D:\\", "disk": [{"bus-type": "unknown", "bus": 0, "unit": 0,
> > > "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1},
> > > "target": 0}], "type": "CDFS"}, {"name":
> > > "\\\\?\\Volume{3eb920f1-898f-11e8-ae9d-806e6f6e6963}\\", "mountpoint":
> > > "C:\\", "disk": [{"bus-type": "unknown", "bus": 0, "unit": 0,
> > > "pci-controller": {"bus": -1, "slot": -1, "domain": 0, "function": 2},
> > > "target": 0}], "type": "NTFS"}, {"name":
> > > "\\\\?\\Volume{3eb920f0-898f-11e8-ae9d-806e6f6e6963}\\", "mountpoint":
> > > "S:\\", "disk": [{"bus-type": "unknown", "bus": 0, "unit": 0,
> > > "pci-controller": {"bus": -1, "slot": -1, "domain": 0, "function": 1},
> > > "target": 0}], "type": "NTFS"}]}
> > > 
> > > But bus-type is "unknown", I think it's not correct.
> > > Use the same qemu cmd line for rhel guest,get the following result. 
> > > 
> > > 
> > > {"execute":"guest-get-fsinfo"}
> > > {"return": [{"name": "sda1", "mountpoint": "/boot", "disk": [{"bus-type":
> > > "scsi", "bus": 0, "unit": 0, "pci-controller": {"bus": 0, "slot": 5,
> > > "domain": 0, "function": 0}, "target": 0}], "type": "xfs"}, {"name": "dm-0",
> > > "mountpoint": "/", "disk": [{"bus-type": "scsi", "bus": 0, "unit": 0,
> > > "pci-controller": {"bus": 0, "slot": 5, "domain": 0, "function": 0},
> > > "target": 0}], "type": "xfs"}]}
> > 
> > Some bus types are not identified by Windows. Is this virtio-scsi?
> > 
> > Anyways we query Windows for the bus type and Windows returns the bus type,
> > if it is unknown by Windows API we can do nothing about it as from qemu-ga
> > we send an ioctl through Windows to the disk itself. You can see that done
> > in the qemu-ga here:
> > https://github.com/qemu/qemu/blob/master/qga/commands-win32.c#L586
> > 
> > If this is indeed the virtio-scsi then the Windows driver should support the
> > ioctl "IOCTL_STORAGE_QUERY_PROPERTY" along with STORAGE_PROPERTY_QUERY.
> > 
> > Vadim can you please confirm this? Does the virtio-scsi support this IRP?
> 
> Technically a storage miniport doesn't deal with
> IOCTL_STORAGE_QUERY_PROPERTY IRP directly. It is a class driver job. But
> yes, class should return the relevant information collected from virtio-scsi
> miniport driver (and not only)  in response to such request. In case of
> virtio-scsi the bus type should be BusTypeSas (0x0A).


Issue of "Disk is []" is resolved, will verify it in official build.

I create another bug to track "bus-type is 'unknown'" issue. 
https://bugzilla.redhat.com/show_bug.cgi?id=1607841

Thanks.

Comment 36 xiagao 2018-07-27 05:38:00 UTC
Created attachment 1470966 [details]
qemu-ga service stop

Test qemu-ga-win-7.6.1-2.el7ev.noarch, after run {"execute":"guest-get-fsinfo"}, qemu-ga crashed like comment 10.

Comment 37 Sameeh Jubran 2018-07-27 13:26:28 UTC
Even though  the issue should be fixed, this might be a different issue that causes the crash. I want to currently disable the Disk parameter for this release as it doesn't seem stable and move this to 7.7

I'll have a build which disables the disk and returns [] as it originally was.

Comment 38 Sameeh Jubran 2018-07-27 14:07:55 UTC
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=17384847

Just make sure that this version returns [] as it did before.

Comment 39 xiagao 2018-07-30 06:11:55 UTC
(In reply to Sameeh Jubran from comment #38)
> https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=17384847
> 
> Just make sure that this version returns [] as it did before.

Test mingw-qemu-ga-win-7.6.2-2.el7ev, get the error response of get-fsinfo.

{"execute":"guest-get-fsinfo"}
{"error": {"class": "GenericError", "desc": "failed to get volume info: The volume does not contain a recognized file system.\r\nPlease make sure that all required file system drivers are loaded and that the volume is not corrupted."}}


Guest file volume: see attachment

Comment 40 xiagao 2018-07-30 06:13:03 UTC
Created attachment 1471416 [details]
file system of guest

Comment 41 lijin 2018-07-31 08:45:56 UTC
move to rhel7.7 according to comment#37

Comment 42 Sameeh Jubran 2018-08-07 10:05:14 UTC
(In reply to xiagao from comment #39)
> (In reply to Sameeh Jubran from comment #38)
> > https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=17384847
> > 
> > Just make sure that this version returns [] as it did before.
> 
> Test mingw-qemu-ga-win-7.6.2-2.el7ev, get the error response of get-fsinfo.
> 
> {"execute":"guest-get-fsinfo"}
> {"error": {"class": "GenericError", "desc": "failed to get volume info: The
> volume does not contain a recognized file system.\r\nPlease make sure that
> all required file system drivers are loaded and that the volume is not
> corrupted."}}
> 
> 
> Guest file volume: see attachment


Sorry for the late reply. I have taken a look at the error and it is caused by the call to GetVolumeInformation function in qemu-ga [1]. This error is thrown because some volumes in the VM are not formatted, can you please confirm that all of your volumes are formatted to a known file system such as FAT or NTFS and re run the command?

Thanks!

[1] - https://github.com/qemu/qemu/blob/master/qga/commands-win32.c#L692

Comment 43 xiagao 2018-08-08 03:35:44 UTC
(In reply to Sameeh Jubran from comment #42)
> (In reply to xiagao from comment #39)
> > (In reply to Sameeh Jubran from comment #38)
> > > https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=17384847
> > > 
> > > Just make sure that this version returns [] as it did before.
> > 
> > Test mingw-qemu-ga-win-7.6.2-2.el7ev, get the error response of get-fsinfo.
> > 
> > {"execute":"guest-get-fsinfo"}
> > {"error": {"class": "GenericError", "desc": "failed to get volume info: The
> > volume does not contain a recognized file system.\r\nPlease make sure that
> > all required file system drivers are loaded and that the volume is not
> > corrupted."}}
> > 
> > 
> > Guest file volume: see attachment
> 
> 
> Sorry for the late reply. I have taken a look at the error and it is caused
> by the call to GetVolumeInformation function in qemu-ga [1]. This error is
> thrown because some volumes in the VM are not formatted, can you please
> confirm that all of your volumes are formatted to a known file system such
> as FAT or NTFS and re run the command?
> 
> Thanks!
> 
> [1] - https://github.com/qemu/qemu/blob/master/qga/commands-win32.c#L692

Yes,there is one disk is not fully formated from comment 40.
Try it again,can get the correct result.

{"execute":"guest-get-fsinfo"}
{"return": [{"name": "\\\\?\\Volume{58e2967a-9a38-11e8-8bf8-806e6f6e6963}\\", "mountpoint": "E:\\", "disk": [], "type": "CDFS"}, {"name": "\\\\?\\Volume{58e29679-9a38-11e8-8bf8-806e6f6e6963}\\", "mountpoint": "D:\\", "disk": [], "type": "UDF"}, {"name": "\\\\?\\Volume{58e2967b-9a38-11e8-8bf8-806e6f6e6963}\\", "mountpoint": "A:\\", "disk": [], "type": "FAT"}, {"name": "\\\\?\\Volume{a93e5c1d-0000-0000-0000-602200000000}\\", "mountpoint": "C:\\", "disk": [], "type": "NTFS"}, {"name": "\\\\?\\Volume{a93e5c1d-0000-0000-0000-100000000000}\\", "mountpoint": "System Reserved", "disk": [], "type": "NTFS"}]}

Comment 44 xiagao 2018-08-08 03:36:30 UTC
(In reply to xiagao from comment #43)
tted to a known file system such
> > as FAT or NTFS and re run the command?
> > 
> > Thanks!
> > 
> > [1] - https://github.com/qemu/qemu/blob/master/qga/commands-win32.c#L692
> 
> Yes,there is one disk is not fully formated from comment 40.
> Try it again,can get the correct result.
> 
> {"execute":"guest-get-fsinfo"}
> {"return": [{"name":
> "\\\\?\\Volume{58e2967a-9a38-11e8-8bf8-806e6f6e6963}\\", "mountpoint":
> "E:\\", "disk": [], "type": "CDFS"}, {"name":
> "\\\\?\\Volume{58e29679-9a38-11e8-8bf8-806e6f6e6963}\\", "mountpoint":
> "D:\\", "disk": [], "type": "UDF"}, {"name":
> "\\\\?\\Volume{58e2967b-9a38-11e8-8bf8-806e6f6e6963}\\", "mountpoint":
> "A:\\", "disk": [], "type": "FAT"}, {"name":
> "\\\\?\\Volume{a93e5c1d-0000-0000-0000-602200000000}\\", "mountpoint":
> "C:\\", "disk": [], "type": "NTFS"}, {"name":
> "\\\\?\\Volume{a93e5c1d-0000-0000-0000-100000000000}\\", "mountpoint":
> "System Reserved", "disk": [], "type": "NTFS"}]}

Test version is: mingw-qemu-ga-win-7.6.2-2.el7ev

Comment 46 xiagao 2019-02-19 08:08:04 UTC
Test it with mingw-qemu-ga-win-100.0.0.0-3.el7ev
Can get disk info.So verify this bug.

{"return": [{"name": "\\\\?\\Volume{e3e1648f-0242-11e9-a67e-806e6f6e6963}\\", "total-bytes": 4843268096, "mountpoint": "E:\\", "disk": [{"bus-type": "sata", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\?\\Volume{e3e1648f-0242-11e9-a67e-806e6f6e6963}", "target": 0}], "used-bytes": 4843268096, "type": "UDF"}, {"name": "\\\\?\\Volume{e3e1648e-0242-11e9-a67e-806e6f6e6963}\\", "total-bytes": 567863296, "mountpoint": "D:\\", "disk": [{"bus-type": "sata", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\?\\Volume{e3e1648e-0242-11e9-a67e-806e6f6e6963}", "target": 0}], "used-bytes": 567863296, "type": "CDFS"}, {"name": "\\\\?\\Volume{26a1eeb5-0000-0000-0000-602200000000}\\", "total-bytes": 20897067008, "mountpoint": "C:\\", "disk": [{"serial": "MYDISK-1", "bus-type": "scsi", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\.\\PhysicalDrive0", "target": 0}], "used-bytes": 17327181824, "type": "NTFS"}, {"name": "\\\\?\\Volume{7a6cbe5e-0000-0000-0000-010000000000}\\", "total-bytes": 1070592000, "mountpoint": "F:\\", "disk": [{"serial": "MYDISK-2", "bus-type": "scsi", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\.\\PhysicalDrive1", "target": 0}], "used-bytes": 17690624, "type": "NTFS"}, {"name": "\\\\?\\Volume{26a1eeb5-0000-0000-0000-100000000000}\\", "mountpoint": "System Reserved", "disk": [{"serial": "MYDISK-1", "bus-type": "scsi", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\.\\PhysicalDrive0", "target": 0}], "type": "NTFS"}]}