locked
Managed Disk Convertion RRS feed

  • Question

  • Hi,

    We have P4 disk type want convert to P20 or P30 disk type of Linux VMs hosted on the Azure Portal, can you pls help me to understand whether this is required any outage for the Linux VMs and steps involved?


    • Edited by Munnakp Monday, March 11, 2019 11:27 PM missing information
    Monday, March 11, 2019 11:26 PM

All replies

  • Based on my knowledge

    When you convert your P20 disk to a P30 disk  or any upgrade or downgrade you are changing just not the  capacity, the system is changing the IOPS and throughput etc., internally the system uses some utility to update your VM ( "Update-AzureDisk" PowerShell commandlet with "-ResizedSizeInGB" property) so performing this action, disk needs to be detached from the VM or the VM needs to be stopped, so there should be outage , you cant avoid


    https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-types#premium-ssd

    • Proposed as answer by YASWANTH MADI Monday, March 18, 2019 6:48 AM
    Monday, March 11, 2019 11:44 PM
  • Ok Thank you Thuyavan, how I select P30 disk type do you have any sample/example for reference. I looked at ResizedSizeInGB parameter unclear from MS document.
    Tuesday, March 12, 2019 12:39 AM
  • @Munnakp,

    Here is the below PowerShell script to resize the VM disk from P4(32 GB) to either P20(512 GB) or P30(1,024 GB) 0r P40(2,048 GB).

    #Install the latest Azure PowerShell module if you don’t have already installed
    
    Install-Module -Name Az -AllowClobber
    
    Connect-AzAccount
    
    Select-AzSubscription –SubscriptionName 'your-subscription-name'
    
    $rgName = 'your resource group name'
    
    $vmName = 'Your VM Name'
    
    $vm = Get-AzVM -ResourceGroupName $rgName -Name $vmName
    
    Stop-AzVM -ResourceGroupName $rgName -Name $vmName
    
    $disk= Get-AzDisk -ResourceGroupName $rgName -DiskName $vm.StorageProfile.OsDisk.Name
    
    #Disk size for P20 is "512" and P30 is "1,024"
    
    $disk.DiskSizeGB = 1024
    
    Update-AzDisk -ResourceGroupName $rgName -Disk $disk -DiskName $disk.Name
    
    Get-AzVM -ResourceGroupName $rgName -Name $vmName

    PowerShell Output:-

    Before resizing the disk

    After resizing the disk

    Note:-

    The new size should be greater than the existing disk size. The maximum allowed is 2048 GB for OS disks.

    For more information, I would recommend you to refer the following article suggested by Thuvayan.

    Kindly let us know if you need any further assistance on this.


    Monday, March 18, 2019 6:48 AM
  • @Munnakp Just checking in to see if the above answer helped. If this answers your query, do click “Mark as Answer” and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.
    Monday, March 25, 2019 8:54 AM