[lxc-users] Access to /dev/kvm under an lxc container?

Dirk Geschke dirk at lug-erding.de
Wed Jan 30 23:00:04 UTC 2019


Hi Mark,

> I'm trying to run Android Studio under an lxc container. The emulator in
> Android Studio requires /dev/kvm support. I am passing access to this
> device through with:
> 
>   lxc.mount.entry = /dev/kvm dev/kvm none bind,create=file 0 0

you need access to /dev/kvm on the host with the uid of the user
in the lxc container.

The easiest way is, to give all users access to /dev/kvm on the
host, e.g.:

   chmod a+rw /dev/kvm

After this, the bind-mount will allow access to the special
character device, too.

How secure this is, it's another question...

Best regards

Dirk

-- 
+----------------------------------------------------------------------+
| Dr. Dirk Geschke       / Plankensteinweg 61    / 85435 Erding        |
| Telefon: 08122-559448  / Mobil: 0176-96906350 / Fax: 08122-9818106   |
| dirk at geschke-online.de / dirk at lug-erding.de  / kontakt at lug-erding.de |
+----------------------------------------------------------------------+


More information about the lxc-users mailing list