We automate the creation of new VMs in our AHV cluster using RestAPI calls and JSON provided VM specification (generated by script etc). Nowhere in our provided JSON do we specify the storage container that vdisks should be created in, but all new VMs have their storage allocated inside ‘SelfServiceContainer’. Wondering if SelfServiceContainer is somehow configured as a default inside AOS - as I would like to change this to a different container if such a config exists? Now I know that I can specify the storage container inside the JSON I provide for each VM creation (and this might be the only way I achieve this), but I am trying to understand if there is someway of configuring a default storage container inside AOS?
Thanks in advance, Paul
We have the same question and appreciate your support.
Is there a way to change the default used Storage Container?
The storage container of any disk assigned to a VM that is sourced from the image service will always deploy to the same storage container that the image is located - I don’t believe there is a way around this (although have not checked what’s new in this regard in AOS >=v6). For any new disks that are assigned from RestAPI updates to the VM, it should be possible to specify the storage container you want by specifying the container’s UUID in the submitted request body (check restapi explorer for info on the JSON tags for this).
I believe its also now possible to move VM disks between storage containers - not sure if its done using RestAPI or acli commands.