Run commands and copy files in --dispvm from dom0

Qubes tooling is a bit rigid in how it creates and starts the usual disp1234 DisposableVMs, but you can get full control by creating custom DispVM class VMs:

name=my-dispvm-$RANDOM
template=$(qubes-prefs default_dispvm)
qvm-create --class=DispVM --prop=auto_cleanup=True --label=red --template="$template" "$name"
qvm-copy-to-vm "$name" ...
qvm-run "$name" ...
...
qvm-kill "$name"
2 Likes