Solved

Prism API v3 Image Upload define Storage Container

  • 27 March 2020
  • 3 replies
  • 3968 views

Hello,

We build our vm images using packer and ansible and upload them to different endpoints.

First time I uploaded the images to Prism Central using API v3 and batch processing. Prism Central deploys the image to all the cluster that are registrated.

That works fine…

BUT… HOW can i define the destination storage container on each cluster?? I can define placement policies etc but I cannot assign a category or policy to Storage Container. Prism Central always deploys the images to “SelfServiceContainer”. But we dont want that.

icon

Best answer by Alona 30 March 2020, 07:31

View original

This topic has been closed for comments

3 replies

Userlevel 6
Badge +5

Hi Arogarth,

Admittedly API reference is not the most exhaustive imaginable so I did some digging in the Prism guide and found the below:

“To set up an image placement policy, do the following:

  1. Create categories for the following entities:
    1. Clusters (for example, create categories based on cluster location or region)
    2. Images (for example, create categories based on operating system and size)
    For information about creating a category, see Creating a Category.
  2. Apply the cluster categories to clusters and image categories to images. For information about associating categories with a Nutanix cluster, see Associating a Registered Nutanix Cluster with Categories. For information about associating categories with an image, see Associating an Image with Categories.
  3. Configure the image placement policy. See Configuring an Image Placement Policy.”

As you can see image placement policy is not configurable for a storage container entity.

I also found a possible solution in APIv2 which allows to specify the container. I understand that’s not exactly what you were looking for but you will find quite often at least at this stage that API functionality while overlapping is not exactly mirrored in each version. Some versions will have options that others miss.

Please let me know if that helps.

Hi, thanks to this information - but I still found them.

And I know that API v2 is able to place images to defined storage container - but API v2 is only available on cluster itself.

We have multiple AHV Cluster and I want to manage this images Centralized by Prism Central but this seems to wo work while missing this feature…

My current workaround is to upload the images to each cluster separately using API v2 - but nice is other...

Userlevel 3
Badge +4

@Arogarth you have it correct. As of the latest release Prism Central image upload allows cluster selection but does not allow container selection. If you need ISOs or disk images for cloning to be located in a specific container these will need to be uploaded via Prism Element directly. Images uploaded through Prism Central will be sent to the Self Service container.

I’m guessing you’re working on clone-base images for disks, since container location matters much less for ISO images to be attached on the virtual CD-ROM drive.

You might find one of the options in this article useful:
Transferring Virtual Disks to an AHV Cluster