VirtualBox security: heavily restricting the operations non-root users can execute
Posted: 28. Jun 2016, 21:37
Our non-root users, who all share computing resources, want VirtualBox to be able to create their own VMs. But we don't want to give them the ability to use it on our hardware for rampant VM usage unless we can enforce rigid restrictions at the VirtualBox level. Here are some examples of things we want to restrict:
* A single VM should not use up more than, say, 15% of a hosts cores and RAM
* A single VM's disk should be less than, say, 50 GB, and should be fixed.
* NAT should be the only allowed Network mode (no Bridged!).
Setting resource usage on an OS level (e.g. /etc/security/limits.conf in Linux) is not feasible because users should be able to use more resources for other non-VirtualBox operations.
I can't find clear documentation on how to do these things. There is a section in the manual about " Locking down the VirtualBox manager GUI", and it vaguely mentions that you can lock down "Network", so there's that I guess. But why wouldn't someone just be able to create a VM using VBoxManage on the command line, bypassing GUI restrictions?
* A single VM should not use up more than, say, 15% of a hosts cores and RAM
* A single VM's disk should be less than, say, 50 GB, and should be fixed.
* NAT should be the only allowed Network mode (no Bridged!).
Setting resource usage on an OS level (e.g. /etc/security/limits.conf in Linux) is not feasible because users should be able to use more resources for other non-VirtualBox operations.
I can't find clear documentation on how to do these things. There is a section in the manual about " Locking down the VirtualBox manager GUI", and it vaguely mentions that you can lock down "Network", so there's that I guess. But why wouldn't someone just be able to create a VM using VBoxManage on the command line, bypassing GUI restrictions?