Troubleshooting image OS

It seems that some Image IDs do no show up anymore when called from OCI CLI

The documentationarrow-up-right still mentions about their existence, though.

If you do get an empty output for image OS when running the script test_env_variables.sh. ...

variable "instance_image" {
   default = ""
}

... then, that specific Image OS that is called by the script is not available anymore (at least when called from OCI CLI)

Initially, when generating the Image OS ID, I was looking for a specific Ubuntu OS: Canonical-Ubuntu-20.04-2021.01.25-0arrow-up-right

Practice time

From the Cloud-Shell:

a) generate Tenancy as environment variable:

 TENANCY=$(oci iam compartment list --access-level ACCESSIBLE |\
 grep -i tenancy | \
 awk 'NR==1{print $2}' | \
 sed -e 's/,//g' -e 's/"//g')

check if any output:

b) generate the image OCID as environment variable (this time, for image OS Canonical-Ubuntu-20.04-2021.01.25-0)

check if any output (output from Dubai region):

No output...

Good!

Now let's list what are all the available images for "Canonical-Ubuntu-20.04-2021" of that specific tenancy:

So, we have three images & their IDs:

No sign of Canonical-Ubuntu-20.04-2021.01.25-0, which was initially used.

Test for new Image OS

Tested in Frankfurt region

a) Tenancy

b) This time, using the Canonical-Ubuntu-20.04-2021.03.25.0 to extract the Image ID

c) Check if environment variable provides output:

The repository scripts are already adapted to Canonical-Ubuntu-20.04-2021.03.25-0.

However, if you do meet the empty field in the future for instance_image, now you know how to troubleshoot it, and how to replace your Canonical Ubuntu Image OS with an available one.

Fini!

Last updated