[Lxc-users] start lxc container in fedora
hello, i am new to lxc, i am trying to set up a container in fedora 19 i created a container by using template lxc-fedora -n cont1 it create a container in /usr/local/var/lib/lxc/cont1/ and rootfs /usr/local/lib/lxc/rootfs it created a config file /usr/local/var/lib/lxc/cont1/config lxc.rootfs = /usr/local/lib/lxc/rootfs lxc.utsname = cont1.localdomain lxc.tty = 4 lxc.pts = 1024 lxc.mount = /usr/local/var/lib/lxc/cont1/fstab lxc.cap.drop = sys_module mac_admin mac_override sys_time #lxc.autodev = 1 lxc.network.type = veth lxc.network.flags = up lxc.network.link = br0 lxc.network.name = eth0 lxc.network.mtu = 1500 lxc.network.ipv4 = 172.26.126.222/24 # When using LXC with apparmor, uncomment the next line to run unconfined: #lxc.aa_profile = unconfined #cgroups lxc.cgroup.devices.deny = a # /dev/null and zero lxc.cgroup.devices.allow = c 1:3 rwm lxc.cgroup.devices.allow = c 1:5 rwm # consoles lxc.cgroup.devices.allow = c 5:1 rwm lxc.cgroup.devices.allow = c 5:0 rwm lxc.cgroup.devices.allow = c 4:0 rwm lxc.cgroup.devices.allow = c 4:1 rwm # /dev/{,u}random lxc.cgroup.devices.allow = c 1:9 rwm lxc.cgroup.devices.allow = c 1:8 rwm lxc.cgroup.devices.allow = c 136:* rwm lxc.cgroup.devices.allow = c 5:2 rwm # rtc lxc.cgroup.devices.allow = c 254:0 rm it created a fstab file /usr/local/var/lib/lxc/cont1/fstab procproc proc defaults 0 0 sysfs sys sysfs defaults 0 0 dev dev devpts defaults 0 0 i set up a bridge network /etc/sysconfig/network-script/ifcfg-br0 DEVICE=br0 TYPR=Bridge USERCTL=no BOOTPROTO=dhcp ONBOOT=yes NM_CONTROLLED=no /etc/sysconfig/network-script/ifcfg-p2p1 DEVICE=p2p1 BOOTPROTO=dhcp BRIDGE=br0 NM_CONTROLLED=no ONBOOT=yes TYPE=Ethernet when i try to start the container i get error lxc-start 1375175223.541 ERRORlxc_conf - No such file or directory - failed to mount 'proc' on '/usr/local/lib/lxc/rootfs/proc' lxc-start 1375175223.551 ERRORlxc_conf - failed to setup the mounts for 'cont1' lxc-start 1375175223.551 ERRORlxc_start - failed to setup the container lxc-start 1375175223.551 ERRORlxc_sync - invalid sequence number 1. expected 2 lxc-start 1375175223.553 ERRORlxc_start - failed to spawn 'cont1' has anyone face this same error.. anyone has created container in fedora , please guide me. Thanks, Aarti Sawant -- Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg.clktrk___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
[Lxc-users] Issues in using lxc in Fedora 14
Hi, I am stuck with a issue in Fedora 14 using lxc. I have create a container using the template available at - https://launchpadlibrarian.net/83751818/lxc-fedora container is created successfuly and when I try lxc-start command I am getting stuck as shown below. There seems to be some issues with /etc/fstab. Any pointers or proper template to create a container would be of great help. # lxc-start -n test Welcome to Fedora Setting hostname localhost:[ OK ] Checking filesystems WARNING: couldn't open /etc/fstab: No such file or directory [ OK ] warning: can't open /etc/fstab: No such file or directory mount: can't find / in /etc/fstab or /etc/mtab Mounting local filesystems: warning: can't open /etc/fstab: No such file or directory [ OK ] No such file or directory Enabling /etc/fstab swaps: swapon: /etc/fstab: open failed: No such file or directory [FAILED] Entering non-interactive startup Bringing up loopback interface:[ OK ] Bringing up interface eth0: Determining IP information for eth0... done. [ OK ] Starting system logger:[ OK ] awk: cmd. line:1: fatal: cannot open file `/etc/fstab' for reading (No such file or directory) awk: cmd. line:1: fatal: cannot open file `/etc/fstab' for reading (No such file or directory) awk: cmd. line:1: fatal: cannot open file `/etc/fstab' for reading (No such file or directory) awk: cmd. line:1: fatal: cannot open file `/etc/fstab' for reading (No such file or directory) Mounting other filesystems: warning: can't open /etc/fstab: No such file or directory [ OK ] ^[[17~^C^Z^F[root@localhost ~]# lxc-version lxc version: 0.7.2 -- Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg.clktrk___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] Issues in using lxc in Fedora 14
On Tue, 2013-07-30 at 16:02 +0530, Ajith Adapa wrote: Hi, I am stuck with a issue in Fedora 14 using lxc. Stuck? Stuck with what? Stuck with an issue or stuck with Fedora 14. Using Fedora 14 as a host at this point in time is insane. It's way over a year and a half past EOL - end of life (F16 is already EOL) - and I've already shotgunned all my Fedora 14 hosts and guests. You won't even get high risk security fixes and updates for F14 at this point. You're just engaging in an unsupportable exercise in masochism. You won't have recent kernels and you won't have recent versions of lxc which will never become available for that version of Fedora from the repositories. I have create a container using the template available at - https://launchpadlibrarian.net/83751818/lxc-fedora container is created successfuly and when I try lxc-start command I am getting stuck as shown below. There seems to be some issues with /etc/fstab. Any pointers or proper template to create a container would be of great help. No clue. I've been working on the Fedora template and patching it. That template you pointed to is seriously very out of date. It looks like the old template I started patching some time ago. I wouldn't trust it. I've added a lot of patches (someone pointed to an up-to-date cut on github) for a lot of fedora versions. Still... I would not guarantee THAT will work on lxc 0.7.2. You got bigger problems on both fronts (Fedora version and LXC version) that you need to fix first. # lxc-start -n test Welcome to Fedora Setting hostname localhost:[ OK ] Checking filesystems WARNING: couldn't open /etc/fstab: No such file or directory [ OK ] warning: can't open /etc/fstab: No such file or directory mount: can't find / in /etc/fstab or /etc/mtab Mounting local filesystems: warning: can't open /etc/fstab: No such file or directory [ OK ] No such file or directory Enabling /etc/fstab swaps: swapon: /etc/fstab: open failed: No such file or directory [FAILED] Entering non-interactive startup Bringing up loopback interface:[ OK ] Bringing up interface eth0: Determining IP information for eth0... done. [ OK ] Starting system logger:[ OK ] awk: cmd. line:1: fatal: cannot open file `/etc/fstab' for reading (No such file or directory) awk: cmd. line:1: fatal: cannot open file `/etc/fstab' for reading (No such file or directory) awk: cmd. line:1: fatal: cannot open file `/etc/fstab' for reading (No such file or directory) awk: cmd. line:1: fatal: cannot open file `/etc/fstab' for reading (No such file or directory) Mounting other filesystems: warning: can't open /etc/fstab: No such file or directory [ OK ] ^[[17~^C^Z^F[root@localhost ~]# lxc-version lxc version: 0.7.2 That version has to end. I can't support it and won't even bother to debug it. We're at 0.9 and closing in on 1.0. I have patches for templates and even base lxc binaries at all those levels. We can't even support 0.7.5 while even 0.8 has problems that can only be resolved by upgrading. There are rpms available (which will install on Fedora 14 - I have built and installed similar in parallel). Upgrade to lxc 0.9.0 FIRST and then try it. Upgrade to the latest Fedora and then ask... I refuse to even test on a Fedora 14 host (which I don't even have any longer and haven't had for almost a year). It makes no bloody sense. If it doesn't work, well, there's your first problem. I wouldn't even look at it at this point. That's got to be fundamental, to your ground work, to get up-to-date first. Fedora is nice and rock solid stable and I absolutely love it but it is intended for those of us who (yes - are batshit crazy and) want and demand the latest toys and features and have no fear of venturing onto the bleeding edge of technology. You accept that burden and responsibility of upgrading and staying on that edge. You made that choice. If you have to stay at the Fedora 14 level, you should not be on Fedora at all, you should be on CentOS 6 or similar which has a longer support and release cycle. But, then you don't get the nice new shiny toys we're building here. Goes with the territory. You can't have it both ways. Sorry if I'm coming across harsh here but Fedora 14 has to be a non-starter at this point. It's not worth wasting time here. You are on an unsupported version of Fedora using an unsupported version of LXC. First step... Get up to date. I don't have your problem at all. But... I'm running F17 on my test host (which is near EOL already) and F18 on my production engines