[Bug 213689] Allow bhyve to run from non-root user

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Oct 21 19:26:45 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213689

            Bug ID: 213689
           Summary: Allow bhyve to run from non-root user
           Product: Base System
           Version: CURRENT
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: ivan.zhmudo at gmail.com
                CC: freebsd-amd64 at FreeBSD.org
                CC: freebsd-amd64 at FreeBSD.org

Created attachment 176037
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=176037&action=edit
The patch

Hello. I've tried a new bhyve from FreeBSD 11.0, with its new graphics support,
it's great, many thanks to developers. I do not need VirtualBox anymore!

The only annoying problem with it is inability to run a virtual machine from an
ordinary (non-root) user.

I've wrote a fast fix for this. It adds /dev/vmmctl device when vmm module is
loaded. When you can set any permissions on it by editing /etc/devfs.conf, for
example, or simply calling chown/chmod. Those users, who can read from / write
to this device can create, open and destroy virtual machines. The devices in
/dev/vmm and /dev/vmm.io are created with UIDs of user who creates them. The
old way for creating or destroying virtual machines was removed ("beavis"
sysctls), libvmmapi is changed correspondingly with the kernel.

Please tell me what you think.
As for me, I added myself to a group bhyveusr and added the following to
/etc/devfs.conf

own   vmmctl   root:bhyveusr
perm  vmmctl   0660

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list