Console to RHEL6.1 container

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We are trying to create RHEL6.1 container and having trouble getting a
proper console to the container.

I have used lxc containers in the past and lxc has a script (lxc-fedora)
to setup a basic Fedora container. Is there something similar or docs
with virtmgr ?  

We started out making a copy of the root fs and using that copy as the
root for the container. I made a couple of tweaks to the container rootfs:

	1. ensured that /dev/ptmx is a symlink to pts/ptmx
	2. Added 'newinstance' option to the devpts mount in fstab

The container xml file is attached.

If devpts entry in container's fstab has the 'newinstance' option, I get a
brief "domain test01 started" message on the stdout.

When I run 'virsh consle test01', I only see a few messages

---
Setting hostname node03:                                   [  OK  ]
Setting up Logical Volume Management:   No volume groups found
                                                           [  OK  ]
Checking filesystems
                                                           [  OK  ]
mount: can't find / in /etc/fstab or /etc/mtab
Mounting local filesystems:                                [  OK  ]
Enabling local filesystem quotas:                          [  OK  ]
Enabling /etc/fstab swaps:                                 [  OK  ]

---

and then a hang wihtout a shell. At ths point sshd or any of the other
services don't appear to be running.

If I remove the 'newinstance' entry in fstab and run 'virsh start test01'
the container starts up ok.  I get all "console" messages on whichever
is my current /dev/pts/0 !

At this point sshd and many other services are running and I can ssh in.

Even in this case, though 'virsh console test01' shows the same _few_
messages as above and no login shell.

Back to the newinstance case, by putting some debug messages in the
container's /etc/rc.sysinit, I see that devpts is already mounted 
with newinstance. 

With lxc, in setup_pts(), we unmount devpts in the container and then
mount with newinstance. I wonder what that sequence is with virtmgr.

I double checked that /dev/ptmx in container is a symlink to pts/ptmx
and that CONFIG_DEVPTS_MULTIPLE_INSTANCES=y.

Appreciate any tips on how I can get access to the console of the RHEL6.1
container.

Suka
Suka



[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux