<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 12/01/2015 08:25 PM, Fajar A. Nugraha wrote:<br>
<blockquote
cite="mid:CAG1y0sd6wLDiUQR5cUq45RQPZUdrpW_dVq=OiPHiwzMU4ZnZxg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">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.</div>
</div>
</div>
</blockquote>
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.<br>
<br>
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.<br>
<br>
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.<br>
<br>
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.<br>
<blockquote
cite="mid:CAG1y0sd6wLDiUQR5cUq45RQPZUdrpW_dVq=OiPHiwzMU4ZnZxg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">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.<br>
<br>
</blockquote>
<div><br>
</div>
<div>Works for me. However I seem to recall an issue with
centos' version of systemd sometime ago.</div>
<div><br>
</div>
</div>
</div>
</div>
</blockquote>
Yes, I hit that systemd issue early on and found the fix for it. The
slowness I'm seeing now is something else.<br>
<blockquote
cite="mid:CAG1y0sd6wLDiUQR5cUq45RQPZUdrpW_dVq=OiPHiwzMU4ZnZxg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
whereas under LXC /dev has the following:<br>
</blockquote>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
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?
<div class="">
<div class="h5"><br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Here's mine. Centos 7 container, ubuntu 14.04 host,
lxc-1.1.4 and lxcfs-0.10 from ubuntu ppa:</div>
<div><br>
</div>
<div>
<div>c7 / # ls /dev</div>
<div>console core fd full hugepages initctl log lxc
mqueue null ptmx pts random shm stderr stdin
stdout tty tty1 tty2 tty3 tty4 urandom zero</div>
</div>
<div><br>
</div>
<br>
</div>
</div>
</div>
</blockquote>
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.<br>
<br>
Peter<br>
<br>
</body>
</html>