Skip to content

Commit 82e8ce1

Browse files
committed
More preloaded dispvm tests
1 parent e6cffff commit 82e8ce1

7 files changed

Lines changed: 301 additions & 80 deletions

File tree

linux/systemd/qubes-vm@.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[Unit]
22
Description=Start Qubes VM %i
33
After=qubesd.service qubes-meminfo-writer-dom0.service
4-
Before=qubes-vm@.service
4+
Before=qubes-preload-dispvm.service
55
ConditionKernelCommandLine=!qubes.skip_autostart
66

77
[Service]

qubes/api/admin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ async def _vm_create(
12801280

12811281
@qubes.api.method("admin.vm.CreateDisposable", scope="global", write=True)
12821282
async def create_disposable(self, untrusted_payload):
1283-
self.enforce(self.arg in [None, "preload", "preload-autostart"])
1283+
self.enforce(self.arg in [None, "", "preload", "preload-autostart"])
12841284
preload = False
12851285
preload_autostart = False
12861286
if self.arg == "preload":
@@ -1307,6 +1307,8 @@ async def create_disposable(self, untrusted_payload):
13071307
dispvm = await qubes.vm.dispvm.DispVM.from_appvm(
13081308
appvm, preload=preload
13091309
)
1310+
if preload:
1311+
await dispvm.start()
13101312
# TODO: move this to extension (in race-free fashion, better than here)
13111313
dispvm.tags.add("created-by-" + str(self.src))
13121314
dispvm.tags.add("disp-created-by-" + str(self.src))

0 commit comments

Comments
 (0)