Keep a DisposableVM open after closing the software

Hey there!

I was wondering if I could prevent a DisposableVM instance (e.g. disp1234) from shutting down immediately after closing the application that triggered it.

For example: I have a firefox instance running in a disposable qube by calling:

qvm-run --dispvm=fedora-32-dvm "firefox"

Now, when I close the browser (e.g. because I’m hitting Alt+F4 by accident) the disposable qube shuts down and all of its data is gone - which is nice by default but not if I have downloaded files in there that had not been moved to a persistent qube, yet.

Thank you and have a wonderful day!

Hi, welcome to the community!

If this is the concern, you can go the Firefox prefences and put the tick saying “ask before closing” (you have to do it in the dvm-template). This is what I did and I don’t have such problem.

Otherwise, you can always copy the necessary files first, before closing the browser. Or, you can start the dispVM with a terminal and it will be destroyed only after the terminal is closed, while everything else you can open and close without consequences.

1 Like

For example: I have a firefox instance running in a disposable qube
by calling:

qvm-run --dispvm=fedora-32-dvm “firefox”

Now, when I close the browser (e.g. because I’m hitting Alt+F4 by
accident) the disposable qube shuts down and all of its data is gone

  • which is nice by default but not if I have downloaded files in
    there that had not been moved to a persistent qube, yet.

You could run

qvm-run --dispvm=fedora-32-dvm xterm

and then start firefox from xterm and minimize xterm. As long as that
xterm is around, the dispvm will persist. So you have to explicitly
bring up the xterm and close it.

Not what you where asking for, but it’ll prevent your above scenario.

Another way:

qvm-create --class DispVM --template=fedora-32-dvm --label red my_dispvm

qvm-run -a my_dispvm firefox

… that’s what is called a “named DispVM”. It’ll run until you shut it
down explicitly but otherwise behave like the dispvm’s you know. It’ll
always show in your list of qubes but behaves as a dispvm (as no
persistence). You can remove it like any other qube by qvm-remove

2 Likes

@KnightWhoSaysNi there was very recently a discussion related to this that may be of interest for you:

1 Like

You can also do it like [1], but I guess it’a s bit overkill…

[1] blib/dom0 at 6a5152e06697af68e55fb8f9748f359a7f28a69d · 3hhh/blib · GitHub

1 Like

The second approach was precisely what I was looking for.
Thank you very much!

Hi,

This remembers me a feature that I have some time in mind, “DispVM promote”. Just start a DispVM, start surfing in the web, download something, play with it (maybe happy malware) and when you have a lot of stuff inside it you need to poweroff… Ouch! So if you want to save all the “work” you need to manually create a new VM, start it, and manually move via qvm-mv all need.

It would be nice to have a option in the Qube Manager, right click, “Promote to AppVM”, click, enter name for it, and that’s all, you can now shutdown without worrying about losing anything.