Making a DispVM permanent

57 views
Skip to first unread message

tetra...@danwin1210.me

unread,
Sep 21, 2019, 7:27:56 AM9/21/19
to qubes...@googlegroups.com
I start working on a project with some untrusted data in a DispVM.

Then I decide the project is bigger or going to take longer than anticipated and I need to keep the DispVM around, so I don't lose my work prematurely.

Is there a way to turn currently-running DispVM instance into a regular permanent AppVM, which I can delete later?

awokd

unread,
Sep 21, 2019, 7:58:57 AM9/21/19
to qubes...@googlegroups.com
tetrahedra via qubes-users:
Don't think there's any way to do that, but you could qvm-copy data from
Disp to a new AppVM.

--
- don't top post
Mailing list etiquette:
- trim quoted reply to only relevant portions
- when possible, copy and paste text instead of screenshots

one7...@gmail.com

unread,
Sep 22, 2019, 7:37:40 AM9/22/19
to tetra...@danwin1210.me, qubes...@googlegroups.com
Hello,

Von:
tetrahedra via qubes-users
Betreff: [qubes-users] Making a DispVM permanent

Is there a way to turn currently-running DispVM instance into a regular permanent AppVM, which I can delete later?

----

The way I would do it:

1) Open a xterm in the same (!) disposable VM
qvm-run <dispvm-name> xterm

2) close all other windows in this dispvm
(Make sure that xterm is running in the VM to avoid that the VM gets deleted)

3) create a new VM which is not a disposable VM.
Start this VM.

4) tar.gzip the home directory of the Disposable VM and extract it in the App VM.
You have several options:

1) make an archive of the dispvm-home and store it in /tmp of the dispvm, then qvm-copy this file to the other AppVM. Move it to the /tmp there and then extract the archive

2) run a command from dom0 to tar.gzip /home in the dispvm and use pass-io to pass the data to and extract command in the AppVM.

After you make sure that the data has been arrived in the AooVM you can close the xterm window of the dispvm which will delete the dispvm.

I haven't verified the above steps, but it should work.

[799]

brenda...@gmail.com

unread,
Sep 22, 2019, 10:02:19 AM9/22/19
to qubes-users
On Sunday, September 22, 2019 at 7:37:40 AM UTC-4, one7...@gmail.com wrote:
Hello,

Von:
tetrahedra via qubes-users
Betreff: [qubes-users] Making a DispVM permanent

Is there a way to turn currently-running DispVM instance into a regular permanent AppVM, which I can delete later?

----

The way I would do it:

1) Open a xterm in the same (!) disposable VM
qvm-run <dispvm-name> xterm

2) close all other windows in this dispvm
(Make sure that xterm is running in the VM to avoid that the VM gets deleted)


The one additional caution or clarification I suggest is:
Dom0 is monitoring whatever the first window/process was that it asked the dispVM to open. If that window/process exits, the VM will be shutdown.

I typically open a dispVM xterm, open another xterm, and then window-shade and/or minimize the original one...just to avoid mistakenly closing it and exiting the VM early.

Brendan

Steve Coleman

unread,
Sep 23, 2019, 11:57:22 AM9/23/19
to qubes...@googlegroups.com
On 2019-09-21 07:27, tetrahedra via qubes-users wrote:

> Is there a way to turn currently-running DispVM instance into a regular
> permanent AppVM, which I can delete later?
>

I'm not sure it this helps or not, but you could try pausing the dispvm
and restart it when you need it. I don't know what happens if the
machine reboots in the mean time, but that paused vm should stop using
memory and cpu thus allowing you to use those resources elsewhere.

For a more long term storage you might look at the new backup software
that is in development (Sparsebak). The current qubes backup will only
save the starting state of a running dispvm, but the new backup system
might possibly store the current state. You could try to pause the
dispvm, make a hot backup with sparsebak, and then if you loose your
dispvm due to an inadvertent shutdown, then try restoring the prior
state from that backup.

Another possibility, pause the dispvm then clone it. I was successful at
restarting the clone by running gnome-terminal from the Qubes Manager,
but when I exited the terminal app the clone shutdown and disappeared
like a normal dispvm. You could also pause the clone rather than
shutting it down, and simply try playing the shell game by cloning as a
checkpoint, and only start the clone if you loose the original dispvm
due to power failure, etc.

Perhaps there is a qubes property that could change that dispvm
auto-remove behavior?

brenda...@gmail.com

unread,
Sep 23, 2019, 1:21:38 PM9/23/19
to qubes-users
On Monday, September 23, 2019 at 11:57:22 AM UTC-4, steve.coleman wrote:
On 2019-09-21 07:27, tetrahedra via qubes-users wrote:
> Is there a way to turn currently-running DispVM instance into a regular
> permanent AppVM, which I can delete later?

I'm not sure it this helps or not, but you could try pausing the dispvm
and restart it when you need it. I don't know what happens if the
machine reboots in the mean time, but that paused vm should stop using
memory and cpu thus allowing you to use those resources elsewhere.

Just to clarify: while pausing a Qubes VM does relinquish the CPU usage, it does not relinquish the memory used. Instead, it just freezes the memory allocation to the current amount until you unpause the VM.

An additional caution for VMs that support memory balancing is that if the memory pressure has changed significantly from the time that the VM has paused, when you unpause it, there's a chance that it may fail the next memory request with xen and be terminated immediately.

Brendan
Reply all
Reply to author
Forward
0 new messages