From b19d9e1373c5e894473eea21502f9b0d8e8b05f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20Marczykowska-G=C3=B3recka?= Date: Mon, 29 Jul 2019 21:52:40 +0200 Subject: [PATCH 1/2] Changed checking for VM name in use In near future the old way will stop working, so this is a pre-emptive fix. --- qubesmanager/create_new_vm.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/qubesmanager/create_new_vm.py b/qubesmanager/create_new_vm.py index 0c82fb8..cb89120 100644 --- a/qubesmanager/create_new_vm.py +++ b/qubesmanager/create_new_vm.py @@ -135,12 +135,10 @@ class NewVmDlg(QtGui.QDialog, Ui_NewVMDlg): else 'StandaloneVM') name = str(self.name.text()) - try: - self.app.domains[name] - except LookupError: - pass - else: - QtGui.QMessageBox.warning(None, + + if name in self.app.domains: + QtGui.QMessageBox.warning( + None, self.tr('Incorrect qube name!'), self.tr('A qube with the name {} already exists in the ' 'system!').format(name)) From 4e9ed5e2612368559fcee40fd7538290902d47cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20Marczykowska-G=C3=B3recka?= Date: Mon, 29 Jul 2019 21:53:44 +0200 Subject: [PATCH 2/2] Better settings for a newly created VM Now a standalone VM not cloned from a template will not have a kernel and have HVM virt mode. fixes QubesOS/qubes-issues#5203 --- qubesmanager/create_new_vm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qubesmanager/create_new_vm.py b/qubesmanager/create_new_vm.py index cb89120..a58b49f 100644 --- a/qubesmanager/create_new_vm.py +++ b/qubesmanager/create_new_vm.py @@ -153,9 +153,12 @@ class NewVmDlg(QtGui.QDialog, Ui_NewVMDlg): properties = {} properties['provides_network'] = self.provides_network.isChecked() + if self.netvm.currentIndex() != 0: properties['netvm'] = self.netvm_list[self.netvm.currentIndex()] - if self.install_system.isChecked(): + + # Standalone - not based on a template + if self.vm_type.currentIndex() == 2: properties['virt_mode'] = 'hvm' properties['kernel'] = None