Recently, I wanted to perform the SCCM in-console update to 1906 and since my LAB Hyper-V guest VM disk space was low I expanded the capacity of the virtual disk. I recall that I upgraded the Windows Server OS to 2016 last year and didn’t notice the extra “Recovery Partition” partition near my C drive partition. Ultimately, I was unable to delete this extra partition no matter what I tried. In this blog post “Resolution – Diskpart Delete Partition Override Hyper-V Virtual Disk Error“, I document the steps needed to successfully delete an unwanted Windows partition to allow the “extend volume” option on Hyper-V guest VM to properly work after you have expanded the virtual disk to increase the disk capacity. To put it simply – I had to use an Ubuntu LiveCD since the diskpart “Delete Partition Override” option did not work.
From what I have read, if you perform a Windows In-place upgrade from Server 2012, an additional “Recovery Partition” is created. My initial goal was to simply expand my Hyper-V SCCM virtual guest Windows Server 2016 OS disk to add more free disk space. With the recent release of SCCM 1906 I ran the pre-requusite check and it failed on the free disk space check. At first, I simply tried to use Disk Management and right-click on the volume and select “Delete Volume” but that option was grayed out. Ultimatiely, no command line option worked even when I tried from a WINPE enviornment. Also, I found some other 3rd party “freeware” tools but didn’t want to install that software on my SCCM LAB VM.
I was unable to select the option “Extend Volume” from Disk Management on the Hyper-V VM.
I tried the
Ultimately, using the current version of Ubuntu Desktop Live CD worked successfully. However, I didn’t want to take the chance of deleting the recovery partition without the assurance that it would boot after the change. Also, I wasn’t sure if it was used for boot files that may be on that specific partition. Further, I was not concerned with keeping a Windows RE (recovery environment) but for a production server, you will want to enable this after you’re able to successfully expand the capacity for the virtual disk (
In my case, the 450MB “Recovery Partition” #6 is what I needed to delete since that was close to my C OS disk partition.
Disable Windows RE on Extra Recovery Partition
I ran this command to DISABLE the existing Windows Recovery Environment (Windows RE) and system reset configuration BEFORE deleting the partition with the Ubuntu Desktop LiveCD ISO.
From an elevated command prompt on the guest VM: reagentc /info
As shown here a WinRE environment does exist in partition #6 which is the partition that needs to be deleted.
From an elevated command prompt on the guest, VM run this command to disable Windows RE: reagentc /disable
Run the command reagentc /info again.
The Windows RE environment is now disabled but you still won’t be able to delete the Recovery Partition! Use Ubuntu without installing option to delete the extra partition now.
Use Ubuntu Desktop ISO to delete Extra Recovery Partition
Download the latest Ubuntu Desktop ISO, mount the ISO on the guest VM, boot from the ISO CD and select the option “*Try Ubuntu without installing“.
Click on the settings option and launch the “Disks” app from the settings menu once Ubuntu boots to the desktop.
Highlight the extra 450MB partition next to the “Free Space” partition. The Free Space partition should be the expanded capacity disk partition on the Hyper-V virtual disk.
Click on the “-” minus option to delete the extra recovery partition as shown here.
Click “Delete” to confirm you want to delete the extra recovery partition.
Reboot to the Windows Server OS on the Hyper-V guest VM and dismount the Ubuntu ISO.
Extend Volume Successfully
Now the extend volume option works successfully on the Hyper-V guest VM for the SCCM lab server and the SCCM free disk prerequisite check completes successfully! The in-console upgrade to SCCM 1906 is successful now.
That completes this blog post “Resolution – Diskpart Delete Partition Override Hyper-V Virtual Disk Error” that documented how to successfully delete a extra recovery partition after a Windows Server 2012 In-place OS upgrade.
Ubuntu Desktop ISO download – The Ubuntu desktop is by far the world’s most widely used Linux workstation platform, powering the work of engineers across the globe. Ubuntu Core sets the standard for tiny, transactional operating systems for highly secure connected devices.