How to Extend Windows Server 2022 on a Nutanix VM Using Ubuntu Live CD and GParted
Updated On: Feb. 24, 2025 Author: Kevin

How to Extend Windows Server 2022 on a Nutanix VM Using Ubuntu Live CD and GParted

This tutorial explains how to safely relocate the recovery partition and extend the C: drive on a Windows Server 2022 VM running on Nutanix using an Ubuntu Live CD with GParted. Follow these steps carefully, and always ensure you have a current snapshot and backup before proceeding.

1. Create a Nutanix Snapshot and Backup

Create a Snapshot: Log in to Nutanix Prism, select your Windows Server 2022 VM, navigate to the snapshot section and create a new snapshot. This snapshot allows you to revert your VM if anything goes wrong.

Backup Your Data: Perform a full backup or system image of your VM to protect your data in case any issues arise.

2. Extend the Virtual Disk (If Necessary)

If you need more space, extend the VM's virtual disk from Nutanix Prism:

# In Nutanix Prism:
# - Go to your VM's settings.
# - Extend the disk size as required.
# - After booting into Windows Server 2022, verify that the additional space appears as unallocated.

3. Prepare the Ubuntu Live CD

Download the Ubuntu Live ISO: Visit the official Ubuntu website and download the latest Ubuntu Desktop ISO. Ubuntu’s live environment supports Secure Boot.

Attach the ISO to Your VM: In Nutanix Prism, attach the Ubuntu ISO to the VM’s virtual CD/DVD drive, ensuring the VM is configured to boot from the CD/DVD drive.

4. Boot into the Ubuntu Live Environment

Restart your Nutanix VM so it boots from the attached Ubuntu ISO. When prompted, select the "Try Ubuntu" option to boot into the live session without installing the OS.

5. Install and Launch GParted

Install GParted (if necessary): Open a Terminal (Ctrl+Alt+T) and run the following commands:

sudo apt-get update
sudo apt-get install gparted

Launch GParted: Once installed, open GParted from the applications menu.

6. Modify the Partitions Using GParted

Identify Your Partitions: Locate the Windows C: drive partition and the recovery partition (currently on the right side).

Move the Recovery Partition: Right-click the recovery partition and select "Resize/Move." Drag the partition to the left so that the unallocated space becomes contiguous to the C: drive, then click "Apply" (the green check mark) to execute the move.

7. Extend the C: Drive

Select the C: drive partition, right-click it, and choose "Resize/Move." Drag the partition border to expand it into the unallocated space created by moving the recovery partition, then click "Apply" to confirm the extension.

8. Finalize and Reboot

Once all changes are applied in GParted, close the application. Detach the Ubuntu ISO from the VM’s virtual CD/DVD drive in Nutanix Prism, reboot your VM, and verify that Windows Server 2022 boots correctly. Confirm that the C: drive has been successfully extended and that the recovery partition remains accessible.

Troubleshooting and Additional Considerations

Secure Boot: Ubuntu’s live environment supports Secure Boot. If you encounter any boot issues, you may need to temporarily disable Secure Boot in your VM’s firmware settings, then re-enable it once the process is complete.

Data Integrity: If any issues arise during the process, revert to your Nutanix snapshot or restore from your backup.

This guide provides a comprehensive step-by-step process for extending your Windows Server 2022 C: drive on a Nutanix VM using Ubuntu and GParted. Always remember to backup your data and create a snapshot before modifying partitions to ensure you can recover from any unexpected issues.