[lxc-users] Proper Syntax for Setting raw.idmap for a container

Dan Miller dmill178 at gmail.com
Wed Feb 22 05:58:07 UTC 2017


I'm following the procedure for mounting a host drive inside an lxc
container as described here:
https://insights.ubuntu.com/2016/12/08/mounting-your-home-directory-in-lxd/.

In that article the author sets the raw.idmap like this:

lxc config set zesty raw.idmap 'both 1000 1000'

I want to customize the mapping for gid and uid as described in the
lxd raw.idmap documentation. Which shows a sample mapping as this:

both 1000 1000
uid 50-60 500-510
gid 10000-110000 10000-20000

I'm struggling with the syntax for actually setting this on my
container, as it doesn't seem as though the command in the article
works for multi-line configurations, and I've tried entering it all on
a single line and by using JSON, but no luck, the container gives
configuration errors and won't start.

What is the correct way to configure this property?


More information about the lxc-users mailing list