12

I recently installed the 32 bit lxc container on a 64 bit Ubuntu 12.04 system. When I run the command sudo lxc-start -n my32bitbox I am greeted with a login prompt. I enter the default login and password which is: login= ubuntu ; password= ubuntu; but I am still unable to log on to the container. How can I resolve this issue?

Braiam
  • 69,112
Crelloc
  • 121
  • 1
  • 1
  • 3

5 Answers5

16

login to container

lxc exec <container-name> -- sudo --login --user <username>

get the shell prompt of the container

lxc exec <container-name> -- sudo /bin/bash
3
lxc-start -n <container_name> -d
lxc-attach -n <container_name>

does the trick

amc
  • 7,292
Ham5ter
  • 39
2
lxc exec <container> passwd

set your passwd exit out (ctrl-a q)

then

lxc console <container>
2

You can also use ssh command to login to LXC-container:

ssh lxcuser@container_ip_address

To find out the LXC IP-address you can use this:

ssh ubuntu@`sudo lxc-info -iH -n CN`

where CN is the container name and 'ubuntu' is the user acc in the LXC.

OpenITeX
  • 123
1

You need to enter the password for the "sudo" command to gain root privilege, in order to run lxc-start. It is not the login prompt for the container itself.

OpenITeX
  • 123
Jing Qiu
  • 111