Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Oct 2016 19:26:44 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 213689] Allow bhyve to run from non-root user
Message-ID:  <bug-213689-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213689

            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@FreeBSD.org
          Reporter: ivan.zhmudo@gmail.com
                CC: freebsd-amd64@FreeBSD.org
                CC: freebsd-amd64@FreeBSD.org

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

Hello. I've tried a new bhyve from FreeBSD 11.0, with its new graphics supp=
ort,
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 fro=
m 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 / wr=
ite
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

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-213689-8>