Skip to content

Instantly share code, notes, and snippets.

@savishy
Last active May 30, 2018 04:29
Show Gist options
  • Select an option

  • Save savishy/1f21629bb11cbe70730610288700fe3f to your computer and use it in GitHub Desktop.

Select an option

Save savishy/1f21629bb11cbe70730610288700fe3f to your computer and use it in GitHub Desktop.
Azure Tips and Tricks

Delete a VM Extension (is faster from command-line)

Useful if you are troubleshooting or debugging VM Extensions.

az vm extension delete --vm-name VMName -g RGName --name ExtensionName

Resize a VM while its running

Ansible 2.5 azure_rm_virtualmachine module will not resize a running VM if you simply change its size. :(

Solution: Azure CLI

List the resize options:

az vm list-vm-resize-options --resource-group myResourceGroup --name myVM --output table

Resize:

az vm resize --resource-group myResourceGroup --name myVM --size Standard_B2s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment