diff options
author | Cole Robinson <crobinso@redhat.com> | 2012-02-13 15:18:43 -0500 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2012-02-13 15:18:43 -0500 |
commit | 7cb08a640a6ec1483ba02734bde7a4bd5730c1fe (patch) | |
tree | 24e972697179ebbe182231fee1ca6671db81e8ae | |
parent | cda1dd81f95ab335389eadfbdfe33e49785d6bb2 (diff) | |
download | virt-manager-7cb08a640a6ec1483ba02734bde7a4bd5730c1fe.tar.gz |
Use storage format default in addhw as well
-rw-r--r-- | src/virtManager/addhardware.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/virtManager/addhardware.py b/src/virtManager/addhardware.py index c1f225dc..50852eda 100644 --- a/src/virtManager/addhardware.py +++ b/src/virtManager/addhardware.py @@ -1274,6 +1274,14 @@ class vmmAddHardware(vmmGObjectUI): driverCache=cache, format=fmt) + if not fmt: + fmt = self.config.get_storage_format() + if (self.is_default_storage() and + disk.vol_install and + fmt in disk.vol_install.formats): + logging.debug("Setting disk format from prefs: %s", fmt) + disk.vol_install.format = fmt + if (disk.type == virtinst.VirtualDisk.TYPE_FILE and not self.vm.is_hvm() and virtinst.util.is_blktap_capable()): |