Azure virtual machine auto shutdown

In this Azure tutorial, we will discuss the Azure virtual machine auto shutdown option.

We will also discuss on the below topics

  • How to disable notification before auto-shutdown
  • Azure virtual machine bandwidth
  • Azure VM accelerated networking
  • How to check if the accelerated networking is enabled for your virtual machine
  • Enable accelerated networking in your virtual machine
  • How to enable Accelerated Networking on existing VMs using Azure power shell.

We can set the Azure virtual machine auto shutdown option in Azure portal.

Azure virtual machine auto shutdown

Follow the below steps to enable the Azure virtual machine auto shutdown option in the Azure portal.

Step- 1:

Login to https://portal.azure.com/.

Step- 2:

Search for Virtual machines.

How to enable auto shutdown option for your Azure virtual machine

Step- 3:

You will see the list of VM created in your Azure subscription. It will show the VM name, Type, Status, ResourceGroup, Location, etc.

How to connect the virtual machine in Azure

Step- 4:

Now click on the VM name. “MyNewVM” in my case. You can able to see the details of your virtual machine like Public IP address, status, Computer name, Operating system, Size etc.

azure virtual machine auto shutdown

Step- 5:

Now from the left menu, select the “Auto-shutdown” option under Operations section.

How to enable the Auto-shutdown option for your Azure VM.

Step- 6:

Now fill the below options

  • Enabled option as On
  • Scheduled shutdown: Mention the time when you want your VM should automatically shut down in the Scheduled shutdown option,
  • Time zone: Specify your time zone based on the country you belong to.
  • Send notification before auto-shutdown?: Make the option as Yes so that you will get notified in your email-id that your virtual machine is going to be shut down at the specified time.
  • Webhook URL: You can provide the URL If you want something to happen in sync with the machine being shut down.
  • Email address: You can specify the email id where you will get the notification regarding the shutdown of your virtual machine.
How to enable Auto-shutdown option in Azure VM

Step- 7:

Before 30 minutes you will get an email saying that your virtual machine is going to shut down.

Email notification for azure VM auto shutdown option

You can able to Postpone the shut down for 1 hour or 2 hour from the email itself by clicking on below two links as shown above

  • Postpone: 1 hour
  • Postpone: 2 hours

After you click on Postpone: 1 hour or Postpone: 2 hours link, a new notification will be sent 30 minutes prior to the new shutdown time.

You can also click on Skip it by clicking on Skip this instance link.

This is how we can enable Azure virtual machine auto shutdown option.

How to disable notification before auto-shutdown

If you want to disable the notification to be sent before auto-shutdown, From the below window you can select No for Send notification before auto-shutdown? option and then click on the Save button.

how to disable notification before auto-shutdown

This is how you can enable the Azure virtual machine auto shutdown option for your azure virtual machine(VM).

Azure virtual machine (VM) bandwidth

Azure provides different bandwidth depending upon the size of the virtual machine.

As we know already, the resources and hardware are being shared by the virtual machines from the host computer. Same way network bandwidth also being shared by all the virtual machines among them.

The NB(network bandwidth) of the virtual machine is measured in megabits per second (Mbps).

This is based on the virtual machine size you selected while creating the virtual machine.

The network bandwidth allocated to individual VM is metered based on the outbound traffic from the virtual machine. 

Bandwidth allocated to any of the virtual machine is equals to the sum of all outbound traffic across all network interfaces attached to that particular virtual machine.

The number of network connections present on a particular virtual machine at any given time can affect its network performance.

Azure vm accelerated networking

Accelerated networking is a new feature introduced to boost the network bandwidth of a virtual machine in Azure.

It helps to reduce utilization of the CPU, provides more capacity for processing the massive amounts of data, etc

It helps to push more data at once by providing more bandwidth to the network.

This feature is not supported by all the virtual machines with any size. It is specific virtual machine with some specific size.

How to check if the accelerated networking is enabled for your virtual machine

Follow the below steps to check if the accelerated networking is enabled for your virtual machine.

Step- 1: 

Login to https://portal.azure.com/

Step- 2: 

Search for Virtual machines there.

Azure virtual machine bandwidth

Step- 3: 

You will see the list of VM created in your Azure subscription. It will show the VM name, Type, Status, ResourceGroup, Location, etc.

What is Azure vm accelerated networking

Step- 4: 

Now click on the VM name. “MyNewVM” in my case. You can able to see the details of your virtual machine like Public IP address, status, Computer name, Operating system, Size etc.

Azure vm accelerated networking benefits

Step- 5:

Now click on the Networking option under Settings.

Azure vm accelerated networking

Step- 6:

In the blow window if you can able to see “Accelerated networking” is Disabled for me.

how to enable Azure vm accelerated networking

How to enable accelerated networking in your virtual machine

You can enable the accelerated networking while creating the virtual machine initially.

Check the below steps to enable this option.

There are two cases you can see here while enabling the accelerated networking option

Login to the portal and go to Create a virtual machine option. you can refer to my last blog How to Create Azure VM (Virtual Machine)

Case -1:

Fill out the details in the Basic tab and then click on the Networking tab.

Enable accelerated networking option for your virtual machine

If you will see above for this particular VM, we can’t enable the accelerated networking option. The selected VM size does not support this option.

You can notice here On option is disabled you can’t enable this option in this case.

Case-2:

In this case, the accelerated networking option supports for this particular virtual machine size.

Fill out the details in the Basic tab and select the Size of the VM as “Standard DS3 v2” .

How to enable accelerated networking option for your virtual machine

Now you click on the “Networking” tab. You can enable accelerated networking option here for this virtual machine

Select the “On” option for accelerated networking field to enable it.

How to disable accelerated networking option for your virtual machine

How to enable Accelerated Networking on existing VMs using Azure PowerShell.

You can enable the accelerated networking option on the existing virtual machine but prerequisites is The virtual machine must be a supported size for accelerated networking.

Follow the below steps

Step- 1:

We must first stop or deallocate the VM for which you want to enable the accelerated networking option.

Stop-AzVM -ResourceGroup "newresgroup" -Name "MyNewVM"

Step- 2:

You can enable accelerated networking option on the NIC of your VM

$mynic = Get-AzNetworkInterface -ResourceGroupName "newresgroup" -Name "mynewvm843NIC"

$mynic.EnableAcceleratedNetworking = $true

$mynic | Set-AzNetworkInterface

Step- 3:

Now you can restart your virtual machine using the below command. Now if you will go and check for the networking tab, the accelerated networking option must be enabled.

Start-AzVM -ResourceGroup "newresgroup"  -Name "MyNewVM"

You may like following Azure tutorials:

Conclusion

In this Azure tutorial, We discussed

  • Azure virtual machine auto shutdown
  • Virtual machine bandwidth in Azure
  • Azure VM accelerated networking
  • How to check if the accelerated networking is enabled for your virtual machine
  • Enable accelerated networking in your virtual machine
  • Enable Accelerated Networking on existing VMs using Azure power shell.

Leave a Comment