Skip to main content

Posts

Showing posts from April, 2021

Azure VM Selective Disk Backup

Hey Folks Recently Microsoft has announched that, Azure now supports VM Selective backups. What is this selective backup??. This will allow the admins/customers to backup only the selected disks in a VM to Azure backup. But at the moment we can only perform the following scnearios Example We have a Linux VM which has OS Disk and 2 data disks as mention below What we can do is Backup All Data disks (Typical option) Backup only the OS disk Backup OS Disk + Disk 1 Backup OS Disk + Disk 2 What we cannot do is back up on the data disks without the OS disk. I will talk about option 2 and 3 ( 4 is same as 3). Basically I will be covering the new options. Alos on this to note, at the moment option 3 only can be set from powershell. There is no GUI option for it. Backup OS Disk + Data Disk 1 Get VM Disk Details Get-AzDisk -ResourceGroupName AE-DEV-LINUX Get Azure VM Datadisk details $Vm = Get-AzVM -ResourceGroupName AE-DEV-LINUX -Name LinuxVm01 Determine Datadisk lun details $vm.StoragePro

Deploying a VM Using Disk Snapshot

Hey Folks, Hope you are doing great, Thought of posting this article, because of a recent experiance I had. We wanted to move a particular VM from one Vnet to another VM. So we thought of taking a down time and Get a disk snapshot and re-reploy the VM in the second VNet. But, unfortuanly Azure threw and error saying. And I noticed, VM is getting deployed but we cannot power it on. And When I dig deepeer I saw VM publisher information was easy. I was able to find many articles mentioning about this, but all the articles shows how to deploy the VM in a vanila environment. So I had to a tweek this a little bit So we had to follow the below process using poweshell. Collocting the required information from source VM $vm = Get-azvm -ResourceGroupName "AE-DEV-SONUS-RG" -Name AERibbonVM $vm.plan Setting up Basic VM Config for the New VM $vmconfig = New-AzVMConfig -VMName ribbonTemp2 -VMSize Standard_B1ms Create a disk from the snapshot $snapshot = Get-AzSnapshot -ResourceGroupName &