I have just created a new vm and rechecked the disk stats. This time around too, they seem to be different as shown below:
From libvirt python library:
---
disk_name=sda read_req=10501,read_bytes=263819776,write_req=1933,write_bytes=82269184
---
So the write_bytes from above amounted to 78 MB approx.
But from within the vm :
---
root@sample2:~# iostat -p sda -h
Linux 4.15.0-101-generic (sample2) 12/21/2022 _x86_64_ (1 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
1.9% 0.0% 1.3% 0.4% 0.0% 96.4%
Device tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sda
40.45 643.6k 21.2M 217.5M 7.2G
sda1
40.04 637.6k 21.2M 215.5M 7.2G
----
7.2 G is far from 78 MB. Am I doing wrong anywhere ? Btw, I did not reboot the new vm this time