Re: [Lxc-users] Fedora 15 on Fedora 15 LXC with Libvirt
On Tue, Aug 2, 2011 at 8:44 PM, Michael H. Warfield m...@wittsend.com wrote: Ah... Serge? Reference back to the thread on [Lxc-users] what's the difference in lxc-attach please? We were discussing systemd back in that thread too. On Tue, 2011-08-02 at 19:22 +0300, Iliyan ILF Stoyanov wrote: Hi, I don't think this template will work as it references two files that do not exist in F15 i.e. ${rootfs_path}/etc/rc.sysinit and ${rootfs_path}/etc/rc.d/rc.sysinit this is because of the fact that system.d doesn't use such scripts for init. You mean systemd and not system.d but I got your point. I have an F15 container running on an F15 host but the only way I was able to do this was by installing upstart and relinking init to upstart. Systemd seems to get a great deal of heartburn over trying to mount /sys/fs/cgroup in the container and things catch fire and burn all over the place. I do have it working with Upstart. Until a bunch of us can sort out the details of what systemd is doing and expect and should behave under what circumstances, F15 systemd in a container is going to be a crap shoot. Regards, Mike I can always just use Scientific Linux for my setup, however we made the decision a long time ago that all our dev servers will stick to Fedora, so that we are better prepared for the quirks that might come up in RHEL/CentOS/SL when some technology gets included in the TUV releases. It is not a must to have LXC running on Fedora 15 with Fedora 15 guests, but it would be nice to crack the hard nut that system.d is proving to be. By the way, I see that your email is at canonical and it seems a most of the people here are running LXC on Ubuntu, is LXC actually sponsored by canonical or is primarily developed around Debian/Ubuntu, because if that is the case, it might explain certain incompatibilities with the way Red Hat/Fedora are set up. BR, ilf On Tue, 2011-08-02 at 09:02 -0500, Serge E. Hallyn wrote: Quoting Iliyan ILF Stoyanov (i...@ilf.me): On the other side, would someone be so kind to point me in the right direction (either documentation, source or anything else available) that I can follow so that I set up lxc container just with the LXC tools. I Ramez Hanna has posted a new fedora template. I think this was the latest: http://www.mail-archive.com/lxc-users@lists.sourceforge.net/msg01707.html It looks like it was for F13 and F14 containers, but it should be a starting point. See the usage() section. I've not used it myself, but the author should be on this list. -serge -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos much more. Register early save! http://p.sf.net/sfu/rim-blackberry-1 ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users -- Michael H. Warfield (AI4NB) | (770) 985-6132 | m...@wittsend.com /\/\|=mhw=|\/\/ | (678) 463-0932 | http://www.wittsend.com/mhw/ NIC whois: MHW9 | An optimist believes we live in the best of all PGP Key: 0x674627FF | possible worlds. A pessimist is sure of it! -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos much more. Register early save! http://p.sf.net/sfu/rim-blackberry-1 ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users the fedora template works for 14 but not 15 the reason is systemd but not really related to rc.sysinit (yes this needs cleanup) systemd in the container seems to interfere with systemd on the host screwing up the host i haven't been looking at it lately, but i think it might be related to mount points or something as systemd uses /var/run/ which is a tmpfs, som maybe something goes wrong there -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos much more. Register early save! http://p.sf.net/sfu/rim-blackberry-1 ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] Fedora 15 on Fedora 15 LXC with Libvirt
Quoting Iliyan ILF Stoyanov (i...@ilf.me): On the other side, would someone be so kind to point me in the right direction (either documentation, source or anything else available) that I can follow so that I set up lxc container just with the LXC tools. I Ramez Hanna has posted a new fedora template. I think this was the latest: http://www.mail-archive.com/lxc-users@lists.sourceforge.net/msg01707.html It looks like it was for F13 and F14 containers, but it should be a starting point. See the usage() section. I've not used it myself, but the author should be on this list. -serge -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos much more. Register early save! http://p.sf.net/sfu/rim-blackberry-1 ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] Fedora 15 on Fedora 15 LXC with Libvirt
Hi, I don't think this template will work as it references two files that do not exist in F15 i.e. ${rootfs_path}/etc/rc.sysinit and ${rootfs_path}/etc/rc.d/rc.sysinit this is because of the fact that system.d doesn't use such scripts for init. I can always just use Scientific Linux for my setup, however we made the decision a long time ago that all our dev servers will stick to Fedora, so that we are better prepared for the quirks that might come up in RHEL/CentOS/SL when some technology gets included in the TUV releases. It is not a must to have LXC running on Fedora 15 with Fedora 15 guests, but it would be nice to crack the hard nut that system.d is proving to be. By the way, I see that your email is at canonical and it seems a most of the people here are running LXC on Ubuntu, is LXC actually sponsored by canonical or is primarily developed around Debian/Ubuntu, because if that is the case, it might explain certain incompatibilities with the way Red Hat/Fedora are set up. BR, ilf On Tue, 2011-08-02 at 09:02 -0500, Serge E. Hallyn wrote: Quoting Iliyan ILF Stoyanov (i...@ilf.me): On the other side, would someone be so kind to point me in the right direction (either documentation, source or anything else available) that I can follow so that I set up lxc container just with the LXC tools. I Ramez Hanna has posted a new fedora template. I think this was the latest: http://www.mail-archive.com/lxc-users@lists.sourceforge.net/msg01707.html It looks like it was for F13 and F14 containers, but it should be a starting point. See the usage() section. I've not used it myself, but the author should be on this list. -serge -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos much more. Register early save! http://p.sf.net/sfu/rim-blackberry-1 ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] Fedora 15 on Fedora 15 LXC with Libvirt
Ah... Serge? Reference back to the thread on [Lxc-users] what's the difference in lxc-attach please? We were discussing systemd back in that thread too. On Tue, 2011-08-02 at 19:22 +0300, Iliyan ILF Stoyanov wrote: Hi, I don't think this template will work as it references two files that do not exist in F15 i.e. ${rootfs_path}/etc/rc.sysinit and ${rootfs_path}/etc/rc.d/rc.sysinit this is because of the fact that system.d doesn't use such scripts for init. You mean systemd and not system.d but I got your point. I have an F15 container running on an F15 host but the only way I was able to do this was by installing upstart and relinking init to upstart. Systemd seems to get a great deal of heartburn over trying to mount /sys/fs/cgroup in the container and things catch fire and burn all over the place. I do have it working with Upstart. Until a bunch of us can sort out the details of what systemd is doing and expect and should behave under what circumstances, F15 systemd in a container is going to be a crap shoot. Regards, Mike I can always just use Scientific Linux for my setup, however we made the decision a long time ago that all our dev servers will stick to Fedora, so that we are better prepared for the quirks that might come up in RHEL/CentOS/SL when some technology gets included in the TUV releases. It is not a must to have LXC running on Fedora 15 with Fedora 15 guests, but it would be nice to crack the hard nut that system.d is proving to be. By the way, I see that your email is at canonical and it seems a most of the people here are running LXC on Ubuntu, is LXC actually sponsored by canonical or is primarily developed around Debian/Ubuntu, because if that is the case, it might explain certain incompatibilities with the way Red Hat/Fedora are set up. BR, ilf On Tue, 2011-08-02 at 09:02 -0500, Serge E. Hallyn wrote: Quoting Iliyan ILF Stoyanov (i...@ilf.me): On the other side, would someone be so kind to point me in the right direction (either documentation, source or anything else available) that I can follow so that I set up lxc container just with the LXC tools. I Ramez Hanna has posted a new fedora template. I think this was the latest: http://www.mail-archive.com/lxc-users@lists.sourceforge.net/msg01707.html It looks like it was for F13 and F14 containers, but it should be a starting point. See the usage() section. I've not used it myself, but the author should be on this list. -serge -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos much more. Register early save! http://p.sf.net/sfu/rim-blackberry-1 ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users -- Michael H. Warfield (AI4NB) | (770) 985-6132 | m...@wittsend.com /\/\|=mhw=|\/\/ | (678) 463-0932 | http://www.wittsend.com/mhw/ NIC whois: MHW9 | An optimist believes we live in the best of all PGP Key: 0x674627FF| possible worlds. A pessimist is sure of it! signature.asc Description: This is a digitally signed message part -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos much more. Register early save! http://p.sf.net/sfu/rim-blackberry-1___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] Fedora 15 on Fedora 15 LXC with Libvirt
Hi, This mailing list is intended for users of the lxc.sf.net toolsuite. While the libvirt lxc implementation is in many ways similar, there definately are differences. I point this out because your first step has to be to get more debugging information, and I don't know that anyone here can help you with that. Can you get systemd to copy all of its console output to a file which you can read later? We certainly are interested in helping, since it certainly seems you are suffering from the same problem we are. I'm just not sure how to have you get started. Perhaps you can hack src/lxc/lxc_container.clxcContainerSetStdio() to open a file '/debugoutput', and use that fd rather than ttyfd for the dup2()s? That might give you some better debug info. You also might to ask on the libvir mailing list, or oftc#virt irc channel. -serge -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos much more. Register early save! http://p.sf.net/sfu/rim-blackberry-1 ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] Fedora 15 on Fedora 15 LXC with Libvirt
Hi again, Thanks, but no thanks on the libvirt mailing list. I found out that just reading their -devel ml was enough for me and combined with the trial and error method I was able to reach what I wanted a while ago, concerning SANs over FC, IB and building private cloud infras with libvirt and qemu, however I decline going that road again :). On the other side, would someone be so kind to point me in the right direction (either documentation, source or anything else available) that I can follow so that I set up lxc container just with the LXC tools. I probably decided to go the wrong way about this and use a framework I already know and trying to skip learning the nuts and bolts of LXC before going to libvirt. I would like to know first of all, did someone get F15 or any other distro (I'm also using Arch a lot) running systemd on both host and container to run and if so, what were the steps followed. I searched google with bunch of different criteria lxc fedora 15, lxc fedora systemd, etc. but from what I've been able to find, it seems no one is running lxc with systemd. I see people having success with upstart, but Debian and Ubuntu are just not my cup of tea, so I would like to stick to RedHat based distro for a bunch of company reasons. From what I gathered from the howto it seems I should run a hand made /sbin/init in the container, but with systemd I'm at a total loss, what exactly should I do. In F15 /sbin/init is actually a symlink to /bin/systemd. I would probably have better success with Arch in this regard, as I still have a proper rc.sysinit and /sbin/init that is not a symlink to /bin/systemd. Practically I'm lost here and without a hint of proper direction. I would try reading the howto again and will setup an lxc config file, but I still have the feeling it will be a fiasco, so any help would be greatly appreciated. Thank you for the time you are spending reading my messages that I realize are half rants - half help requests BR, ilf On Mon, 2011-08-01 at 16:18 -0500, Serge Hallyn wrote: Hi, This mailing list is intended for users of the lxc.sf.net toolsuite. While the libvirt lxc implementation is in many ways similar, there definately are differences. I point this out because your first step has to be to get more debugging information, and I don't know that anyone here can help you with that. Can you get systemd to copy all of its console output to a file which you can read later? We certainly are interested in helping, since it certainly seems you are suffering from the same problem we are. I'm just not sure how to have you get started. Perhaps you can hack src/lxc/lxc_container.clxcContainerSetStdio() to open a file '/debugoutput', and use that fd rather than ttyfd for the dup2()s? That might give you some better debug info. You also might to ask on the libvir mailing list, or oftc#virt irc channel. -serge -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos much more. Register early save! http://p.sf.net/sfu/rim-blackberry-1 ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
[Lxc-users] Fedora 15 on Fedora 15 LXC with Libvirt
Hi guys, I'm trying to run two containers of Fedora 15 over Fedora 15 host through libvirt on an amd64 host. However so far I've not been able to setup the environment and going through the list it seems there are some issues with systemd, however I'm not really sure how to make it work. I'm new to the LXC, but not new to libvirt, as I use it for few large deployments of QEMU for several clients and our internal infrastructure. However I decided to go the LXC way for this host, as this server is very old and doesn't support AMD-V, and as it is an internal dev server it would be nice if I can consolidate couple of even older PIII machines on top of it. I've setup Fedora 15 with btrfs raid1 on the host, and used febootstrap (v2) to create Fedora 15 image in /var/lib/libvirt/lxc/web.fedora. I followed the howto (btw, the documentation of LXC lacks in quantity and arguably in quality) and set up fstab file according to it. Then in the xml definition for virsh I used this setup: domain type='lxc' nameweb.fedora/name uuiddeffe022-cf0d-e56c-badf-af46802a4538/uuid memory1048576/memory currentMemory1048576/currentMemory vcpu1/vcpu os type arch='x86_64'exe/type init/sbin/init/init /os clock offset='utc'/ on_poweroffdestroy/on_poweroff on_rebootrestart/on_reboot on_crashdestroy/on_crash devices emulator/usr/libexec/libvirt_lxc/emulator interface type='bridge' mac address='52:54:00:e3:8f:27'/ source bridge='br0'/ target dev='veth0'/ /interface console type='pty' target type='serial' port='0'/ /console /devices /domain which according to what I understand of lxc docs and libvirt docs (btw, that documentation is not great either) seems to be alright. However when starting the container with virsh -c lxc:/// start web.fedora, the container starts through libvirt_lxc, however when I try to see the console through virsh -c lxc:/// console web.fedora, I don't get anything. The network of the container doesn't go up either, so I suppose it just doesn't go through init. From what I gathered looking through the mailing list, there seems to be a problem with systemd and the fact that it mounts cgroups in different directories, however I saw that in the latest git, this is supposed to be fixed, so I pulled the latest code and compiled it (my paths are correct, and essentially the latest binaries overridden the old ones). However I still can't seem to start the container. I'm thinking the problem lays in the systemd of the container, as this is essentially the /sbin/init of F15, however I'm not sure what should I do. When I issue a start command through virsh, this is what I get in the /var/log/libvirt/lxc/web.fedora.log: PATH=/sbin:/usr/sbin:/bin:/usr/bin LIBVIRT_DEBUG=3 LIBVIRT_LOG_OUTPUTS=3:stderr /usr/libexec/libvirt_lxc --name web.fedora --console 25 --handshake 28 --background --veth veth1 PATH=/bin:/sbin TERM=linux LIBVIRT_LXC_UUID=deffe022-cf0d-e56c-badf-af46802a4538 LIBVIRT_LXC_NAME=web.fedora /sbin/init 17:43:02.278: 9459: info : libvirt version: 0.9.3, package: 2.fc15 (Unknown, 2011-07-26-18:35:16, storm.evo.net) and once I issue: virsh -c lxc:/// console web.fedora I get the log file flooded with: 17:43:02.278: 9459: error : lxcFdForward:287 : read of fd 9 failed: Input/output error 17:43:02.278: 9459: error : lxcFdForward:287 : read of fd 9 failed: Input/output error 17:43:02.278: 9459: error : lxcFdForward:287 : read of fd 9 failed: Input/output error 17:43:02.278: 9459: error : lxcFdForward:287 : read of fd 9 failed: Input/output error So could you please point me in the right direction, so that I can try and make this thing to work. Sincerely, Iliyan ilf Stoyanov -- Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users