I’m trying to copy a file from a VM to another VM, from dom0 as part of an automated script.
So far I’ve tried:
qvm-run VM1 "qvm-copy-to-vm VM2 FILE
which requires user interaction to select the destination vm.
qvm-copy-to-vm VM2 "$(qvm-run --pass-io VM1 "cat FILE")"
which only displays the file in dom0 terminal without actually copying it.
Is anyone aware of some workaround that does not involve saving the file to dom0 and then transferring it to the second vm?
enmus
March 21, 2022, 8:53pm
2
In /etc/qubes/policy.d/90-default.policy
, lines 30 and 31
# File copy/move
qubes.Filecopy * @anyvm @anyvm ask
change to allow
by creating policy with lower number. But, you should rethink possible security issues by allowing this.
2 Likes
Of course, I modified it to allow only the VMs needed for the script and then the policy will automatically be deleted once all necessary actions have been performed.
Thank you!
enmus
March 22, 2022, 5:02pm
4
You are welcome @BEBF738VD . If you are satisfied, you might want to mark the post as solution so it could help other users too.
Sven
March 22, 2022, 7:43pm
5
This thread belongs into ‘User Support’. I moved it there, which will also allow the OP to select a specific post as ‘Solution’.