virtio-win / kvm-guest-drivers-windows

Windows paravirtualized drivers for QEMU\KVM
https://www.linux-kvm.org/page/WindowsGuestDrivers
BSD 3-Clause "New" or "Revised" License
2k stars 384 forks source link

Windows Balloon is not report the mem #848

Open xixi-furry opened 1 year ago

xixi-furry commented 1 year ago

after my proxmoxve was crash and reboot,i find the balloon was not report the mem,only one vm was report.

it is the vm when use qm monitor ==> info balloon

qm> info balloon balloon: actual=16384 max_mem=16384 last_update=1666319200

i try to uninstall and reinstall it。but it also not works

how can i fix it?

xiagao commented 1 year ago

Hi Xixi, Could you tell me more about this issue? such as windows version? virtio-win driver version? host info? And it will be better if you can provide detailed steps.

Thanks. Xiaoling

xixi-furry commented 1 year ago

Windows Version : Windows Server 2019 DataCenter cn

virtio-win driver : v0.1.225

Host info :

CPU(s)                             64 x Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz (2 插槽)
内核版本                         Linux 5.15.30-2-pve #1 SMP PVE 5.15.30-3 (Fri, 22 Apr 2022 18:08:27 +0200)
PVE管理器版本               pve-manager/7.2-3/c743d6c1
xixi-furry commented 1 year ago

i just the host was reboot because the vm use the too much memory. but when it reboot again. i found just one vm can report the mem info. the other vms can not report.

i check the system drive for balloon,i was worked, but i see the qm monitor use info balloon i can't find more info

so i try to uninstall and reinstall it.it also not works.

finally i try to remake the system template,then it works.

i just want to find how to fix it ,when i find can't report the mem to host?

YanVugenfirer commented 1 year ago

Hi @XiXi-Furry ,

Please check the status of Balloon service, and check that it is started. You can use service manager GUI (service.msc).

Best regards. Yan.

xixi-furry commented 1 year ago

i checked the status,i see it was started,so i try to restart the service ,it also can't report the mem to host.

so do we have another way to check do it report the mem to host successful? like the logs or another thing

xiagao commented 1 year ago

Hi @xixi-furry, Recently I also hit this issue, balloon service didn't report the proper data. {"execute": "qom-get", "arguments": {"path": "/machine/peripheral/balloon0", "property": "guest-stats"}, "id": "eoFlVN1F"} {"return": {"stats": {"stat-htlb-pgalloc": 18446744073709551615, "stat-swap-out": 18446744073709551615, "stat-available-memory": 18446744073709551615, "stat-htlb-pgfail": 18446744073709551615, "stat-free-memory": 18446744073709551615, "stat-minor-faults": 18446744073709551615, "stat-major-faults": 18446744073709551615, "stat-total-memory": 18446744073709551615, "stat-swap-in": 18446744073709551615, "stat-disk-caches": 18446744073709551615}, "last-update": 1674961514}, "id": "eoFlVN1F"}

After I log in to the win10-32 guest, I checked the event viewer and it showed 'adding snap-in ...' related info, after that everything works.

{"execute": "qom-get", "arguments": {"path": "/machine/peripheral/balloon0", "property": "guest-stats"}, "id": "eoFlVN1F"} {"return": {"stats": {"stat-htlb-pgalloc": 0, "stat-swap-out": 272125952, "stat-available-memory": 741429248, "stat-htlb-pgfail": 0, "stat-free-memory": 707305472, "stat-minor-faults": 11882479, "stat-major-faults": 262753, "stat-total-memory": 2146918400, "stat-swap-in": 6454284288, "stat-disk-caches": 68247552}, "last-update": 1674961697}, "id": "eoFlVN1F"}

You can have a try.

mitmdev commented 1 year ago

Hi @xixi-furry,

I had the same issue with two VMs running Windows Server 2019 Standard, it turned out to be related to the performance counters (PerfMon) not working or missing. You can check executing "Get-WMIObject Win32_PerfRawData_PerfOS_Memory" from elevated powershell.

In my case, one vm returned error code 0x80041032, the other 0x80041010. Reloading the performance counters solved both errors:

cd %windir%\system32\
lodctr /R
cd %windir%\sysWOW64\
lodctr /R

After rebooting, info balloon correctly reported memory stats:

qm> info balloon
balloon: actual=8192 max_mem=8192 total_mem=8185 free_mem=6285 mem_swapped_in=6827098112 mem_swapped_out=454934528 major_page_faults=232887 minor_page_faults=33911011 last_update=1678890729

(Restarting the Windows Management Instrumentation service, instead of rebooting, should also work)

Hope this helps! Regards Riccardo