Deallocate Azure Virtual Machines
Use cases for deallocating a virtual machine:
- When you need a non-critical system for a Test/Dev environment that does not need to be running during the weeknight or weekends.
- When you need a system that needs to be active for a defined period of time.
- You can also deallocate your servers if they are not being used.
Why should we deallocate:
The main reason you would want to deallocate your server, is to help minimize resource consumption and reduce overall cost.
Differences between a Stopped and Deallocated state:
This occurs if a shutdown command is initiated from within the operating system. The operating system in the virtual machine is stopped and the services are unavailable, but the compute and network resources are reserved.
Azure continues to charge for the virtual machine core hours and storage needed for the operating system disk. You are still being billed, even if the server is in a stopped status.
While the server is stopped, you can’t connect to it remotely and networking is offline. You are able to make some modifications to the virtual machine.
This is what it looks like when your virtual machine is stopped.
This occurs if you select ‘Stop’ from the portal. The operating system in the virtual machine is stopped and you also free up hardware and networking resources.
Important: Unless you configured static IP addresses, when you deallocate a server – you also release the public IP address. The operating system and data disk remain intact. When you restart your server, a new IP address will automatically be assigned to the server.
Azure does not charge for the virtual machine core hours, when deallocated. You will continue to be charged for the storage needed for the operating system disk.
While the server is deallocated, you can’t connect to it remotely and networking is offline. You are able to make modifications to the virtual machine.
This is what it looks like when your virtual machine is deallocated: