We have a virtual win7 machine that needs to be rebooted remotely from time to time. We created a restricted user account with the shell set to rbash so a user can ssh in and reboot the virtual machine via virsh when needed.
user@machine:~$ echo $SHELL /bin/rbash user@machine:~$ virsh Welcome to virsh, the virtualization interactive terminal. Type: 'help' for help with commands 'quit' to quit virsh # list error: failed to connect to the hypervisor error: no valid connection error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
virsh and virt-top do run, but the user can't do anything inside virsh. How can we allow this user to run virsh commands from an rbash shell?