summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToshiki Sonoda <sonoda.toshiki@fujitsu.com>2022-11-09 18:33:56 +0900
committerCole Robinson <crobinso@redhat.com>2022-12-14 13:07:26 -0500
commit39c7a443146433766e4e71e48ab59145c74924b3 (patch)
tree74995a816bc5d2941150138c90ea83fd23b9d8e7
parent4114fa1aa827b836d3a1d11c2ac2d367c9bb0463 (diff)
downloadvirt-manager-39c7a443146433766e4e71e48ab59145c74924b3.tar.gz
virtinstall: Fix the allocating disk size printed by the progress bar
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@fujitsu.com> Signed-off-by: Haruka Ohata <ohata.haruka@fujitsu.com>
-rw-r--r--virtinst/storage.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/virtinst/storage.py b/virtinst/storage.py
index 3c5d39bb..f9a9f7a7 100644
--- a/virtinst/storage.py
+++ b/virtinst/storage.py
@@ -695,6 +695,7 @@ class StorageVolume(_StorageObject):
log.debug("Using vol create flags=%s", createflags)
vol = self.pool.createXML(xml, createflags)
+ meter.update(self.capacity)
meter.end()
log.debug("Storage volume '%s' install complete.", self.name)
return vol