Replicate preloaded disposables mechanism manually

I do not see any need for having unnamed disposable qubes, consequently I do not use unnamed disposable qubes (dispXYZ). Instead I have one named disposable for online ‘d13-online-disp’ and one for offline ‘d13-offline-disp’.

Is there any solution to preload both of these?

To clarify: since auto-start already exists, is your question simply “is there a way to auto-restart a vm after it shuts down” ? Or am I missing something ?

Do preloaded qubes block / use the same amount of memory as normal loaded qubes?

I don’t think qubes ever block memory, but I’d expect “preloaded” qubes to use the same amount of memory as a started paused qube .

… now, I start wondering, why this huge development effort has been made instead of having a unnamed qube simply launched and paused?

I’m not sure what you’re trying to say ? You’re describing unnamed disposables.

The aim was to speed up the user experience, and basically what you
ask is exactly what has been done. But, of course, you need to keep
track of what has been preloaded, so you can unpause it, and then launch
and pause another in waiting for the next call to a disposable.
Then there have been many issues about memory handling, coping with low
free memory, and so on.

I had hoped it would be a major feature in 4.3, but (as I’ve said
before), I do not find it a workable solution for my use case.

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

1 Like

Let me rephrase it to two questions:

  1. What are the differences between a preloaded and a started and paused qube?
  2. Is there a solution available or planed to assign more than one preloaded qube based on different disposable templates (currently you can only define one source 'default disposable template)?

Actually, the question isn’t clear, because as it stands “preloaded” is only defined in the case of “preloaded disposable”. There’s no formal definition of what a “preloaded” Qube would be outside of preloaded disposables.

Part of your interrogations could be answered looking over here https://github.com/QubesOS/qubes-issues/issues/1512 which lists a number of implementation points regarding preloaded disposables, and hints at a number of differences compared to started paused “standard” disposables. For instance, “preloaded” disposables are excluded from a number of operations (like qvm-run --all) before they’re first used, are auto-refreshed on template update, etc.

1 Like

Already present - just set number preloaded under the Settings for the
disposable template. (There can only be ONE ‘default disposable
template’ but any disposable can be preloaded.)

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

3 Likes

Many.

A short list:

  1. Their lifecycle is managed by the system, this includes preparing them for you, preloading when possible if before it was not (due to memory constraints or any other failure)
  2. It has seamless integration with current tools. You don’t need to find which preloaded disposable is paused, you just as to create a disposable out of default-dvm and one preload will be given to you (if available).
  3. It waits for some services to complete after startup (when the preload hasn’t been requested yet), so when you get a preload, systemd has fully completed
  4. Has GUI integration, so you have different icons and internal classification for preloaded disposables, meaning that they are distinct, which means that you won’t use a dirty disposable that you have done pause->unpause->pause.
3 Likes

I’d like to ask moderators to rename this thread to not confuse with the “Configure preloaded disposables”. I suggest:

  • Replicate preloaded disposables mechanism manually

or

  • Differences between preloaded disposables and manually managing paused disposables
2 Likes