Unable to resize the reference VM once the lab has been created

89 views Asked by At

In Azure Lab Services, the Classroom Labs, I cannot resize the reference VM once the lab has been created. I need this because I've fully configured a reference VM and now have released that I require to bump the spec of the VM from Standard to Performance.

The labs portal UI doesn't expose this functionality, nor does the Az.LabsServices posh module. I've tried saving my changes into an image in a Shared gallery and then reference that image on creating a new lab with the new specs. The problem with this new lab was that the machine didn't inherit all of the registry modifications and main user settings from the saved image. Unless there is a specific undocumented reason why these VM can't be resized, they should adhere to the REST endpoint capabilities described in azure documentation. The API calls that I've tried are various combinations of following:

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups
/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts
/{labAccountName}/labs/{labName}/environmentsettings
/{environmentSettingName}?api-version=2018-10-15

or newer endpoint

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups
/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts
/{labAccountName}/labs/{labName}/environmentsettings
/{environmentSettingName}?api-version=2019-01-01-preview

Where {environmentSettingName} was either set to default or properties.resourceSettings And the payload varying from {"properties":{"resourceSettings":{"size":"Performance"}}} or {"resourceSettings":{"size":"Performance"}} and other combinations

The only response I am getting from the API is "The operation is not supported"

1

There are 1 answers

0
Sarika Calla - msft On BEST ANSWER

Unfortunately resizing the template VM is not supported. Shared image gallery only supports generalized images which requires sysprep and hence the settings are lost. We will take this scenario as a feature suggestion.