by Hong Ooi, senior data scientist, Microsoft Azure
I'm happy to announce version 2.0 of AzureVM, a package for deploying and managing virtual machines in Azure. This is a complete rewrite of the package, with the objective of making it a truly generic and flexible tool for working with VMs and VM scale sets (clusters).
AzureVM 1.0 was a rather limited package in many respects: it came with only a small selection of DSVM templates, and didn't give you many options for changing them. While you could deploy any arbitrary template, this functionality was actually provided by the underlying AzureRMR package, rather than something that AzureVM added.
Here are the main changes in AzureVM 2.0:
- Separate out deployment of VMs and VM clusters; the latter are implemented as scalesets, rather than simplistic arrays of individual VMs. The methods to work with scalesets are named
get/create/delete_vm_clusterare now defunct.
- New UI for VM/scaleset creation, with many more ways to fine-tune the deployment options, including specifying the base VM image; networking details like security rules, load balancers and autoscaling; datadisks to attach; use of low-priority VMs for scalesets; etc.
- Several predefined configurations supplied to allow quick deployment of commonly used images (Ubuntu, Windows Server, RHEL, Debian, Centos, DSVM).
- Allow referring to existing resources in a deployment (eg placing VMs into an existing vnet), by supplying
AzureRMR::az_resourceobjects as arguments.
- Clear distinction between a VM deployment template and a resource.
get_vm_scalesetwill always attempt to retrieve the template; to get the resource, use
- New VM resource methods:
- New cluster/scaleset resource methods:
get_public_ip_address(technically the address for the load balancer, if present),
- Use a pool of background processes to talk to scalesets in parallel when carrying out instance operations. The pool size can be controlled with the global options
Here are some example deployments. A basic Ubuntu VM:
A more complex deployment (Windows 10 Pro):
Creating a scaleset:
Sharing a subnet between a VM and a scaleset: