Skip to content

Conversation

@ben-grande
Copy link
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
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.

@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
Or use the equivalent command-line operation:

```shell
qvm-features dom0 preload-dispvm-max 10
Copy link
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
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

-->

## Know issues
Copy link
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

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
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

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
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

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
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

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
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

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
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

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
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
Contributor Author

Choose a reason for hiding this comment

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

Done.


Yes! It can do better.

In the project lead's presentation
Copy link
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
Contributor Author

Choose a reason for hiding this comment

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

Done.


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
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

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
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

[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
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
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
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

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
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

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
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

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
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

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
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
Contributor Author

Choose a reason for hiding this comment

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

Done.


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
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

usage of unnamed disposables. Requesting the creation of a new unnamed
disposable will instead mark a preload as used and reply with an already
running preloaded disposable, followed by the creation of a substitute. A
preload that is marked as used ceases to be a preload. It's applications
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
preload that is marked as used ceases to be a preload. It's applications
preload that is marked as used ceases to be a preload. Its application

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@andrewdavidwong
Copy link
Member

andrewdavidwong commented Jul 5, 2025

@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. :)

@ben-grande
Copy link
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 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

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 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

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
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

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
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.

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

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.

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

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 +41
destroyed when closing the first application opened in them (on most
workflows) while the user must explicitly shut down named disposables.
Copy link

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!

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

Choose a reason for hiding this comment

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

Typo on spinox

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.

4 participants