Comment 11 for bug 1731709

Revision history for this message
john (g-john-p) wrote : Re: centos custom images won't boot MAAS 2.2.2

the image was created using instruction from Michael Latrou:
-- snip from his email to us -- 2016 ---

It was brought to my attention that you have opened a bug and you are immediately affected by it:
https://bugs.launchpad.net/juju/+bug/1646847

This issue is actually related to MAAS, and the handling of multiple interfaces for non-Ubuntu images (Ubuntu images work as expected).

We have a workaround for you, until the issue is resolved upstream.

You will need to build a custom image for CentOS and import it to MAAS. Here is the process:

On the MAAS server, we will download the upstream CentOS image and we will modify the curtin config, which is responsible for handling the network interfaces configuration. We will then repack the image and manually import it to MAAS.

    wget https://people.canonical.com/~iatrou/curtin-hooks-20170110.py.gz -O - | gunzip > curtin-hooks.py
    wget http://images.maas.io/ephemeral-v2/daily/centos70/amd64/20160801_01/root-tgz -O centos7-root.tgz
    mkdir centos7-root && cd centos7-root
    sudo tar -zxvf ../centos7-root.tgz
    sudo cp ../curtin-hooks.py curtin/
    sudo chown root: curtin/curtin-hooks.py
    sudo chmod 755 curtin/curtin-hooks.py
    sudo tar -zcvf ../centos7-root-netfix.tgz .
    sudo maas admin boot-resources create name=custom/centos7-netfix title="CentOS 7 - netfix" architecture=amd64/generic content@=../centos7-root-netfix.tgz

At this point you should be able to provision a machine from MAAS, using the imported image, and by having a second interface configured on it.

--- end snip --