From 37271db3d827070280579052156fcc8d506ca2d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20Marczykowska-G=C3=B3recka?= Date: Thu, 11 Jun 2020 22:16:37 +0200 Subject: [PATCH] Fixed max volume size in VM settings Now it can be anything up to pool size. fixes QubesOS/qubes-issues#5890 --- qubesmanager/settings.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qubesmanager/settings.py b/qubesmanager/settings.py index a714c9d..ef72c81 100644 --- a/qubesmanager/settings.py +++ b/qubesmanager/settings.py @@ -449,10 +449,18 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtWidgets.QDialog): self.priv_img_size = self.vm.volumes['private'].size // 1024**2 self.max_priv_storage.setMinimum(self.priv_img_size) self.max_priv_storage.setValue(self.priv_img_size) + self.max_priv_storage.setMaximum( + max(self.priv_img_size, + self.qubesapp.pools[self.vm.volumes['private'].pool].size + // 1024**2)) self.root_img_size = self.vm.volumes['root'].size // 1024**2 self.root_resize.setValue(self.root_img_size) self.root_resize.setMinimum(self.root_img_size) + self.root_resize.setMaximum( + max(self.root_img_size, + self.qubesapp.pools[self.vm.volumes['root'].pool].size + // 1024**2)) self.root_resize.setEnabled(self.vm.volumes['root'].save_on_stop) if not self.root_resize.isEnabled(): self.root_resize.setToolTip(