
This article is intended for administrators wishing to increase the capacity of their virtual disks on their VMs.
Note: All images are clickable for enlarging, or can be opened in a new tab
Resolution/Information
Expanding the virtual disk is very simple just need to ensure that the snapshot feature is not enabled. If this is enabled an error message will be encountered.
Note: when expanding the C: on windows server/desktop editions then the recovery partition will need to be moved/recreated.
Table of Contents
Step1 - Increase the Virtual Disk size.
In the Left Menu select Virtual Machines on the Node where the VM is running.
Click on the VM and then browse to the correct Virtual Disk.
Click on the Virtual Disk
This will then load the Targets page for the virtual disk.
To increase the size on the left hand side under Actions click on Extend.
Note: If there are snapshots enabled on the VM the following error will be seen.
In which case then the Snapshots will need to be disabled for the extend process.
Click CANCEL go back to the Virtual Machines Menu>Select the Virtual Machine and under Actions>Disable Snapshot.
https://stormagic.com/doc/svhci/2-3-0/en/VMs/vm-snapshot-enable.htm
This will delete all the snapshots for the VM but then make it possible to Extend the Virtual Disk in the Targets Menu as before (ensure the correct virtual disk/target is selected).
Ensure the new Size is populated with a larger value than the current size and click EXTEND.
Note: If the VM Is a protected VM a short resync will be seen with the partner Node.
Step2 - if using windows server/desktop VMs
If the virtual disk does not included the OS as in C: then a simple disk extension in Disk Manager will suffice.
If the Virtual disk is the C: the the Recovery partition will more than likely be in the way.
Note: As moving or recreating the Recovery partition could have an impact on the running of the VM it is advised to enable snapshots and take a snapshot before proceeding.
In which case either some third party tool can be used to move the Recovery partition such as Mini Tool Partition or Ease US Partition Master or using the CMD line in windows to delete and recreate the Recovery partition.
To enable snapshots and take a snapshot see:
https://stormagic.com/doc/svhci/2-3-0/en/VMs/vm-snapshot-enable.htm
https://stormagic.com/doc/svhci/2-3-0/en/VMs/vm-snapshot-take.htm
Example Below is if using the native tools from windows for steps on using partition tools please consult with their documentation.
This is from a windows11 VM that has has had the virtual disk extended in SvHCI but the recovery position is in the way of being able to use the new space.
Workaround for GPT Boot volume
- ensure a snapshot has been taken before proceeding
- then proceed to disable the recovery partition
launch CMD on the windowsVM as administrator and type reagentc /disable
C:\Windows\System32>reagentc /disable
REAGENTC.EXE: Operation Succesful.If this command fails - check that there is enough space on the C:
If not then a possible solution could be to remove OLD windows update files located here:
C:\Windows\SoftwareDistribution\Download
Once the above command has completed successfully continue.
then type diskpart
type list disk
C:\Windows\System32>diskpart
Microsoft DiskPart version 10.0.26100.1150
Copyright (C) Microsoft Corporation.
On computer: DESKTOP-IFBJ988
DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 37 GB 1025 MB *
type select disk <nr>
DISKPART> select disk 0
Disk 0 is now the selected disk.
type list partition
DISKPART> list partition
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 System 200 MB 1024 KB
Partition 2 Reserved 16 MB 201 MB
Partition 3 Primary 34 GB 217 MB
Partition 4 Recovery 1024 MB 34 GB
type select partition <nr> (the one marked as Recovery)
then retype list partition to check the correct one has been selected - a * will appear next to it.
DISKPART> select partition 4
Partition 4 is now the selected partition.
DISKPART> list partition
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 System 200 MB 1024 KB
Partition 2 Reserved 16 MB 201 MB
Partition 3 Primary 34 GB 217 MB
* Partition 4 Recovery 1024 MB 34 GB
then gather the information about the Recovery partition
type detail partition
DISKPART> detail partition
Partition 4
Type : de94bba4-06d1-4d40-a16a-bfd50179d6ac
Hidden : Yes
Required: Yes
Attrib : 0X8000000000000001
Offset in Bytes: 37578866688
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
* Volume 4 Recovery NTFS Partition 1024 MB Healthy Hidden
Take note of the following values:
Type : de94bba4-06d1-4d40-a16a-bfd50179d6ac
Attrib : 0X8000000000000001
type delete partition override
DISKPART> delete partition override
DiskPart successfully deleted the selected partition.
Check in Disk manager and the Recovery partition will be gone and the disk can be extended using the wizard.
Extend Volume
When extending leave enough space for the Recovery partition - generic guideline is 1GB
once extended and space is left for the Recovery partition it is just a matter of recreating and re-enabling.
In disk manager create a NTFS partition with no drive letter from the remaining Unallocated space.
in DISKPART type list partition
DISKPART> list partition
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 System 200 MB 1024 KB
Partition 2 Reserved 16 MB 201 MB
Partition 3 Primary 35 GB 217 MB
Partition 4 Primary 1024 MB 35 GB
then type select partition <nr> (the one intended as Recovery currently listed as Primary)
DISKPART> select partition 4
Partition 4 is now the selected partition.Using the values from the old Recovery partition recreate this with the following command.
Type : de94bba4-06d1-4d40-a16a-bfd50179d6ac
Attrib : 0X8000000000000001
set id=<value from type>
DISKPART> set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
DiskPart successfully set the partition ID.
gpt attributes=<value from Attrib>
DISKPART> gpt attributes=0X8000000000000001
DiskPart successfully assigned the attributes to the selected GPT partition.Check the partition type has changed
type list partition
DISKPART> list partition
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 System 200 MB 1024 KB
Partition 2 Reserved 16 MB 201 MB
Partition 3 Primary 35 GB 217 MB
* Partition 4 Recovery 1024 MB 35 GBFinal step is to re-enable the Recovery Partition
Exit out of DISKPART
type in the CMD prompt -
C:\Windows\System32>reagentc /enable
REAGENTC.EXE: Operation Succesful.
See Also
Comments
0 comments
Article is closed for comments.