Bug 1746667 - [qemu-guest-agent]System reserve volume's file system via guest agent is different from it's in guest
Summary: [qemu-guest-agent]System reserve volume's file system via guest agent is diff...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: virtio-win
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 8.2
Assignee: Basil Salman
QA Contact: dehanmeng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-29 05:04 UTC by xiagao
Modified: 2020-11-04 04:17 UTC (History)
8 users (show)

Fixed In Version: 101.2.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 04:17:35 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)
volume info in guest (14.81 KB, text/html)
2019-08-29 05:04 UTC, xiagao
no flags Details
diskmgmt.msc picture with seabios (144.64 KB, image/png)
2019-08-29 05:06 UTC, xiagao
no flags Details
diskmgmt.msc picture with ovmf (54.75 KB, image/png)
2019-08-29 05:06 UTC, xiagao
no flags Details
volume_info from guest operation (30.42 KB, application/octet-stream)
2020-08-10 07:02 UTC, dehanmeng
no flags Details
mingw-qemu-ga-win-101.2.0-1.el7ev Verified volume_info.html (30.34 KB, application/octet-stream)
2020-08-11 06:30 UTC, dehanmeng
no flags Details

Description xiagao 2019-08-29 05:04:55 UTC
Created attachment 1609203 [details]
volume info in guest

Description of problem:
Install win2019 guest with ovmf and try to get file system info via qemu guest agent,but find the file system of system reserve volume is not correct.

Version-Release number of selected component (if applicable):
mingw-qemu-ga-win-100.0.0.0-3.el7ev

How reproducible:
100%

Steps to Reproduce:
1.boot up win2019 guest with ovmf.
2.check volum info in guest.
 wmic volume list /format:hform >> volume_info.html

volume_info.html is in attachment.

3.issue "guest-get-fsinfo" command in host.
# nc -U /tmp/helloworld2 
{"execute":"guest-get-fsinfo"}
{"return": [
{"name": "\\\\?\\Volume{5a5fadc2-c99a-11e9-b081-806e6f6e6963}\\", "total-bytes": 4843268096, "mountpoint": "D:\\", "disk": [{"bus-type": "sata", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\?\\Volume{5a5fadc2-c99a-11e9-b081-806e6f6e6963}", "target": 0}], "used-bytes": 4843268096, "type": "UDF"}, 
{"name": "\\\\?\\Volume{68f74715-c99a-11e9-b078-806e6f6e6963}\\", "total-bytes": 258000896, "mountpoint": "F:\\", "disk": [{"bus-type": "sata", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\?\\Volume{68f74715-c99a-11e9-b078-806e6f6e6963}", "target": 0}], "used-bytes": 258000896, "type": "CDFS"}, 
{"name": "\\\\?\\Volume{8a5b82d7-c239-4bd1-b289-e48d8af5b9b1}\\", "mountpoint": "System Reserved", "disk": [{"bus-type": "sas", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\.\\PhysicalDrive0", "target": 0}], "type": "NTFS"}, 
{"name": "\\\\?\\Volume{8264347c-309c-40cf-9f71-0f6ec295f807}\\", "total-bytes": 31971078144, "mountpoint": "C:\\", "disk": [{"bus-type": "sas", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\.\\PhysicalDrive0", "target": 0}], "used-bytes": 16184545280, "type": "NTFS"}]}

Actual results:
after step2, it's "FAT32" in guest 
after step3, system reserved volume's file system is "NTFS"


Expected results:
The file system info get from guest agent is aligned with which in guest.

Additional info:
1.qemu cmd line:
CLI="/usr/libexec/qemu-kvm -name $1 -enable-kvm -m 3G -smp 24,maxcpus=24,cores=12,threads=1,sockets=2 -nodefaults -cpu EPYC-IBPB,hv_stimer,hv_synic,hv_time,hv_relaxed,hv_vpindex,hv_spinlocks=0xfff,hv_vapic,hv_reset,hv-tlbflush -rtc base=localtime,driftfix=none -boot order=cd,menu=on -monitor stdio -M q35 -vga std -vnc :11 -qmp tcp:0:4444,server,nowait \
-device piix3-usb-uhci,id=usb -device usb-tablet,id=input0 \

-device pcie-root-port,id=pcie-root-port-6,slot=6,chassis=6,bus=pcie.0  \
-drive file=$1,if=none,id=system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop \
-device virtio-scsi-pci,id=scsi2  -device scsi-hd,drive=system-disk,bus=scsi2.0,id=system-disk,bootindex=0 \

-device pcie-root-port,id=pcie-root-port-7,slot=7,chassis=7,addr=0x7,bus=pcie.0  \
-netdev tap,script=/etc/qemu-ifup,downscript=no,id=hostnet0,vhost=on,queues=4 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:52:11:36:3f:00,bus=pcie-root-port-7,mq=on,vectors=10 \

-drive file=/home/kvm_autotest_root/iso/ISO/Win2019/en_windows_server_2019_x64_dvd_4cb967d8.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,drive=drive-ide0-1-0,id=ide0-1-0 \
-cdrom /home/kvm_autotest_root/iso/windows/virtio-win-1.9.7-3.el8.iso \
-device pcie-root-port,id=pcie-root-port-4,slot=4,chassis=4,bus=pcie.0  \
-device pcie-root-port,id=pcie-root-port-5,slot=5,chassis=5,bus=pcie.0  \
-device pcie-root-port,id=pcie-root-port-16,slot=16,chassis=16,bus=pcie.0  \
-device pcie-root-port,id=pcie-root-port-17,slot=17,chassis=17,bus=pcie.0  \

-device virtio-scsi-pci,id=scsi1 -drive file=my-data-disk1.qcow2,if=none,id=drive-data-disk,format=raw,cache=none,aio=native,werror=stop,rerror=stop,discard=on -device scsi-hd,drive=drive-data-disk,bus=scsi1.0,id=data-disk \

-device virtio-serial-pci,id=virtio-serial1,max_ports=31,bus=pcie-root-port-4  \
-chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait  -device virtserialport,bus=virtio-serial1.0,chardev=channel2,name=org.qemu.guest_agent.0 \

 -drive if=pflash,format=raw,readonly=on,file=/usr/share/OVMF/OVMF_CODE.secboot.fd \
 -drive if=pflash,format=raw,file=/home/kvm_autotest_root/images/win2019-64-virtio-scsi.qcow2.fd \
"
echo $CLI > boot.sh
python ./test-resource/loop-script/n-1-ser.py >> boot.sh

sh boot.sh

2.disk management info is in attachment.
3.didn't hit this issue with seabios.

Comment 1 xiagao 2019-08-29 05:06:17 UTC
Created attachment 1609204 [details]
diskmgmt.msc picture with seabios

Comment 2 xiagao 2019-08-29 05:06:56 UTC
Created attachment 1609205 [details]
diskmgmt.msc picture with ovmf

Comment 3 Basil Salman 2019-11-12 16:58:57 UTC
I reproduced the issue successfully.

The issue is not only in Windows server 2019 or omvf.
i was able to reproduce it also with seabios and on other Windows releases.

I will be working on a fix for this, will send updates once i have some.

Comment 6 Basil Salman 2020-01-06 17:48:40 UTC
I am still looking into this issue, i was able to address the issue:
as system reserved volumes do not have a mount point to windows, this causes issues for the data collection.
i am trying to implement a fix in order to still be able to collect such data on these volumes, 
if that doesn't work then i think the fix will be to disable this data collection for system reserved volumes.

Comment 8 Basil Salman 2020-04-26 17:57:49 UTC
Hi,

Can you please confirm that the issue is fixed in this build ?
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=28194649

Thanks.

Comment 10 xiagao 2020-04-27 06:48:16 UTC
(In reply to Basil Salman from comment #8)
> Hi,
> 
> Can you please confirm that the issue is fixed in this build ?
> https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=28194649
> 
> Thanks.

Hit this error with the new build, while works well with older version.

{"execute":"guest-get-fsinfo"}
{"error": {"class": "GenericError", "desc": "failed to get volume name: The process cannot access the file because it is being used by another process."}}

Comment 11 Basil Salman 2020-04-27 14:47:26 UTC
(In reply to xiagao from comment #10)
> (In reply to Basil Salman from comment #8)
> > Hi,
> > 
> > Can you please confirm that the issue is fixed in this build ?
> > https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=28194649
> > 
> > Thanks.
> 
> Hit this error with the new build, while works well with older version.
> 
> {"execute":"guest-get-fsinfo"}
> {"error": {"class": "GenericError", "desc": "failed to get volume name: The
> process cannot access the file because it is being used by another
> process."}}

Can you confirm the following build fixes the issue ?
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=28212557

Comment 12 xiagao 2020-04-28 02:21:04 UTC
(In reply to Basil Salman from comment #11)
> (In reply to xiagao from comment #10)
> > (In reply to Basil Salman from comment #8)
> > > Hi,
> > > 
> > > Can you please confirm that the issue is fixed in this build ?
> > > https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=28194649
> > > 
> > > Thanks.
> > 
> > Hit this error with the new build, while works well with older version.
> > 
> > {"execute":"guest-get-fsinfo"}
> > {"error": {"class": "GenericError", "desc": "failed to get volume name: The
> > process cannot access the file because it is being used by another
> > process."}}
> 
> Can you confirm the following build fixes the issue ?
> https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=28212557

It works with the new build, "type": "FAT32".

{"execute":"guest-get-fsinfo"}
{"return": [{"name": "\\\\?\\Volume{a03006c1-87cc-11ea-8345-806e6f6e6963}\\", "total-bytes": 4843268096, "mountpoint": "D:\\", "disk": [{"bus-type": "sata", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\?\\Volume{a03006c1-87cc-11ea-8345-806e6f6e6963}", "target": 0}], "used-bytes": 4843268096, "type": "UDF"}, {"name": "\\\\?\\Volume{7b17c1a8-8849-11ea-8340-806e6f6e6963}\\", "total-bytes": 258000896, "mountpoint": "F:\\", "disk": [{"bus-type": "sata", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\?\\Volume{7b17c1a8-8849-11ea-8340-806e6f6e6963}", "target": 0}], "used-bytes": 258000896, "type": "CDFS"}, 

{"name": "\\\\?\\Volume{79eacc48-25c1-40f8-89d3-f0e676355c81}\\", "mountpoint": "System Reserved", "disk": [{"bus-type": "sas", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\.\\PhysicalDrive0", "target": 0}], "type": "FAT32"}, 

{"name": "\\\\?\\Volume{8e2985fd-951e-4aad-8fad-c7b0a2e7bd2b}\\", "total-bytes": 31803305984, "mountpoint": "C:\\", "disk": [{"bus-type": "sas", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\.\\PhysicalDrive0", "target": 0}], "used-bytes": 14925398016, "type": "NTFS"}]}

Comment 15 Basil Salman 2020-08-03 14:10:22 UTC
build with the fix:
https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1275815

Comment 16 dehanmeng 2020-08-10 07:02:14 UTC
Created attachment 1710923 [details]
volume_info from guest operation

Comment 17 dehanmeng 2020-08-10 07:07:19 UTC
Reproduce with version mingw-qemu-ga-win-100.0.0.0-3.el7ev
steps same as comment0


Verified with version mingw-qemu-ga-win-101.2.0-1.el7ev
Version-Release number of selected component (if applicable):
mingw-qemu-ga-win-101.2.0-1.el7ev


Steps to Verified:
1.boot up win2019 guest with ovmf.
2.check volum info in guest.
 wmic volume list /format:hform >> volume_info.html

volume_info.html is in attachment.

3.issue "guest-get-fsinfo" command in host.
[root@dell-per440-06 test-results]# nc -U /tmp/qga.sock
{"execute":"guest-get-fsinfo"}
{"return": [{"name": "\\\\?\\Volume{23614e41-daf6-11ea-a67f-806e6f6e6963}\\", "total-bytes": 258000896, "mountpoint": "E:\\", "disk": [{"bus-type": "sata", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\?\\Volume{23614e41-daf6-11ea-a67f-806e6f6e6963}", "target": 0}], "used-bytes": 258000896, "type": "CDFS"}, {"name": "\\\\?\\Volume{23614e40-daf6-11ea-a67f-806e6f6e6963}\\", "total-bytes": 4843268096, "mountpoint": "D:\\", "disk": [{"bus-type": "sata", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\?\\Volume{23614e40-daf6-11ea-a67f-806e6f6e6963}", "target": 0}], "used-bytes": 4843268096, "type": "UDF"}, {"name": "\\\\?\\Volume{17d2a687-0000-0000-0000-602200000000}\\", "total-bytes": 53109321728, "mountpoint": "C:\\", "disk": [{"bus-type": "sas", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\.\\PhysicalDrive0", "target": 0}], "used-bytes": 11962400768, "type": "NTFS"}, {"name": "\\\\?\\Volume{17d2a687-0000-0000-0000-100000000000}\\", "mountpoint": "System Reserved", "disk": [{"bus-type": "sas", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\.\\PhysicalDrive0", "target": 0}], "type": "NTFS"}]}

Comment 18 dehanmeng 2020-08-11 06:28:03 UTC
Reproduce with mingw-qemu-ga-win-101。1.0-1.el7ev
steps same as comment0

Actual rsult:
[root@dell-per440-06 Bug_1746667]# nc -U /var/tmp/avocado_zuxqx9u1/serial-org.qemu.guest_agent.0-20200810-055643-bFgjA10i
{"execute":"guest-ping"}
{"return": {}}
{"execute":"guest-get-fsinfo"}
{"return": [{"name": "\\\\?\\Volume{a5a3fd08-db33-11ea-987a-806e6f6e6963}\\", "total-bytes": 680931328, "mountpoint": "E:\\", "disk": [{"bus-type": "sas", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\?\\Volume{a5a3fd08-db33-11ea-987a-806e6f6e6963}", "target": 2}], "used-bytes": 680931328, "type": "CDFS"}, {"name": "\\\\?\\Volume{a5a3fd07-db33-11ea-987a-806e6f6e6963}\\", "total-bytes": 2945593344, "mountpoint": "D:\\", "disk": [{"bus-type": "sas", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\?\\Volume{a5a3fd07-db33-11ea-987a-806e6f6e6963}", "target": 1}], "used-bytes": 2945593344, "type": "CDFS"}, {"name": "\\\\?\\Volume{2ee10cf4-ec65-41b9-b3b1-853097b9860b}\\", "mountpoint": "System Reserved", "disk": [{"serial": "GAGENT_TEST", "bus-type": "sas", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\.\\PhysicalDrive0", "target": 0}], "type": "NTFS"}, {"name": "\\\\?\\Volume{59eec66f-534b-4bf9-ab07-07caf0495d16}\\", "total-bytes": 31803305984, "mountpoint": "C:\\", "disk": [{"serial": "GAGENT_TEST", "bus-type": "sas", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\.\\PhysicalDrive0", "target": 0}], "used-bytes": 15445442560, "type": "NTFS"}]}




Verified with mingw-qemu-ga-win-101.2.0-1.el7ev
Version-Release number of selected component (if applicable):
mingw-qemu-ga-win-101.2.0-1.el7ev

steps same as comment0 

Actual result:
[root@dell-per440-06 Bug_1746667]# nc -U /var/tmp/avocado_zuxqx9u1/serial-org.qemu.guest_agent.0-20200810-055643-bFgjA10i
{"execute":"guest-ping"}
{"return": {}}
{"execute":"guest-get-fsinfo"}
{"return": [{"name": "\\\\?\\Volume{a5a3fd08-db33-11ea-987a-806e6f6e6963}\\", "total-bytes": 680931328, "mountpoint": "E:\\", "disk": [{"bus-type": "sas", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\?\\Volume{a5a3fd08-db33-11ea-987a-806e6f6e6963}", "target": 2}], "used-bytes": 680931328, "type": "CDFS"}, {"name": "\\\\?\\Volume{a5a3fd07-db33-11ea-987a-806e6f6e6963}\\", "total-bytes": 2945593344, "mountpoint": "D:\\", "disk": [{"bus-type": "sas", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\?\\Volume{a5a3fd07-db33-11ea-987a-806e6f6e6963}", "target": 1}], "used-bytes": 2945593344, "type": "CDFS"}, {"name": "\\\\?\\Volume{2ee10cf4-ec65-41b9-b3b1-853097b9860b}\\", "mountpoint": "System Reserved", "disk": [{"serial": "GAGENT_TEST", "bus-type": "sas", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\.\\PhysicalDrive0", "target": 0}], "type": "FAT32"}, {"name": "\\\\?\\Volume{59eec66f-534b-4bf9-ab07-07caf0495d16}\\", "total-bytes": 31803305984, "mountpoint": "C:\\", "disk": [{"serial": "GAGENT_TEST", "bus-type": "sas", "bus": 0, "unit": 0, "pci-controller": {"bus": -1, "slot": -1, "domain": -1, "function": -1}, "dev": "\\\\.\\PhysicalDrive0", "target": 0}], "used-bytes": 15446233088, "type": "NTFS"}]}

Comment 19 dehanmeng 2020-08-11 06:30:14 UTC
Created attachment 1711039 [details]
mingw-qemu-ga-win-101.2.0-1.el7ev Verified volume_info.html

Comment 23 errata-xmlrpc 2020-11-04 04:17:35 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-2020:4840


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