Deallocate an Azure VM Using the Azure CLI on RHEL - RHD Blog

If you're running Red Hat Enterprise Linux server on Microsoft Azure, you may want to shut down and deallocate the VM using commands inside of the VM itself for automation or just for convenience. This article shows how a VM can shut itself down and deallocate its resources using the Azure CLI 2.0.