How to deploy a custom image

I’m following the guide

it repeatedly contains the following instruction:

  1. Upload the image to MAAS (via maas admin boot-resources create)
  2. Verify your custom image (via maas admin machines read)

It seems to me that import and deployment steps for a custom image are missed in this instruction. Where should I look for them? For me the image keeps being in “Uploaded” state (others are in “Synced” state). Is it ok?

    "id": 12,
    "type": "Uploaded",
    "name": "rocky9",
    "architecture": "amd64/generic",
    "resource_uri": "/MAAS/api/2.0/boot-resources/12/",
    "subarches": "generic",
    "title": "Rocky 9 Linux"

Hi, Uploaded is the image type, not its state. Synced are images MAAS synchronizes with the Image Stream.

Everything looks OK

1 Like

Alexander, I’ve googled “synced” “uploaded” to get some explanation of statuses and got only some group messages. Where should I look?

I also was guessing filetype field for values (ddxz, ddgz).
I’ve noticed you’ve updated packer-maas for rocky9. What is correct filetype for rocky9.tar.gz ? I guessed tgz - is it correct?

yes, tgz is the correct filetype (check the template README for more details)

I appears that we are missing documentation about image types. I’m going to file a bug about this.


@dataved I’ve uploaded custom images without a filetype field and haven’t seen a difference. Not sure if this should be the case @alexsander-souza.

Also, only if you’ve used the snap install option, you will want to place your images in /var/snap/maas/common/ before uploading.

1 Like

I passed through maas $PROFILE boot-resources create command successfully. There was a problem that maas reported in my scripts is not a valid architecture, and the solution was to add another retry (maybe it means “to wait a bit”)

Now I get to a deployment stage and received a message Marking node failed - Missing boot image custom/amd64/ga-20.04/rocky9. What could be a reason for this?

What were you trying to do when you got this not a valid architecture error?

can you share the exact boot-resources create command you are using and the complete deployment log?

@zmance, filetype defaults to tgz if no value is given.

The command was exactly like in your readme.
maas "{{ maas_user }}" boot-resources create name="custom/rocky9" title='Rocky 9 Custom' architecture=amd64/generic base_image="rhel/9" filetype="tgz" content@="x1/rocky9.tar.gz"

AFAIU the problem happened when MAAS was not fully initialized. Tt gave the error about architecture.

When I waited a bit, the same command worked properly.

I still get some strange Marking node failed - Missing boot image custom/amd64/ga-20.04/rocky9 problem during deploy stage

This is how the problem looks like on machine which is being deployed; I wonder if ubuntu in URL is correct if I install rocky.

Still boot-resources create occasionally fail. I wonder boot-resources import should be completed before boot-resources create can be successful (eg boot-resources is-importing becomes false)

Upd. I’ve tried this several times; seem to be the solution for intermittent boot-resources create failures; could be that importing populates a list of supported architectures. I will start another thread about a separate topic

you are correct, the first time MAAS import images it also initializes the supported architecture list.

Are you initializing a new MAAS before each test?

1 Like

yes, my ansible script install MAAS on the jumphost and it should install Rocky on the rest of the nodes

that was a problem somehow hard to debug - all worked when I later logged in to jumphost and executed the same command

In case it helps, we have some Ansible resources:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.