On 12/01/2015 08:25 PM, Fajar A. Nugraha wrote:
Is there a reason why you can't install a centos7 container using the download template? It would've been MUCH easier, and some of the things you asked wouldn't even be an issue.
Well, there's a bit of history involved. Originally we were building systems using KVM based virtual machines. As part of this, we developed a custom installation process where the user burns our boot image onto a USB stick and boots a server with this image. There is a corresponding UI a user installs on his workstation that lets the user communicate with the server being installed and customize the installation. After the user hits "start install" in the UI the process is mostly hands-free where the server gets installed with our CentOS based hypervisor and then VMs being automatically created on top of that. The OS image that's used for the VMs gets created on the fly as part of this process. Everything is self-contained and we cannot make the assumption that the server has access to the external internet. Everything that's needed is on the boot stick.

This past year we moved to libvirt based containers instead of VMs, and we were able to use the same image we build for the VMs for the libvirt containers, with only a few minor changes, and our CentOS hypervisor now manages containers instead of VMs. The installation process is largely unchanged from the user's perspective and the fact that containers are being used is completely hidden.

Unfortunately, libvirt-lxc is being deprecated by Redhat, and that means it will eventually disappear in CentOS. That's why we're moving to LXC, but it is a transitional process. With the work I'm doing, when I create a boot image it can be flagged as either using libvirt containers or LXC containers. I need to keep the overall process as similar as possible and eventually, when the port to LXC is complete, we can make the official switch to LXC. We will need to handle upgrades in the field as well for our existing customers, converting their libvirt based systems to LXC based systems in-place. That means we'll need to create LXC flavored config files that match the XML definitions of the libvirt containers. We ultimately had to do the same thing when we transitioned from VMs to libvirt containers, so we know the process well. We just have to learn the particulars of LXC containers.

So, that long winded answer is why we can't just use the LXC template for CentOS directly. I was assuming (hoping) that the libvirt container image we build would be largely LXC friendly. Apparently it's not going to be quite as straightforward as I'd hoped. I'm going to have to dissect the steps used for creating a CentOS LXC template and make sure our container image provides what is needed/expected by LXC.

    My containers are coming up but things are running really slowly,
    although CPU usage is low. I'm not entirely sure what's going on
    and need to do some more digging.


Works for me. However I seem to recall an issue with centos' version of systemd sometime ago.

Yes, I hit that systemd issue early on and found the fix for it. The slowness I'm seeing now is something else.


    whereas under LXC /dev has the following:


    I know how to trim the /dev/ttyN entries to match libvirt, but I'm
    not sure what's needed for the others. For example, how do I get
    rid of /dev/snd?


Here's mine. Centos 7 container, ubuntu 14.04 host, lxc-1.1.4 and lxcfs-0.10 from ubuntu ppa:

c7 / # ls /dev
console core fd full hugepages initctl log lxc mqueue null ptmx pts random shm stderr stdin stdout tty tty1 tty2 tty3 tty4 urandom zero


That ultimately is very similar to my libvirt dev list. I clearly need to dig into the CentOS template to see what's being done differently compared to my libvirt image.

Peter

_______________________________________________
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to