[PATCH 2/3] virtinstall: Fix the allocating disk size printed by the progress bar

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When a sparse file is created during a disk allocation,
virt-install prints not the created disk size but a sparse file size.

Therefore, we fix to print the created disk size during disk allocation
instead of the size of the sparse file by updating the meter with the
self.capacity.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@xxxxxxxxxxx>
Signed-off-by: Haruka Ohata <ohata.haruka@xxxxxxxxxxx>
---
 virtinst/storage.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/virtinst/storage.py b/virtinst/storage.py
index ee58c5f6..6a37238b 100644
--- a/virtinst/storage.py
+++ b/virtinst/storage.py
@@ -697,6 +697,7 @@ class StorageVolume(_StorageObject):
                 log.debug("Using vol create flags=%s", createflags)
                 vol = self.pool.createXML(xml, createflags)
 
+            meter.update(self.capacity, True)
             meter.end()
             log.debug("Storage volume '%s' install complete.", self.name)
             return vol
-- 
2.38.1




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux