View previous topic :: View next topic |
Author |
Message |
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Sat Nov 07, 2009 5:19 pm Post subject: Moving from openvz to linux lxc |
|
|
Since openvz has not had any upstream development in months I have to evaluate linux lxc.
Anyone use this yet?
I have heard from a gentoo developer (Peter Volkov) that openvz containers can be moved to linux lxc with minimal changes:
http://forum.openvz.org/index.php?t=rview&goto=37986#msg_37986
My concern is for a few cases I need the extended network support of openvz. The reason is I believe DHCP servers and samba PDCs required a mac address to function. _________________ John
My gentoo overlay
Instructons for overlay |
|
Back to top |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
|
Back to top |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
|
Back to top |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Fri Nov 13, 2009 5:43 am Post subject: |
|
|
I tried to test lxc today with an openvz container I created from metro (http://www.funtoo.org/en/metro/tutorial/) in July but the guest did not boot correctly.
Code: | ocalhost ~ # lxc-start -n guest_1 init
INIT: version 2.86 booting
OpenRC 0.4.3 is starting up Gentoo Linux (x86_64)
Press I to enter interactive boot mode
* /proc is already mounted, skipping
* Caching service dependencies... [ ok ]
* Setting system clock using the hardware clock [UTC]... [ ok ]
* Autoloaded 0 module(s)
* Checking local filesystems ... [ ok ]
* Updating /etc/mtab...
* /etc/mtab is not updateable [ !! ]
* Mounting local filesystems... [ ok ]
* Setting hostname to gentoo-openvz-~core2-2009-07-29... [ ok ]
* Configuring kernel parameters... [ ok ]
* Creating user login records... [ ok ]
* Cleaning /var/run... [ ok ]
* Wiping /tmp directory... [ ok ]
* Setting terminal encoding [UTF-8]... [ ok ]
* Loading key mappings [us]... [ ok ]
* Setting keyboard mode [UTF-8]... [ ok ]
* Bringing up interface lo
* Caching network module dependencies
* 127.0.0.1/8... [ ok ]
* Adding routes
* 127.0.0.0/8 via 127.0.0.1... [ ok ]
* Mounting USB device filesystem [usbfs]... [ ok ]
* Activating swap devices... [ ok ]
* Initializing random number generator... [ ok ]
INIT: Entering runlevel: 3
* Mounting network filesystems... [ ok ]
* Starting sshd... [ ok ]
* Starting local... [ ok ]
INIT: no more processes left in this runlevel
|
I am trying to have metro build a new container with the updated openrc but it's doubtful I will be able to test this before I start my week vacation in 28 hours or so.. _________________ John
My gentoo overlay
Instructons for overlay |
|
Back to top |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Sat Nov 14, 2009 3:53 am Post subject: |
|
|
I updated my metro build of openvz to use sys-apps/openrc-0.5.2-r2 and it still did not work.
However, I solved this by using an inittab I had installed on a different openvz guest and after some tinkering it is working. Also I replaced the inittab on the virtualbox host with the one from the real hardware gentoo box. Hope this was not too confusing. I am testing lxc under gentoo under virtualbox that is running on my gentoo desktop that at the moment runs openvz. If I can get lxc to work as well as openvc, I can drop the requirement of using a special kernel and be able to run current kernels that have "stable" ext4 instead of ext4dev that I have been running for a year under 2.6.27.X
Here is the seemingly working lxc guest /etc/inittab
Code: | gentoo-openvz-~core2-2009-11-13 ~ # cat /etc/inittab
#
# /etc/inittab: This file describes how the INIT process should set up
# the system in a certain run-level.
#
# Author: Miquel van Smoorenburg, <miquels@cistron.nl>
# Modified by: Patrick J. Volkerding, <volkerdi@ftp.cdrom.com>
# Modified by: Daniel Robbins, <drobbins@gentoo.org>
# Modified by: Martin Schlemmer, <azarah@gentoo.org>
#
# $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/files/inittab,v 1.5 2005/12/22 02:03:23 vapier Exp $
# Default runlevel.
id:3:initdefault:
# System initialization, mount local filesystems, etc.
si::sysinit:/sbin/rc sysinit
# Further system initialization, brings up the boot runlevel.
rc::bootwait:/sbin/rc boot
l0:0:wait:/sbin/rc shutdown
l1:S1:wait:/sbin/rc single
l2:2:wait:/sbin/rc nonetwork
l3:3:wait:/sbin/rc default
l4:4:wait:/sbin/rc default
l5:5:wait:/sbin/rc default
l6:6:wait:/sbin/rc reboot
#z6:6:respawn:/sbin/sulogin
# TERMINALS
c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c2:2345:respawn:/sbin/agetty 38400 tty2 linux
c3:2345:respawn:/sbin/agetty 38400 tty3 linux
c4:2345:respawn:/sbin/agetty 38400 tty4 linux
c5:2345:respawn:/sbin/agetty 38400 tty5 linux
c6:2345:respawn:/sbin/agetty 38400 tty6 linux
# SERIAL CONSOLES
#s0:12345:respawn:/sbin/agetty 9600 ttyS0 vt100
#s1:12345:respawn:/sbin/agetty 9600 ttyS1 vt100
# What to do at the "Three Finger Salute".
ca:12345:ctrlaltdel:/sbin/shutdown -r now
# Used by /etc/init.d/xdm to control DM startup.
# Read the comments in /etc/init.d/xdm for more
# info. Do NOT remove, as this will start nothing
# extra at boot if /etc/init.d/xdm is not added
# to the "default" runlevel.
x:a:once:/etc/X11/startDM.sh
|
_________________ John
My gentoo overlay
Instructons for overlay |
|
Back to top |
|
|
Gregoire Apprentice
Joined: 15 Apr 2006 Posts: 292
|
|
Back to top |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Sun Dec 27, 2009 2:27 pm Post subject: |
|
|
Live ebuild? I do not see one at that bug report.
I have installed 0.6.4 on my test box with mixed results. At first I was having a lot of problems with a bug that supposedly the patches were supposed to fix. I mean instead of running the guests init for some reason it was trying to run the hosts init causing a lot of problems. I think I have fixed this now by copying my config to /etc/lxc/config (or similar I am not logged into the host with lxc installed at the moment). After that I was able to successfully boot the lxc guest again. _________________ John
My gentoo overlay
Instructons for overlay |
|
Back to top |
|
|
Gregoire Apprentice
Joined: 15 Apr 2006 Posts: 292
|
|
Back to top |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
|
Back to top |
|
|
Gregoire Apprentice
Joined: 15 Apr 2006 Posts: 292
|
|
Back to top |
|
|
|