Skip to content

Announcement: Preloaded disposables#146

Open
ben-grande wants to merge 1 commit intoQubesOS:mainfrom
ben-grande:announce-preload
Open

Announcement: Preloaded disposables#146
ben-grande wants to merge 1 commit intoQubesOS:mainfrom
ben-grande:announce-preload

Conversation

@ben-grande
Copy link
Copy Markdown
Contributor

@ben-grande ben-grande commented Jul 2, 2025

Depends:

Graphs are finished, they should be added to qubes-attachment and also, I think it is a good idea to update the disposable documentation before this post is published, because the docs is outdated, I will do it this week and reference bits of the documentation in this post.

Copy link
Copy Markdown
Member

@andrewdavidwong andrewdavidwong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Here are some minor editing suggestions.

Comment thread 2025-07-10-preloaded-disposables.md Outdated
Comment thread 2025-07-10-preloaded-disposables.md Outdated
Comment thread 2025-07-10-preloaded-disposables.md Outdated
Comment thread 2025-07-10-preloaded-disposables.md Outdated
Comment thread 2025-07-10-preloaded-disposables.md Outdated
Comment thread 2025-07-10-preloaded-disposables.md Outdated
Comment thread 2025-07-10-preloaded-disposables.md Outdated
Comment thread 2025-07-10-preloaded-disposables.md Outdated
Comment thread 2025-07-10-preloaded-disposables.md Outdated
Comment thread 2025-07-10-preloaded-disposables.md Outdated
Comment thread 2025-07-10-preloaded-disposables.md Outdated
Comment thread 2025-07-10-preloaded-disposables.md Outdated
@ben-grande ben-grande force-pushed the announce-preload branch 2 times, most recently from 3592218 to 6de57d2 Compare July 4, 2025 19:38
ben-grande added a commit to ben-grande/qubes-attachment that referenced this pull request Jul 4, 2025
@ben-grande ben-grande force-pushed the announce-preload branch 2 times, most recently from 51a71c0 to c38969c Compare July 4, 2025 19:43
Comment thread 2025-07-10-preloaded-disposables.md Outdated
Or use the equivalent command-line operation:

```shell
qvm-features dom0 preload-dispvm-max 10
Copy link
Copy Markdown
Member

@marmarek marmarek Jul 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While in theory the exact value doesn't matter as an example, in practice people will use this as-is when trying it out. 10 dispvms is a lot, and will use considerable amount of memory, especially relevant for systems with not a lot of RAM... More preloaded disposables is useful only if you use them quickly one after another (qubes builder likely will be such example), but for normal usage (for example using disposables to view/edit documents) I'd say even 1 or 2 is a reasonable value.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

ben-grande added a commit to ben-grande/qubes-attachment that referenced this pull request Jul 5, 2025
Comment thread 2025-07-10-preloaded-disposables.md Outdated

-->

## Know issues
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Know issues
## Known issues

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread 2025-07-10-preloaded-disposables.md Outdated
A [disposable](/doc/how-to-use-disposables/) is a lightweight qube that can be
created quickly and will self-destruct when closed. Disposables are usually
created in order to host and execute untrusted code, be it on the software
level a single application (like a viewer, editor or web browser) or the
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
level a single application (like a viewer, editor or web browser) or the
level of a single application (like a viewer, editor or web browser) or the

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread 2025-07-10-preloaded-disposables.md Outdated
created quickly and will self-destruct when closed. Disposables are usually
created in order to host and execute untrusted code, be it on the software
level a single application (like a viewer, editor or web browser) or the
hardware level ([PCI passtrough](/doc/how-to-use-pci-devices/)).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
hardware level ([PCI passtrough](/doc/how-to-use-pci-devices/)).
hardware level (e.g., for [PCI passthrough](/doc/how-to-use-pci-devices/)).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread 2025-07-10-preloaded-disposables.md Outdated
for every new task. Unnamed disposables are ideal for this use case. So, what
is the problem with them? The caller has to wait for a complete qube startup
before running the desired application. The delay might seem a minor annoyance
at first, but over a prolonged period, fatigued users run applications on
Copy link
Copy Markdown
Member

@andrewdavidwong andrewdavidwong Jul 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
at first, but over a prolonged period, fatigued users run applications on
at first, but over a prolonged period, fatigued users tend to reuse

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread 2025-07-10-preloaded-disposables.md Outdated
is the problem with them? The caller has to wait for a complete qube startup
before running the desired application. The delay might seem a minor annoyance
at first, but over a prolonged period, fatigued users run applications on
already tainted qubes or in the qube itself to avoid the waiting time.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
already tainted qubes or in the qube itself to avoid the waiting time.
tainted disposables or run applications in non-disposable qubes to avoid the waiting time.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread 2025-07-10-preloaded-disposables.md Outdated
at first, but over a prolonged period, fatigued users run applications on
already tainted qubes or in the qube itself to avoid the waiting time.

The problem is not the user's lack of understanding or lack of documentation
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The problem is not the user's lack of understanding or lack of documentation
The problem is not the user's lack of understanding or a lack of documentation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread 2025-07-10-preloaded-disposables.md Outdated
already tainted qubes or in the qube itself to avoid the waiting time.

The problem is not the user's lack of understanding or lack of documentation
but how the user perceives the system. If the system is slow, the user will
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
but how the user perceives the system. If the system is slow, the user will
but how the user perceives the system. If the system is slow, many users will

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread 2025-07-10-preloaded-disposables.md Outdated

Yes! It can do better.

In the project lead's presentation
Copy link
Copy Markdown
Member

@andrewdavidwong andrewdavidwong Jul 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In the project lead's presentation
Qubes OS project lead Marek Marczykowski-Górecki, in his

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread 2025-07-10-preloaded-disposables.md Outdated

In the project lead's presentation
[Qubes OS development status update](https://cfp.3mdeb.com/qubes-os-summit-2024/talk/AWCBJ8/)
at the Qubes OS Summit 2024, it was mentioned that there was intent for faster
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
at the Qubes OS Summit 2024, it was mentioned that there was intent for faster
at Qubes OS Summit 2024, mentioned plans for faster

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread 2025-07-10-preloaded-disposables.md Outdated
In the project lead's presentation
[Qubes OS development status update](https://cfp.3mdeb.com/qubes-os-summit-2024/talk/AWCBJ8/)
at the Qubes OS Summit 2024, it was mentioned that there was intent for faster
disposable qube usage for this release. Here is where preloaded disposables
Copy link
Copy Markdown
Member

@andrewdavidwong andrewdavidwong Jul 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
disposable qube usage for this release. Here is where preloaded disposables
disposables in Qubes OS 4.3. Here is where preloaded disposables

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread 2025-07-10-preloaded-disposables.md Outdated
[Qubes OS development status update](https://cfp.3mdeb.com/qubes-os-summit-2024/talk/AWCBJ8/)
at the Qubes OS Summit 2024, it was mentioned that there was intent for faster
disposable qube usage for this release. Here is where preloaded disposables
enters.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
enters.
enter.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the subject preloaded disposables an it? Here is where it enters?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preloaded disposables is plural.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread 2025-07-10-preloaded-disposables.md Outdated
suspended, as appropriate) and resumed (transparently) when a disposable qube
is requested by the user.

When the qube is preloaded, the qube application listing or the qube entry
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When the qube is preloaded, the qube application listing or the qube entry
When the qube is preloaded, the qube application listing and the qube entry

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread 2025-07-10-preloaded-disposables.md Outdated
is requested by the user.

When the qube is preloaded, the qube application listing or the qube entry
itself is hidden from GUI applications such as the app menu and the Qrexec
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
itself is hidden from GUI applications such as the app menu and the Qrexec
itself are hidden from GUI applications such as the app menu and the Qrexec

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread 2025-07-10-preloaded-disposables.md Outdated
When the qube is preloaded, the qube application listing or the qube entry
itself is hidden from GUI applications such as the app menu and the Qrexec
Policy Ask prompt. This is by design to avoid contamination. A preload is not
something you use directly, but indirectly.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
something you use directly, but indirectly.
something intended to be used directly, but indirectly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread 2025-07-10-preloaded-disposables.md Outdated
something you use directly, but indirectly.

The use of preloaded disposables is transparent, indistinguishable from the
usage of unnamed disposables. Requesting the creation of a new unnamed
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
usage of unnamed disposables. Requesting the creation of a new unnamed
use of unnamed disposables. Requesting the creation of a new unnamed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread 2025-07-10-preloaded-disposables.md Outdated

The use of preloaded disposables is transparent, indistinguishable from the
usage of unnamed disposables. Requesting the creation of a new unnamed
disposable will instead mark a preload as used and reply with an already
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
disposable will instead mark a preload as used and reply with an already
disposable will instead mark a preload as used and reply with an already-

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@ben-grande
Copy link
Copy Markdown
Contributor Author

@ben-grande: I find myself suggesting changes for some of the same typos/errors more than once. It looks like maybe you're trying to manually implement my suggested changes but not actually implementing some of them or accidentally reverting some changes? You might want to use the "commit suggestion" feature (assuming you agree with the changes) to make this easier. Alternatively, I could just do an editing pass right before publication instead of iteratively while you're still revising the draft. The current workflow seems a bit inefficient for both of us, so I'll pause here for now. :)

Yes, I implement all the changes manually instead of copying from the Github WebUI to my code editor. I hope that one day the add to batch suggestion actually open an interface where it shows a patch instead of just prompting to commit in browser.

About the same errors resurfacing... I don't really know what happened, I verified each suggestion manually.

About making things easier, you are welcome to do a last pass when the draft is completed.

Thanks for your effort so far.

ben-grande added a commit to ben-grande/qubes-doc that referenced this pull request Sep 12, 2025
ben-grande added a commit to ben-grande/qubes-attachment that referenced this pull request Sep 12, 2025
ben-grande added a commit to ben-grande/qubes-attachment that referenced this pull request Oct 1, 2025
@ben-grande ben-grande marked this pull request as ready for review October 1, 2025 07:59
Comment thread 2025-XX-XX-preloaded-disposables.md Outdated
Comment on lines +21 to +22
A [disposable](/doc/how-to-use-disposables/) is a lightweight qube that can be
created quickly and will self-destruct when closed. Disposables are usually
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new definition introduced in QubesOS/qubes-doc#1554 is better.

Comment thread 2025-XX-XX-preloaded-disposables.md Outdated
Comment on lines +27 to +30
There are two kinds of disposables, unnamed and named. The difference between
them (besides one having a fixed name) is that unnamed disposables are
destroyed when closing the first application opened in them while the user
must explicitly shut down named disposables.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mentioned this about QubesOS/qubes-doc#1554 but it is not exactly true when attaching devices.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I included this in the glossary and the how to. I am not sure I will add it here.

GUI daemon only starts the connection with the qube's GUI agent when the
preload disposable is marked as used.

[![Stacked execution](/attachment/posts/preload-graph_01_stage_stack_0.png)](/attachment/posts/preload-graph_01_stack_stack_0.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These kind of graphs should provide a full textual description. Maybe the easiest way to do that would be to provide tables too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, matplotlib would automatically generate them. I found out there is matplotlibalt, but installation is only via pip...

See that OpenQA is already generating graphs, which is nice. Matplotalt has an option img_file that can save alt text to JPEG. But for that to hapen on CI, I would need to get a pip package to dom0 using a wrapper to bypass network restrictions (probably there is an integrated script for that already or the curl wrapper CI uses to fetch from local network), or copy the results to a vm, install matplotalt in a vm, generate the results there and them copy them to dom0 so they can be uploaded to OpenQA at the end of the job. @marmarek ?

Or I can fix jjust this case by writing the results manually.

Comment thread 2025-XX-XX-preloaded-disposables.md Outdated
with `qvm-console-dispvm`. The default qube for those operations is
`default-mgmt-dvm`:

[![VM Settings](/attachment/posts/preload-local.png)](/attachment/posts/preload-local.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alt isn't consistent (should be "qube's settings") and a detailed textual description should be provided.

Comment thread 2025-XX-XX-preloaded-disposables.md Outdated
If you use the global `default_dispvm` a lot, you can target the global
preload setting by setting the feature on `dom0`:

[![Global settings](/attachment/posts/preload-global.png)](/attachment/posts/preload-global.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A detailed textual description should be provided here too.

Comment on lines +37 to +38
destroyed when closing the first application opened in them (on most
workflows) while the user must explicitly shut down named disposables.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(on most workflows)

Nice balance between precision and readability!

Comment thread 2025-XX-XX-preloaded-disposables.md Outdated
with `qvm-console-dispvm`. The default qube for those operations is
`default-mgmt-dvm`:

[![The qube's settings window of default-mgmt-dvm is open, disposable template checkbox is enabled and preloaded disposables spinox has the value set to 2.](/attachment/posts/preload-local.png)](/attachment/posts/preload-local.png)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo on spinox

@marmarek
Copy link
Copy Markdown
Member

This should be good for publishing, I think - the two TODO are for actual publishing (depending on when it happens).

@ben-grande
Copy link
Copy Markdown
Contributor Author

OK for review. I was adding a section to compare against industry but may be too much for the news post.

@parulin
Copy link
Copy Markdown

parulin commented Mar 10, 2026

I don't think there is something still preventing this post from being published.

@unman
Copy link
Copy Markdown
Member

unman commented Mar 10, 2026 via email

@unman
Copy link
Copy Markdown
Member

unman commented Mar 10, 2026

@ben-grande
I think there are four points I would like to see included -

  1. Comment on user facing change - appearance of disposable in Qubes Widget, with limited menu.
  2. Explanation of use of checkbox/list in global settings.
  3. Explicit call out of cases where preloading may not be useful.
  4. Reference to the current outstanding issues, with links to issues.

I will add these before we post, unless you will.

@unman
Copy link
Copy Markdown
Member

unman commented Mar 12, 2026

The user facing material should be at the head of the post. Otherwise it will be lost or skipped over.

@ben-grande
Copy link
Copy Markdown
Contributor Author

The user facing material should be at the head of the post. Otherwise it will be lost or skipped over.

I tried to do in order of discovery, as per the headers:

## What are disposables?
## Fresh disposable startup time leads to fatigue
## What are preloaded disposables?
### Industry comparison on getting pristine environments faster
## How to use preloaded disposables  (User-facing material)
## Performance improvements
### Stacked execution
### Stacked total
### Execution per iteration
### Total per iteration
## Known issues, some soon to be fixed

I think that moving the user-facing material to the top would break the discovery. It would explain how to use it before explaining what it is and what problem it is trying to solve.

Maybe I can do a TLDR at the top linking to important sections?

@ben-grande
Copy link
Copy Markdown
Contributor Author

ben-grande commented Mar 12, 2026

  • Comment on user facing change - appearance of disposable in Qubes Widget, with limited menu.

Done. Not pushed yet.

  • Explanation of use of checkbox/list in global settings.

This situation will change, hopefully soon and hopefully before this post is published. Marta is doing a centralized configuration of preload disposable quantity in the global config. That means that both images will become outdated. Apparently there still is a checkbox there.

  • Explicit call out of cases where preloading may not be useful.

Can you provide such case? I read your issue on the forum of not being beneficial to preload, but it is not clear to me how should I express that. I am just aware that it was a memory constrained environment, with some qubes already running and not being able to preloaded. But this is less relevant with the introduction of preload-dispvm-delay feature. Of course, that will delay preloading the replacement, but it is better to still have memory and not fail to preload than the opposite.

  • Reference to the current outstanding issues, with links to issues.

Can you link to them?

@ben-grande
Copy link
Copy Markdown
Contributor Author

2. Explanation of use of checkbox/list in global settings.

I wrote this already:

While the disposable template remains the global `default_dispvm`, it will
respect the global feature and ignore the per-qube setting.

To remove all the preloaded qubes, set the feature value to `0`, `''` (empty)
or delete the feature by unchecking the box. If the feature is set on `dom0`,
it's better to delete the feature so that the preload setting to be read from
the disposable template itself and not capped to `0`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants