[lxc-users] Tool for shifting subuids and subgids

teemu.gronqvist at net9.fi teemu.gronqvist at net9.fi
Wed Oct 7 11:24:43 UTC 2015


Hello everyone,


Made this tool in the morning. It can be used to shift subuid and subgid maps of unprivleged containers easily to bigger or smaller range making migrations and things like that a whole lot easier. I’m not sure if LXD does this by default when migrating, but anyways yeah, it’s a good tool for plain LXC to say the least.


It is very useful for our company so I thought that someone else might find it useful as well.


Here’s the source for anyone interested: http://paste.ubuntu.com/12703540/


This is based on the C version found at https://github.com/fcicq/nsexec/blob/master/uidmapshift.c but this one is instead programmed in Python needing no compiling etc.


I have tested it a few times on a few folders but it might have some bugs, so maybe someone more experienced in Python than me might want to give it a look.


Kind regards,

Teemu Grönqvist

Net9 Oy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20151007/86ce2030/attachment.html>


More information about the lxc-users mailing list