Skip to content

Commit 7d1f1af

Browse files
committed
Handle only local VMs
Skip RemoteVM etc, they are managed by the remote dom0.
1 parent 77cf691 commit 7d1f1af

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

qubeswhonix/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"""qubes-core-admin extension for handling Whonix related settings"""
2222

2323
import qubes.ext
24+
import qubes.vm
2425
import qubes.vm.templatevm
2526

2627

@@ -177,6 +178,8 @@ def on_domain_add(self, app, _event, vm, **_kwargs):
177178
"""Handle new AppVM created on whonix-ws/whonix-gw template and
178179
adjust its default settings
179180
"""
181+
if not isinstance(vm, qubes.vm.LocalVM):
182+
return
180183

181184
if vm.features.check_with_template("whonix-gw", None):
182185
vm.tags.add("anon-gateway")
@@ -249,6 +252,9 @@ def on_domain_load(self, vm, _event):
249252
"""Retroactively add tags to sys-whonix and anon-whonix. Also enable
250253
event buffering if it's not already enabled.
251254
"""
255+
if not isinstance(vm, qubes.vm.LocalVM):
256+
return
257+
252258
if vm.features.check_with_template("whonix-gw", None):
253259
if "anon-gateway" not in vm.tags:
254260
vm.tags.add("anon-gateway")

0 commit comments

Comments
 (0)