Track resources and enforce cpu/memory/interface limits for non-root users.
authorreyk <reyk@openbsd.org>
Sun, 15 Jul 2018 14:36:54 +0000 (14:36 +0000)
committerreyk <reyk@openbsd.org>
Sun, 15 Jul 2018 14:36:54 +0000 (14:36 +0000)
commit382b7e55cc6fe1849fae73368aaa01ad2d4535e7
treea5a3f61bb0d7449c906ad45905e88df8f9f2be6a
parent1bb80ef7d5c2fa9d2050ef6f22f352abb6596891
Track resources and enforce cpu/memory/interface limits for non-root users.

The limits are currently hard-coded and undocumented (4 CPUs/VMs, 2G
memory, 8 interfaces) but will be configurable in an upcoming diff.
These limits are tracked in total usage; for example, a user will be
able to run up to 4 VMs with 512M of memory or a single VM with 2G.

OK ccardenas@ mlarkin@
usr.sbin/vmd/config.c
usr.sbin/vmd/proc.h
usr.sbin/vmd/vioscsi.c
usr.sbin/vmd/vmd.c
usr.sbin/vmd/vmd.h