First things first, take a backup of the vDisk or OS Disk (if MCS Master Image)
The following procedure outlines how to recreate the EFI partition and extend the OS partition using native Windows utilities.
Steps:
Attach the VHDX (Vdisk) in Disk Management
Use DiskPart Utility to identify volumes and partitions:
Delete the existing EFI partition:
Extend the OS partition to maximum size via Disk Management
Shrink the OS volume to 100 MB
Recreate the EFI partition using DiskPart:
Confirm that the new EFI volume is assigned a drive letter (hidden in File Explorer).
Rebuild boot files:
Replace <OS Volume Letter> with the mounted OS volume and <EFI Partition Letter> with the newly created EFI partition.
Unmount the VHDX
Boot the target machine in normal mode to verify modifications.
Example Volume Layout After Procedure:
The procedure described in this article involves modifying disk partitions, deleting and recreating EFI partitions, and updating boot files. These operations are inherently risky and can render the system unbootable or result in data loss if not performed correctly.
This procedure is provided “as is” without any warranties or guarantees of success. Citrix and its affiliates disclaim any liability for damage, data loss, or downtime resulting from the use of this procedure.
Before performing these steps, it is strongly recommended to:
Take a full backup of all affected volumes and system data.
Ensure the VHD/VHDX is detached safely after modifications.
Confirm that you understand DiskPart commands, EFI structure, and boot file restoration.
By following these steps, you assume all risk associated with the procedure. This method should only be executed by experienced administrators familiar with Windows disk management and UEFI boot configurations.
Disk Management in Windows only allows the extension of a volume using unallocated space adjacent to it on the right side. If an EFI or Recovery partition exists between the OS partition and unallocated space, the Extend Volume option will be greyed out.
1) This is just a standard VHDX expansion and partition reconfiguration, and the steps are an illustration of one method
2) This is not related to a specific Citrix product version but can be used for all versions
3) In case of PVS, this cannot be completed when there are PVS vdisk versions, a merged base is required to have a standalone vhdx file.
4) After increasing the hard drive size in the hypervisor, attempting to extend the OS disk on an (MCS Master)/(PVS vDisk), VM shows Extend Volume greyed out due to the EFI partition.
The above steps remove and recreate the EFI partition while preserving the OS volume.