A third option to operate Azure Stack is the Command Line Interface (CLI), which is available for:
- Windows
- Linux
- Mac
You can install them using the URL at https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest.
Now, let's have a look at how to create a virtual machine using the CLI. At first, we would need to register the corresponding environment:
- As administrative environment, you would need to run the following script:
az cloud register \
-n AzureStackAdmin \
--endpoint-resource-manager
"https://adminmanagement.local.azurestack.external" \
--suffix-storage-endpoint "local.azurestack.external" \
--suffix-keyvault-dns ".adminvault.local.azurestack.external" \
--endpoint-vm-image-alias-doc <URI of the document which
contains virtual machine image aliases>
az cloud set \
-n AzureStackAdmin
- As user environment, the following script could help:
az cloud register \
-n AzureStackUser...