Hello, Guillermo Aguilera! We received your feedback but unfortunately your VM is permanently deleted if you do not have a backup. Below I've included some options for preventing this from happening again including locks and cost effective backup options. Your feedback is important so please take a moment to accept answers.
What can I do if I've accidentally deleted my VM?
If you have a backup or a snapshot of the VM, then you can restore the VM:
https://learn.microsoft.com/en-us/azure/backup/backup-azure-arm-restore-vms
If you did not backup or create a snapshot of the VM and disks have been deleted, then unfortunately the VM has been permanently deleted.
How can I prevent this from happening?
There are several options you can take advantage of to make sure you don't end up in this situation :
- Lock your resources to protect your infrastructure: Using a lock like
CanNotDelete
will prevent the resource/VM from being accidentally deleted.
- Azure Disk Backup: Azure Disk Backup is a native, cloud-based backup solution that protects your data in managed disks. It's a simple, secure, and cost-effective solution that enables you to configure protection for managed disks in a few steps. It assures that you can recover your data in a disaster scenario.
- Selective disk backup and restore for Azure virtual machines: Azure Backup supports backing up all the disks (operating system and data) in a VM together using the virtual machine backup solution. Now, using the selective disks backup and restore functionality, you can back up a subset of the data disks in a VM. This provides an efficient and cost-effective solution for your backup and restore needs.
I hope this has been helpful! Your feedback is important so please take a moment to accept answers.
If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!
