Hi,
I've noticed that the capacity of the disk in one of my VMs is
completely wrongly reported by the python api. The image was transfered
using scp but the transfer was aborted and now the api show a strange value:
[root@virt83 ~]# du -h /var/lib/libvirt/images/test-disk1
706M /var/lib/libvirt/images/test-disk1
[root@virt83 ~]# ls -lh /var/lib/libvirt/images/test-disk1
-rw-r--r--. 1 root root 706M 3. Nov 20:03
/var/lib/libvirt/images/test-disk1
[root@virt83 ~]# qemu-img info /var/lib/libvirt/images/test-disk1
image: /var/lib/libvirt/images/test-disk1
file format: raw
virtual size: 705M (739573760 bytes)
disk size: 705M
Notice how that raw image is seen with a size of 705M by ls, du and
qemu-img however when I get a blockinfo using libvirt-python using the
blockInfo() call I get this:
{'source': '/var/lib/libvirt/images/test-disk1', 'target':
'vda'}
[2423276348619671841L, 739577856L, 739577856L]
Obviously the first value (capacity) is way too large to be correct.
Any ideas if this is a bug or if there is something else going on?
This is a CentOS 7 system with the following versions:
[root@virt83 ~]# cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
[root@virt83 ~]# rpm -q libvirt
libvirt-1.2.8-16.el7_1.4.x86_64
[root@virt83 ~]# rpm -q libvirt-python
libvirt-python-1.2.8-7.el7_1.1.x86_64
Regards,
Dennis