[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libvirt-users
Subject:    [libvirt-users] centos4.8 system container not working on fedora 19 machine
From:       Rahul Khengare <rahulk1306 () gmail ! com>
Date:       2013-11-22 6:15:43
Message-ID: CAB-fUw9q1dULjk5dgYKA8XdUG5R01rPtuCsyp73fQka_z2zmfg () mail ! gmail ! com
[Download RAW message or body]

Hi All,

I am trying to evaluate whether centos-4.8 system container work on
Fedora-19 machine or not.

Host machine             : Fedora 19
Guest (LXC container) : CentOS4 .8

For creation of  of container i followed following steps,

      1. Installed libvirt packages on fedora19

       2. For installation of rootfs using yum, I have created the LOCAL
YUM REPO using CentOS-4.8  ISO files

       3. Created rootfs using yum

       4.  Made changes in container xml file required for system container

       5 .Define container using container xml file

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.


Refer below for container xml file and error message,


contents of xml file for Centos container, *Centos4_8.xml:*

<domain type='lxc'>

 <name>BasicCentos</name>

 <memory unit='KiB'>102400</memory>

 <currentMemory unit='KiB'>102400</currentMemory>

 <os>

    <type>exe</type>

    <init>/sbin/init</init>

 </os>

 <clock offset='utc'/>

 <on_poweroff>destroy</on_poweroff>

 <on_reboot>restart</on_reboot>

 <on_crash>destroy</on_crash>

 <devices>

    <emulator>/usr/libexec/libvirt_lxc</emulator>

    <filesystem type='mount' accessmode='passthrough'>

       <source dir='/lxc/centos4.8'/>

       <target dir='/'/>

    </filesystem>

    <interface type='bridge'>

       <source bridge='br0'/>

    </interface>

    <console type='pty' port='0'></console>

  </devices>

</domain>

-------------


*ERROR LOG* When trying to access container using CONSOLE command,

virsh # console BasicCentos

Connected to domain BasicCentos

Escape character is ^]

INIT: version 2.85 booting

/etc/rc.d/rc.sysinit: line 36: [: /sys/fs/selinux: binary operator expected

Setting default font ():                                   [  OK  ]



                                Welcome to  CentOS release 4.8 (Final)

                                Press 'I' to enter interactive startup.

hwclock: KDGHWCLK ioctl failed, errno=25: Inappropriate ioctl for device.

Cannot access the Hardware Clock via any known method.

Use the --debug option to see the details of our search for an access
method.

Setting clock : Thu Nov 21 01:48:58 EST 2013               [  OK  ]

Starting udev:  MAKEDEV: error making /dev/tty1: Operation not permitted

                                                           [FAILED]

Initializing hardware...  storage network audio done       [  OK  ]

raidautorun: unable to autocreate /dev/md0

mount: can't find /dev/pts in /etc/fstab or /etc/mtab

Configuring kernel parameters:                             [  OK  ]

Setting hostname centos:                                   [  OK  ]

Checking root filesystem

fsck.ext2: Is a directory while trying to open /

/:

The superblock could not be read or does not describe a correct ext2

filesystem.  If the device is valid and it really contains an ext2

filesystem (and not swap or ufs or something else), then the superblock

is corrupt, and you might try running e2fsck with an alternate superblock:

    e2fsck -b 8193 <device>

                                                           [FAILED]

*** An error occurred during the file system check.

*** Dropping you to a shell; the system will reboot

*** when you leave the shell.

*** Warning -- SELinux is active

*** Disabling security enforcement for system recovery.

*** Run 'setenforce 1' to reenable.

/etc/rc.d/rc.sysinit: line 52: $selinuxfs/enforce: ambiguous redirect

Press enter for maintenance

(or type Control-D to continue):

(Repair filesystem) 1 # exit

Unmounting file systems

mount: can't find / in /etc/fstab or /etc/mtab

Automatic reboot in progress.



thanks in advance.


Regards,
Rahul Khengare,
NTT OSS Center, Pune, India.

[Attachment #3 (text/html)]

<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:&#39;courier \
new&#39;,monospace">&lt;domain type=&#39;lxc&#39;&gt;</span></p> <p><font \
face="courier new, monospace"> \
&lt;name&gt;BasicCentos&lt;/name&gt;</font></p><p><font face="courier new, \
monospace"> &lt;memory unit=&#39;KiB&#39;&gt;102400&lt;/memory&gt;</font></p><p><font \
face="courier new, monospace"> &lt;currentMemory \
unit=&#39;KiB&#39;&gt;102400&lt;/currentMemory&gt;</font></p> <p><font face="courier \
new, monospace"> &lt;os&gt;</font></p><p><font face="courier new, monospace">    \
&lt;type&gt;exe&lt;/type&gt;</font></p><p><font face="courier new, monospace">    \
&lt;init&gt;/sbin/init&lt;/init&gt;</font></p> <p><font face="courier new, \
monospace"> &lt;/os&gt;</font></p><p><font face="courier new, monospace"> &lt;clock \
offset=&#39;utc&#39;/&gt;</font></p><p><font face="courier new, monospace"> \
&lt;on_poweroff&gt;destroy&lt;/on_poweroff&gt;</font></p> <p><font face="courier new, \
monospace"> &lt;on_reboot&gt;restart&lt;/on_reboot&gt;</font></p><p><font \
face="courier new, monospace"> \
&lt;on_crash&gt;destroy&lt;/on_crash&gt;</font></p><p><font face="courier new, \
monospace"> &lt;devices&gt;</font></p> <p><font face="courier new, monospace">    \
&lt;emulator&gt;/usr/libexec/libvirt_lxc&lt;/emulator&gt;</font></p><p><font \
face="courier new, monospace">    &lt;filesystem type=&#39;mount&#39; \
accessmode=&#39;passthrough&#39;&gt;</font></p> <p><font face="courier new, \
monospace">       &lt;source dir=&#39;/lxc/centos4.8&#39;/&gt;</font></p><p><font \
face="courier new, monospace">       &lt;target \
dir=&#39;/&#39;/&gt;</font></p><p><font face="courier new, monospace">    \
&lt;/filesystem&gt;</font></p> <p><font face="courier new, monospace">    \
&lt;interface type=&#39;bridge&#39;&gt;</font></p><p><font face="courier new, \
monospace">       &lt;source bridge=&#39;br0&#39;/&gt;</font></p><p><font \
face="courier new, monospace">    &lt;/interface&gt;</font></p> <p><font \
face="courier new, monospace">    &lt;console type=&#39;pty&#39; \
port=&#39;0&#39;&gt;&lt;/console&gt;</font></p><p><font face="courier new, \
monospace">  &lt;/devices&gt;</font></p><p><font face="courier new, \
monospace">&lt;/domain&gt;</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:&#39;courier \
new&#39;,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 &#39;I&#39; 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&#39;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 \
&lt;device&gt;</font><span style="font-family:&#39;courier new&#39;,monospace"> \
</span></p><p><font face="courier new, monospace">                                    \
[FAILED]</font><span style="font-family:&#39;courier new&#39;,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 &#39;setenforce 1&#39; 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&#39;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>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic