Hello, how to send a command to dom0 from a virtual machine to unmount a USB?
I want to create a Systemd Unit to send commands to dom0 before shutting down the virtual machine:
I want to implement automatic mounting and unmounting of usb and block devices, for this I need to send a command from qubes to dom0 using Qrexec.
I read the Qrexec documentation:
But I didn’t find any example how to send a command from qubes to dom0 (examples of sending commands from Qubes-A to Qubes-B are described, but not to dom0), could you please provide a link with an example or briefly explain to me how to do this? Thanks in advance.
Check how qubes.InputKeyboard works. Sys-usb will call qubes.InputKeyboard service and it’ll execute /etc/qubes-rpc/qubes.InputKeyboard in dom0 if it’s allowed by policy.