Confused on getting valid image identifiers for CLI machine deployment

Hey folks,

For our PoC we’re now trying to work through deploying machines using the CLI, and are running into some roadblocks. Any advice would be welcome.

I’m looking at maas USER machine deploy, and I’d like to deploy the custom Rocky image we have. In the help for deploy, I have:

 :param osystem: Optional.  If present, this parameter
specifies the OS the machine will use.
:type osystem: String

 :param distro_series: Optional.  If present, this
parameter specifies the OS release the machine will use.
:type distro_series: String

Now, looking at maas USER boot-resources read, for my Rocky image I get:

    {
        "id": 14,
        "type": "Uploaded",
        "name": "rocky8",
        "architecture": "amd64/generic",
        "resource_uri": "/MAAS/api/2.0/boot-resources/14/",
        "subarches": "generic",
        "title": "Rocky 8 Custom"
    }

And for maas USER boot-resource read 14 I get:

{
    "id": 14,
    "type": "Uploaded",
    "name": "rocky8",
    "architecture": "amd64/generic",
    "resource_uri": "/MAAS/api/2.0/boot-resources/14/",
    "subarches": "generic",
    "title": "Rocky 8 Custom",
    "sets": {
        "20221208": {
            "version": "20221208",
            "label": "uploaded",
            "size": 779770926,
            "complete": true,
            "files": {
                "root-tgz": {
                    "filename": "root-tgz",
                    "filetype": "root-tgz",
                    "sha256": "aa07f3cde2631bb9c3d46efbc590417958f5e0daf198f80c081751c9bf872c4e",
                    "size": 779770926,
                    "complete": true
                }
            }
        }
    }
}

From these things, I can’t find the osystem or distro_series values - am I missing something? Is there a reason you can’t just feed a boot-resource ID?

Thanks!

Doing some digging in the forums here, is it that the “name” output is your osystem and distro_series info?

We did figure out that, for our Rocky image, both parameters needed to be rocky8. Since the output from boot-resources read gave us just name: "rocky8", does that mean that if you get no distro info you need to put the name for both values?

Hi @commandertso

When you upload your custom image you should have a prefix custom/ e.g.

maas admin boot-resources create \
    name='custom/rocky8' \
    title='Rocky 8' \
    ...

In that case for machine deploy parameter osystem will be custom and distro_series will be rocky8

@troyanov Ah, ok - I didn’t upload that image, so I haven’t played with that process yet. I’ll go look at that more. Thanks!

@commandertso, have you resolved this, based on @troyanov’s suggestion?