From 2c2140d3afd4c2c43ca34b4783796b3c8d870a26 Mon Sep 17 00:00:00 2001 From: Ben Grande Date: Tue, 13 Jan 2026 09:33:55 +0100 Subject: [PATCH 1/2] Hide irrelevant qubes from boot device selection For: https://github.com/QubesOS/qubes-issues/issues/1512 --- qubesmanager/bootfromdevice.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qubesmanager/bootfromdevice.py b/qubesmanager/bootfromdevice.py index 2adf6f80..222370c1 100644 --- a/qubesmanager/bootfromdevice.py +++ b/qubesmanager/bootfromdevice.py @@ -108,7 +108,11 @@ def __init_buttons__(self): utils.initialize_widget_with_vms( widget=self.fileVM, qubes_app=self.qubesapp, - filter_function=(lambda x: x != self.vm), + filter_function=(lambda vm: + vm != self.vm + and vm.klass != "TemplateVM" + and not utils.get_feature(vm, "internal", False) + ), allow_internal=True ) From e3248b8a71ccf3f5e6233e3a1ad89d62dd528692 Mon Sep 17 00:00:00 2001 From: Ben Grande Date: Mon, 9 Feb 2026 14:21:22 +0100 Subject: [PATCH 2/2] Don't hide AdminVM as being an internal qube --- qubesmanager/backup.py | 3 +-- qubesmanager/bootfromdevice.py | 7 +------ qubesmanager/utils.py | 8 +++----- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/qubesmanager/backup.py b/qubesmanager/backup.py index 8f66b2bf..ab30735c 100644 --- a/qubesmanager/backup.py +++ b/qubesmanager/backup.py @@ -124,8 +124,7 @@ def __init__(self, qt_app, qubes_app, dispatcher, parent=None): filter_function=(lambda vm: vm.klass != 'TemplateVM' and utils.is_running(vm, False) - and not utils.get_feature(vm, 'internal', False)), - allow_internal=True, + ), ) self.appvm_combobox.setCurrentIndex( self.appvm_combobox.findText("dom0")) diff --git a/qubesmanager/bootfromdevice.py b/qubesmanager/bootfromdevice.py index 222370c1..8f4c926b 100644 --- a/qubesmanager/bootfromdevice.py +++ b/qubesmanager/bootfromdevice.py @@ -108,12 +108,7 @@ def __init_buttons__(self): utils.initialize_widget_with_vms( widget=self.fileVM, qubes_app=self.qubesapp, - filter_function=(lambda vm: - vm != self.vm - and vm.klass != "TemplateVM" - and not utils.get_feature(vm, "internal", False) - ), - allow_internal=True + filter_function=(lambda vm: vm != self.vm and vm.klass != "TemplateVM"), ) device_choice = [] diff --git a/qubesmanager/utils.py b/qubesmanager/utils.py index 3f466a63..e04965d5 100644 --- a/qubesmanager/utils.py +++ b/qubesmanager/utils.py @@ -75,10 +75,9 @@ def set_organization(): QtCore.QCoreApplication.setApplicationName('qubes-qube-manager') def is_internal(vm): - """checks if the VM is either an AdminVM or has the 'internal' features""" + """checks if the VM has the 'internal' features""" try: - return (vm.klass == 'AdminVM' - or vm.features.get('internal', False)) + return vm.features.get('internal', False) except exc.QubesDaemonAccessError: return False @@ -278,8 +277,7 @@ def initialize_widget_with_vms( :param property_name: name of the property :param allow_default: should a position with qubesadmin.DEFAULT be added; default False - :param allow_internal: should AdminVMs and vms with feature 'internal' be - used + :param allow_internal: should vms with feature 'internal' be used :return: """ choices = []