<div dir="ltr">Hi All,<div><br></div><div>I am trying to evaluate whether centos-4.8 system container work on Fedora-19 machine or not.</div><div><br></div><div>Host machine             : Fedora 19</div><div>Guest (LXC container) : CentOS4 .8</div>
<div><br></div><div>For creation of  of container i followed following steps,</div><div><p>      1. Installed libvirt packages on fedora19</p><p>       2. For installation of rootfs using yum, I have created the LOCAL YUM REPO using CentOS-4.8  ISO files</p>
<p></p><p>       3. Created rootfs using yum</p><p>       4.  Made changes in container xml file required for system container</p><p>       5 .Define container using container xml file </p><p>Whenever I start system container it get started successfully but when I am trying to access it using console then It show errors regarding /etc/fstab files and filesystem corruption. I am not able to access the container. <br>
</p><p><br></p><p>Refer below for container xml file and error message,  </p><p><br></p><p>contents of xml file for Centos container, <b>Centos4_8.xml:</b><br></p><p><span style="font-family:'courier new',monospace"><domain type='lxc'></span></p>
<p><font face="courier new, monospace"> <name>BasicCentos</name></font></p><p><font face="courier new, monospace"> <memory unit='KiB'>102400</memory></font></p><p><font face="courier new, monospace"> <currentMemory unit='KiB'>102400</currentMemory></font></p>
<p><font face="courier new, monospace"> <os></font></p><p><font face="courier new, monospace">    <type>exe</type></font></p><p><font face="courier new, monospace">    <init>/sbin/init</init></font></p>
<p><font face="courier new, monospace"> </os></font></p><p><font face="courier new, monospace"> <clock offset='utc'/></font></p><p><font face="courier new, monospace"> <on_poweroff>destroy</on_poweroff></font></p>
<p><font face="courier new, monospace"> <on_reboot>restart</on_reboot></font></p><p><font face="courier new, monospace"> <on_crash>destroy</on_crash></font></p><p><font face="courier new, monospace"> <devices></font></p>
<p><font face="courier new, monospace">    <emulator>/usr/libexec/libvirt_lxc</emulator></font></p><p><font face="courier new, monospace">    <filesystem type='mount' accessmode='passthrough'></font></p>
<p><font face="courier new, monospace">       <source dir='/lxc/centos4.8'/></font></p><p><font face="courier new, monospace">       <target dir='/'/></font></p><p><font face="courier new, monospace">    </filesystem></font></p>
<p><font face="courier new, monospace">    <interface type='bridge'></font></p><p><font face="courier new, monospace">       <source bridge='br0'/></font></p><p><font face="courier new, monospace">    </interface></font></p>
<p><font face="courier new, monospace">    <console type='pty' port='0'></console></font></p><p><font face="courier new, monospace">  </devices></font></p><p><font face="courier new, monospace"></domain></font></p>
<p>------------- </p><p><b><br></b></p><p><b>ERROR LOG</b> When trying to access container using CONSOLE command,</p><p><font face="courier new, monospace">virsh # console BasicCentos</font></p><p><font face="courier new, monospace">Connected to domain BasicCentos</font></p>
<p><span style="font-family:'courier new',monospace">Escape character is ^]</span></p><p><font face="courier new, monospace">INIT: version 2.85 booting</font></p><p><font face="courier new, monospace">/etc/rc.d/rc.sysinit: line 36: [: /sys/fs/selinux: binary operator expected</font></p>
<p><font face="courier new, monospace">Setting default font ():                                   [  OK  ]</font></p><p><font face="courier new, monospace"> </font></p><p><font face="courier new, monospace">                                Welcome to  CentOS release 4.8 (Final)</font></p>
<p><font face="courier new, monospace">                                Press 'I' to enter interactive startup.</font></p><p><font face="courier new, monospace">hwclock: KDGHWCLK ioctl failed, errno=25: Inappropriate ioctl for device.</font></p>
<p><font face="courier new, monospace">Cannot access the Hardware Clock via any known method.</font></p><p><font face="courier new, monospace">Use the --debug option to see the details of our search for an access method.</font></p>
<p><font face="courier new, monospace">Setting clock : Thu Nov 21 01:48:58 EST 2013               [  OK  ]</font></p><p><font face="courier new, monospace">Starting udev:  MAKEDEV: error making /dev/tty1: Operation not permitted</font></p>
<p><font face="courier new, monospace">                                                           [FAILED]</font></p><p><font face="courier new, monospace">Initializing hardware...  storage network audio done       [  OK  ]</font></p>
<p><font face="courier new, monospace">raidautorun: unable to autocreate /dev/md0</font></p><p><font face="courier new, monospace">mount: can't find /dev/pts in /etc/fstab or /etc/mtab</font></p><p><font face="courier new, monospace">Configuring kernel parameters:                             [  OK  ]</font></p>
<p><font face="courier new, monospace">Setting hostname centos:                                   [  OK  ]</font></p><p><font face="courier new, monospace">Checking root filesystem</font></p><p><font face="courier new, monospace">fsck.ext2: Is a directory while trying to open /</font></p>
<p><font face="courier new, monospace">/:</font></p><p><font face="courier new, monospace">The superblock could not be read or does not describe a correct ext2</font></p><p><font face="courier new, monospace">filesystem.  If the device is valid and it really contains an ext2</font></p>
<p><font face="courier new, monospace">filesystem (and not swap or ufs or something else), then the superblock</font></p><p><font face="courier new, monospace">is corrupt, and you might try running e2fsck with an alternate superblock:</font></p>
<p><font face="courier new, monospace">    e2fsck -b 8193 <device></font><span style="font-family:'courier new',monospace"> </span></p><p><font face="courier new, monospace">                                                           [FAILED]</font><span style="font-family:'courier new',monospace"> </span></p>
<p><font face="courier new, monospace">*** An error occurred during the file system check.</font></p><p><font face="courier new, monospace">*** Dropping you to a shell; the system will reboot</font></p><p><font face="courier new, monospace">*** when you leave the shell.</font></p>
<p><font face="courier new, monospace">*** Warning -- SELinux is active</font></p><p><font face="courier new, monospace">*** Disabling security enforcement for system recovery.</font></p><p><font face="courier new, monospace">*** Run 'setenforce 1' to reenable.</font></p>
<p><font face="courier new, monospace">/etc/rc.d/rc.sysinit: line 52: $selinuxfs/enforce: ambiguous redirect</font></p><p><font face="courier new, monospace">Press enter for maintenance</font></p><p><font face="courier new, monospace">(or type Control-D to continue):</font></p>
<p><font face="courier new, monospace">(Repair filesystem) 1 # exit</font></p><p><font face="courier new, monospace">Unmounting file systems</font></p><p><font face="courier new, monospace">mount: can't find / in /etc/fstab or /etc/mtab</font></p>
<p><font face="courier new, monospace">Automatic reboot in progress.</font></p><p> <br></p><p>thanks in advance.</p></div><div> </div><div><br></div><div>Regards,</div><div>Rahul Khengare,</div><div>NTT OSS Center, Pune, India.</div>
</div>