Import images

An Azure server is provisioned from an image that has been imported into its region

Import images from the handler’s Images tab, which lists each imported region and the images already available in it. Import the regions you need on the Regions tab first: an image can only be imported into a region Cloud Management Platform (CMP) knows about.

Import public images

Azure publishes a large number of images, so CMP imports them in two steps. The Fetch and Cache Available Azure Images rule caches Azure’s offering, and Import Images on the Images tab picks from that cache. Until the rule has run at least once, the import dialog has nothing to show.

Run the rule from the Rules page when you need fresh images:

  1. Go to Admin > Rules.
  2. Select Fetch and Cache Available Azure Images.
  3. Select Execute, then select Run. The rule runs as a job you can follow to completion.

Once the cache holds images, add them to a region:

  1. Go to Admin > Resource Handlers and select your Azure handler.
  2. Select the Images tab.
  3. Select Import Images beside the target region.
  4. Choose images from the list, then select Next.
  5. Map each image to an OS build, then select Import selected Images.

The imported images are added to each environment associated with that region, ready to provision.

Limit what the rule fetches

The rule fetches a CloudBolt-provided list of common images rather than everything Azure offers. The rule’s Use whitelist action input controls this and is True by default. The Execute dialog exposes the same input, so you can change it for a single run without editing the rule.

To replace the built-in list with your own, define AZURE_IMAGE_WHITELIST in customer_settings.py as a list of tuples giving the publisher, offer, SKU, and version of each image. Use latest as the version to always take the newest release.

AZURE_IMAGE_WHITELIST = [
    # (publisher, offer, SKU, version)
    ('redhat', 'RHEL', '8-LVM', 'latest'),
    ('canonical', '0001-com-ubuntu-server-focal', '20_04-lts', 'latest'),
    ('MicrosoftWindowsServer', 'WindowsServer', '2022-Datacenter', 'latest'),
]

Import a single public image

When you know the image you want, add it directly instead of caching the catalog.

  1. On the Images tab, select Add Image Manually.
  2. In the Add Public Image dialog, enter the image’s publisher, offer, SKU, and version, and select the regions to import it into.
  3. Submit the dialog.

The image is added to each environment associated with each selected region.

Import private images

CMP imports every private image in the subscription in one action.

  1. On the Images tab, select Import Private Images.
  2. Confirm the dialog with Import.

The import runs as a job. Each image found is imported into its own region and added to the environments in that region. Images in regions you have not imported are skipped; import those regions first.

Azure shared image galleries allow images to be shared across subscriptions. CMP imports images from every gallery the handler’s account can access into each region where an image has been replicated. As with private images, regions not imported are skipped.

  1. On the Images tab, select Import Shared Gallery Images.
  2. Confirm the dialog with Import.

The import runs as a job, and shared images appear under their region with a Publisher of shared. If a gallery you expect is missing, check that the application registered in Azure has permission to read resources in the subscription that owns it.

  • Azure: create the resource handler and import its regions.
  • Provisioning: the parameters that shape an Azure order.
  • OS builds: how images map to the operating systems users order.
  • Rules: how rules are enabled, scheduled, and run.