Merge lp:~smoser/cloud-utils/trunk.mic-lxd into lp:cloud-utils
Status: | Merged |
---|---|
Merged at revision: | 312 |
Proposed branch: | lp:~smoser/cloud-utils/trunk.mic-lxd |
Merge into: | lp:cloud-utils |
Diff against target: |
192 lines (+103/-26) 1 file modified
bin/mount-image-callback (+103/-26) |
To merge this branch: | bzr merge lp:~smoser/cloud-utils/trunk.mic-lxd |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Registry Administrators | Pending | ||
Review via email: mp+305641@code.launchpad.net |
Commit message
mount-image-
given lxd container on local system 'x1', you can now do:
sudo mount-image-
lxd:x1 -- chroot _MOUNTPOINT_ apt-get update
using mic to chroot into a lxd container is useful compared to 'lxc-chroot'
or simply chroot /path/to/
a.) lxc-chroot puts in own network namespace (meaning network doesnt work without bringing it up).
b.) chroot /path/to/container does not set resolvconf or system mounts
c.) mic knows assumed paths to lxd container
d.) mic uses lxc-usernsexec to join the appropriate user namespace.
Along the way, we add two little tools that can be used:
uns-switch: user namespace switch ... switch to the user based on some environment variables that mic sets up
mchroot: mic chroot. reads $MOUNTPOINT.
\o/
Nice!