Azure CLI Samples for Linux virtual machines

The following table includes links to bash scripts built using the Azure CLI.

Create virtual machines
Create a virtual machine Creates a Linux virtual machine with minimal configuration.
Create a fully configured virtual machine Creates a resource group, virtual machine, and all related resources.
Create highly available virtual machines Creates several virtual machines in a highly available and load balanced configuration.
Create a VM with Docker enabled Creates a virtual machine, configures this VM as a Docker host, and runs an NGINX container.
Create a VM and run configuration script Creates a virtual machine and uses the Azure Custom Script extension to install NGINX.
Create a VM with WordPress installed Creates a virtual machine and uses the Azure Custom Script extension to install WordPress.
Create a VM from a managed OS disk Creates a virtual machine by attaching an existing Managed Disk as OS disk.
Create a VM from a snapshot Creates a virtual machine from a snapshot by first creating a managed disk from snapshot and then attaching the new managed disk as OS disk.
Manage storage
Create managed disk from a VHD Creates a managed disk from a specialized VHD as a OS disk or from a data VHD as data disk.
Create a managed disk from a snapshot Creates a managed disk from a snapshot.
Copy managed disk to same or different subscription Copies managed disk to same or different subscription but in the same region as the parent managed disk.
Export a snapshot as VHD to a storage account Exports a managed snapshot as VHD to a storage account in different region.
Copy snapshot to same or different subscription Copies snapshot to same or different subscription but in the same region as the parent snapshot.
Network virtual machines
Secure network traffic between virtual machines Creates two virtual machines, all related resources, and an internal and external network security groups (NSG).
Secure virtual machines
Encrypt a VM and data disks Creates an Azure Key Vault, encryption key, and service principal, then encrypts a VM.
Monitor virtual machines
Monitor a VM with Operations Management Suite Creates a virtual machine, installs the Operations Management Suite agent, and enrolls the VM in an OMS Workspace.
Troubleshoot virtual machines
Troubleshoot a VMs operating system disk Mounts the operating system disk from one VM as a data disk on a second VM.