Creating working debian-10-dvm

How i can create a working debian-10-dvm?
I have no menu toggle for debian-10 as default disposable vm template for that qube.

2 Likes

IIRC:
Create a new qubes (based on debian-10)
In the settings activate ā€˜Disposable VM Templateā€™ and choose itself (should be already set).
Done

I might be wrong though

i done it manually before via commandline, it seems to work. But it does not act like a normal Disposable Template. It does not create random dispxxxx names for the application. can someone help me out.

Do the ā€œnoneā€ toggle means itself? or what does it mean? I done it manually before and it created a menu toggle under your mentioned default dispvm menu from itself.

No, i meant chose the qubes appVM name as dispVM template. If your appVM name doesnā€™t show in the list, activate the ā€˜Dispoable VM Templateā€™ marker, click OK, reopen the Qubes setting and it should be listed.

If it doesnā€™t work you can use the cmdline:

1 Like

yes, ive done exactly what you mentioned here, ive done it via commandline to set it to its own name as templave for dvm. I dont know if i tried reopening the qube manager in the way you mention here but i have succesfully set the dvm to its own as template.

however, it does not use random names for dvms.

It only uses random names for terminal and filemanager as example, but not for the firefox esr browser. Why is this the case ? Also if i open terminal, it closes immediatly after the appvm booted up, pops only up for a second and then shutdowns. File manager seems working fine, if i create a .txt file with touch(if i open the terminal in the file manager with right click it opens without problem) and then if i am closing the vm its gone. The other by-os-preconfigured dvm works fine, but my fedora 32 dvm that ive downloaded via package manager has the same problem with the terminal but has not the problem with the static name of the browser appvm.

Strange behaviour. Hope someone can help.

however, it does not use random names for dvms.

It depends how you start it. If you start your dvm directly from the
terminal with qvm-run or from the Qube Manager the actual disposable VM
template will start (not a random name)

If you click a program entry in the menu, an actual randomly named disp
vm should start. Let me walk you through it with an example:

qvm-create --class DispVM --template debian-10 --label red dvm-debian-10
qvm-prefs dvm-debian-10 template_for_dispvms true
qvm-features dvm-debian-10 appmenus-dispvm 1

Now you have a disposable VM template called dvm-debian-10

qvm-run dvm-debian-10 xterm ā€¦ will start the template, so you can
customize it.

qvm-run --dispvm=dvm-debian-10 qubes.StartApp+firefox-esr ā€¦ will start
a firefox in a randomly named dispvm based on dvm-debian-10

The same goes for GUI:

  • if you press the start button in the Qube Manager while dvm-debian-10
    is selected, the actual disposable qube template will start

  • if you run dvm-debian-10:Firefox ESR from the Qubes Menu then a
    randomly named dispvm will start

If your experience differs from the above, please describe what happens.

3 Likes

How are you starting these programs?
If from the menu, then it sounds as if the Menu entries have not been
correctly created.
In general, all you should have to do is
qvm-prefs <qube> template_for_dispvms True

Sometimes you have to enter:
qvm-features <dvm-template> appmenus-dispvm 1

You can test you have set the qube correctly from the command line:
qvm-run -a --service --dispvm=<qube> -- qubes.StartApp+firefox-esr

1 Like

i dont know what i have done, but it works. i entered your commands and now it works. hahaha

EDIT: However, Terminal closes immediately.

if i start xterm from template itself, it stays opened, if i start it as a disposable AppVM it closes immediatly.

EDIT: even from commandline with your command mentioned above with xterm as argument for app

if i start xterm from template itself, it stays opened, if i start it
as a disposable AppVM it closes immediately.

EDIT: even from commandline with your command mentioned above with
xterm as argument for app

I see the same thing here with error code 127

Then I checked what command is behind the menu entry and that one works
for me:

qvm-run -q -a --service --dispvm=dvm-online ā€“ qubes.StartApp+debian-xterm

why does normal terminal not work but xterm?

The ā€œnormalā€ terminal spawns a separate process and exits, which makes the VM close immediately. xterm waits until the terminal is closed.

So, is there a security reason because of the behavior of the GNOME Terminal?

No. The disposable VM has to know when you are done with it, so it can shut down. The assumption is that this happens when the process you started terminates, and with the GNOME Terminal, this happens immediately.

on the website mentioned above someone said ā€œthere is a reason that xterm should be used for dispvmsā€ so this isnā€™t the case? I understand, this is the programmed behavior of the gnome terminal. Like if i open something not properly in windows?

You can run xterm and in that execute gnome-terminal to get a proper shell.
Itā€™s not perfect, but it works
its_something_meme_postcard-r048747b5c6b24a2381258f05fd149b78_vgbaq_8byvr_324

1 Like

i tried creating a debian-10 based disposable template again, and now it does not work as template for dispvm(firefox) even if i create it from commandline. only the template itself starts if i open firefox, if i start it from commandline it works as usualā€¦

I try to setup a disposable-vm for printing under debian, can someone also explain how do i configurate the firewall properly? Is it possible to install the printer driver per appvm only like with snapd and discord as exaple or isnā€™t it possible? I tried it configuring with the ip adress in the template vm(via Qube-Manager) firewall but it seems not to workā€¦ I want to avoid copying an entire template vm because it wastes tons of memory for nothing.