Lab 3.3 - systemd-nspawn - login to container
Lab 3.3 goes through the process of debootstrapping a container and booting it. However, the explanations stop short at how to actually login and use that container.
Searching the WWW I found the answer. Before running systemd-nspawn -bD ~/DebianContainer/, run the following:
[email protected]:~# systemd-nspawn -D ~/DebianContainer/ Spawning container DebianContainer on /root/DebianContainer. Press ^] three times within 1s to kill container. Host and machine ids are equal (a006ae0037b045dd8276dd6252395133): refusing to link journals [email protected]:~# passwd New password: Retype new password: passwd: password updated successfully [email protected]:~# exit logout Container DebianContainer exited successfully. [email protected]:~# systemd-nspawn -b -D ~/DebianContainer/
It's very simple, but without it the entire exercise is like travelling to Ghiza (Egypt) and not seeing the pyramids.