[Pkg-libvirt-maintainers] Bug#947150: virtinst: virt-clone is unable to clone guest with disk on lvm volume, due to undeclared variable "need" in diskbackend.py in function is_size_conflict

Kristian Kallenberg kale at kallenberg.dk
Sat Dec 21 23:32:59 GMT 2019


Package: virtinst
Version: 1:2.0.0-3
Severity: normal

Dear Maintainer,

I have upgraded virtinst from 1.4.0-5. Once done virt-clone fails with an error about an undeclared variable. This is happening in /usr/share/virt-manager/virtinst/diskbackend.py line 534. If i am cloning a guest with its disk on a LVM volume then the variable "need" is not set.

    def is_size_conflict(self):
        ret = False
        msg = None
----->  if self.get_dev_type() == "block":
            avail = _stat_disk(self._path)[1]
        else:
            vfs = os.statvfs(os.path.dirname(self._path))
            avail = vfs.f_frsize * vfs.f_bavail
            need = int(self._size) * 1024 * 1024 * 1024
        if need > avail:

	...

I found this, but am not versed in python yet, sorry.

-- System Information:
Debian Release: 10.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-6-amd64 (SMP w/8 CPU cores)
Locale: LANG=da_DK.utf8, LC_CTYPE=da_DK.utf8 (charmap=UTF-8), LANGUAGE=da_DK.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages virtinst depends on:
ii  e2fsprogs             1.44.5-1+deb10u2
ii  genisoimage           9:1.1.11-3+b2
ii  gir1.2-libosinfo-1.0  1.2.0-1
ii  python3               3.7.3-1
ii  python3-distutils     3.7.3-1
ii  python3-gi            3.30.4-1
ii  python3-libvirt       5.0.0-1
ii  python3-libxml2       2.9.4+dfsg1-7+b3
ii  python3-requests      2.21.0-1

Versions of packages virtinst recommends:
ii  qemu-utils   1:3.1+dfsg-8+deb10u3
ii  virt-viewer  7.0-2

virtinst suggests no packages.

-- no debconf information



More information about the Pkg-libvirt-maintainers mailing list