[Lxc-users] fedora 16 under lxc

Serge Hallyn serge.hallyn at canonical.com
Tue Feb 14 15:23:10 UTC 2012


Quoting Ramez Hanna (rhanna at informatiq.org):
> On Mon, Feb 13, 2012 at 10:34 PM, Ramez Hanna <rhanna at informatiq.org> wrote:
> > hei
> > I have been able to get some form of f16 under lxc running but some quirks
> > so steps (untill i make a patch or a new script)
> > use the current lxc-fedora to create a container
> > chroot into the rootfs
> > unlink /etc/systemd/system/default.target
> > ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
> > touch /etc/fstab
> >
> > now that should in theory work
> > my setup is a KVM guest with lxc installed
> > i'm using VM-manager so i get to see the ttys while i start the
> > container from ssh
> > in fedora the tty1 is empty
> > i make sure i have tty1 visible
> > start the container from an ssh session using the -d flag
> > looking at the tty1 of the VM
> > i can see the console log from the lxc container
> >
> > so 1st quirk: i only get the container output on tty1 of the host (kvm
> > guest) and not from the lxc-console
> > lxc-console is blank
> > when i installed ssh inside the container i was able to access it and
> > use it nicely
> > only had 2 services failing
> > systemd-kmsg-syslogd.service
> > plymouth-start.service
> >
> >
> > any hints on how does lxc-console work to help me figure it out
> > also agetty on tty* keeps restarting (maybe that's why no lxc-console)
> >
> > anyoe interested in trying it out?
> >
> > --
> > BR
> > RH
> > http://informatiq.org
> 
> now all my efforts have not succeedd to get getty on tty1 to start
> unmasking udev did something different
> it created all the /dev devices
> and made getty start but it started on the hosts's tty not on the container's
> could someone shed some light here?

Blind guess:

lxc-start creates some ptys and bind mounts them onto the guest's
/dev/{console,tty{1,2,3,4}}.  It sounds like fedora's init is mounting
over the /dev set up by lxc causing a new /dev/tty to be created as
chardev 4:{1-4}.  Devices namespaces would help this.  We're hoping to
discuss design for those at next UDS, but those will come after user
namespaces.  In the mean time, you'll need to make sure that the guest
does not mount over /dev, and does not remount /dev/pts.

-serge




More information about the lxc-users mailing list