[lxc-users] LXD: change of subuids

Stéphane Graber stgraber at ubuntu.com
Sat Feb 6 17:08:17 UTC 2016


On Sat, Feb 06, 2016 at 09:25:13AM +0100, david.andel at bli.uzh.ch wrote:
> Hi
> 
> I would like to change the subuids used by LXD. In oder to do that I have changed the entry in /etc/subuid and /etc/subgid but new containers kept the former uid space.
> Even after deleting all container and all images new containers keep getting the old uid range.
> 
> I have found that the uid range is in /var/lib/lxd/lxd.db :
> root at andel2:~# grep -rs 265536 /var/lib/lxd/
> Binary file /var/lib/lxd/lxd.db matches
> 
> But looking at the file with sqlite3 seems to show an utterly empty db:
> root at andel2:~# sqlite3 /var/lib/lxd/lxd.db 
> SQLite version 3.8.11.1 2015-07-29 20:00:57
> Enter ".help" for usage hints.
> sqlite> .tables
> certificates               images_aliases           
> config                     images_properties        
> containers                 profiles                 
> containers_config          profiles_config          
> containers_devices         profiles_devices         
> containers_devices_config  profiles_devices_config  
> containers_profiles        schema                   
> images                   
> sqlite> select * from config;
> sqlite> select * from profiles;
> 1|default
> sqlite> select * from schema;
> 1|20|1452174199
> 2|21|1453375824
> sqlite> select * from containers;
> sqlite> select * from containers_config;
> sqlite> select * from images;
> sqlite> select * from images_properties;
> sqlite> select * from profiles_config;
> sqlite> .exit
> 
> Where and how can I change the uid/gid range without completely reinstalling?
> 
> Thanks!

Did you change the uid/gid allocation of both the lxd and root users in
/etc/subuid and /etc/subgid?

Changing only the lxd user will not do what you want as that user is
used for tracking only (so we know what allocation to remove when lxd is
uninstalled), the effective allocation is that from the root user (under
which lxd runs).


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160206/9f53da21/attachment.sig>


More information about the lxc-users mailing list