1

I have created an environment on scale set first instance, now I want to capture an image of that scale set instance (Protected from scale-in) so that I can create another scale set with that image with environment. Any way to capture or backup that instance of scale set in azure?

Test User
  • 11
  • 1

1 Answers1

3

You can use the Azure CLI command az image create to capture the image from the scale set like this:

az image create -g group_name -n image_name --source instance_os_disk_resourceId --os-type xxxx

And you can use the command az vmss list-instances to get the OS disk resource ID of the instance. For example:

az vmss list-instances -g charlesVMSS -n azurevmss -o table --query "[].[instanceId, storageProfile.osDisk.managedDisk.id]"
Charles Xu
  • 29,862
  • 2
  • 22
  • 39