LXC create centOS6 containers on RHEL 7

Hi Guys,

I am trying to create centos6 containers on RHEL7, this has been our prod setup for sometime, but not its failing as centos6 image is not available.

Command:
lxc-create -t download -n centos6 – --dist centos --release 6 --arch amd64

We cannot upgrade to centos7 now as we need more time, is there anyway we can create the containers with centos6 image now? Any help is appreciated.

Can we create a container using a custom image template instead of downloading available images online?

@monstermunchkin are historical images available anywhere?

Hi tomp,

We are not able to find centos6 images from the lxc list of container images - https://us.images.linuxcontainers.org/images/centos/.

But there are images provided by the centos on the vault -

We are not sure how to go forward from here.

Hi Carlo,

We remove all images which reach their EOL, and that happend about a month ago for CentOS 6.

However, you could try to build a CentOS 6 image using distrobuilder and this image spec.

1 Like

HI,

We still have the downloaded template on/var/cache/lxc/download/centos/6/amd64/default/. Can we use this and extend the expiry so when lxc-create runs, it will not try to download again (the image template which was already removed)?

It will take sometime for us to create our own template via the distrobuilder and the image spec.

Also what will be the command to create the container if we decided to use the new image created by the distro builder and image?

Thanks

@stgraber may know the answer to this.

That command would be distrobuilder build-lxc <image-spec-file> <target-dir>. Also just check out distrobuilder build-lxc -h.

Extending the cache expiry is certainly worth a shot.
If that doesn’t work, you can probably get -t local to consume what you have on disk by making a new meta.tar.xz from the bits you have on disk and use the existing rootfs.tar.xz

Thanks a lot! Extending the cache expiry worked, but we will still try to create a new meta.tar.xz from rootfs so we don’t lose the data when the server restarts.