Azure Stop-AzureVM – Am I being charged?


This information is scattered all over the internet, putting it here in one place to remind myself.

The Azure Powershell has several commands for managing your Virtual Machines and you can script these which is useful in a Dev/Test environment to shut down VM during non-working hours and stretch your MSDN benefit.

To start a VM

Start-AzureVM –ServiceName “your cloud service name” –Name “your VM name”

To stop a VM

Stop-AzureVM –ServiceName “your cloud service name” –Name “your VM name”

If this is the last runnung VM in the Cloud Service it will prompt you to confirm.

Stop-AzureVM –ServiceName “your cloud service name” –Name “your VM name” –StayProvisioned

This will not prompt you BUT it will put the VM in the Stopped State, keeping the IP address and continuing to incur charges.

Stop-AzureVM –ServiceName “your cloud service name” –Name “your VM name” –Force

This will not prompt you BUT it will put the VM in the Stopped(deallocated) State, losing the IP address and not incur charges.

Also note that it takes a little while (30-60 seconds usually) before the changes shows in the management portal after the command completes.

Advertisements

Author: Stuart

Crazy Person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s