Reduce virtual disks of machines in avd

Juan Pablo Delgadillo Martinez 61 Reputation points

Hello everyone!

I have the following problem, I currently manage an avd farm, which have a predefined 512 GB disk, analyzing the disks, I can't use more than 170 GB, so I have plenty of space.

Trying to download the disks manually, it tells us the following: Shrinking the disk size is not supported in Azure to prevent data loss.

When updating it in avd, it does not allow me to select the size of the disks anymore, when I try to create more than 50 machines, I can only modify the type of size of the vm, either D16v4 or D8, etc.

But the amount of disk size to lower it from 512GB to 256GB does not allow me.

Do you have any recommendations, I imagine it will be to create my virtual machine with 256 GB and from there create my gold image to send it to my avd and when I send more than 50 machines, they register with 256 GB

Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,450 questions
{count} votes

1 answer

Sort by: Most helpful
  1. KarishmaTiwari-MSFT 18,877 Reputation points Microsoft Employee

    @Juan Pablo Delgadillo Martinez

    I would recommend checking out this feature as it can help achieve your goal:
    Announcing the public preview of Azure Virtual Desktop Custom Image Templates ( 
    Please be aware that it is currently in Public Preview:

    Custom image templates allow admins to build a custom “golden image” with the added capability to include Azure Virtual Desktop built-in customizations as well as your own customization scripts to install other applications or set of configurations.

    You can also use the following script to modify the Host Pool's default DiskSizeinGB value for a specific Host Pool (HP), so next VMs deployed to on that Host Pool will use the new value for disk size:

    #Select desired Host Pool to update
    $resource = Get-AzResource -ResourceType 'Microsoft.DesktopVirtualization/hostpools' | Out-GridView -OutputMode Single -Title 'Select the HP to change'

    $myHP = Get-AzWvdHostPool -Name $($resource.Name) -ResourceGroupName $($resource.ResourceGroupName)

    #import vm settings as PS Object.
    $newvmtemplate = $myHP.VMTemplate | convertfrom-json


    #display host pool's VM config


    #modify settings using the correct sizings e.g.
    $newvmtemplate.diskSizeGB = 256


    #update HP's template with new disk size
    Update-AzWvdHostPool -Name $($myHP.Name) -VMTemplate $($newvmtemplate | ConvertTo-Json) -ResourceGroupName $($resource.ResourceGroupName)

    Let me know if you have any questions.

    0 comments No comments