

If you are using Windows Server 2012 (Non R2) or older, you will have to power off the virtual machine at this step to proceed. This section can only be done with the virtual machine online and running if you are using Windows Server 2012 R2 or newer. Now that the space is listed as unallocated within the operating system, we can decrease the virtual disk through Hyper-V manager. Next enter the amount of space in MB that you want to decrease by, in this example I’ve selected 51200MB so that the C:\ partition will be 50gb in total after completion.Īfter clicking the shrink button you will see the space become listed as unallocated.

Right click the C:\ partition and select “Shrink Volume…” as shown below. In this example we have just the single 100gb disk where the majority of the space has been assigned to the C:\ drive – this is what we want to lower first. You will now be able to see the disks and partitions available on the server. Once the Computer Management window has loaded up, select Disk Management from the storage menu on the left hand side. We would like to shrink it down to 50gb as it is not using this space and we don’t want the server to be capable of using this space in the future.įrom Server Manager, select Tools > Computer Management.

In this example our servers primary hard drive is 100gb with less than 9gb actually in use as shown below. Our test server is running Windows Server 2012 R2 as a Hyper-V virtual machine. For example a service provider may have a customer looking to downgrade their disk space and we would want to shrink their disk back so they do not use space they are no longer paying for. With that in mind there are still times where you may want to shrink the available disk space on the server to prevent a user using it. Typically most provisioning nowadays is thinly provisioned where the virtual disks will only be the size of the data stored on them rather than wastefully statically assigning the total space of the disk, so this may not be very beneficial for you. Shrinking the available disk space on a server may allow us to use the space elsewhere, perhaps on another virtual machine. Prior to 2012 R2 you would have to shut down the virtual machine to complete the process, I’ll cover where that’s done later on in case you’re using a version prior to 2012 R2. Firstly we will be shrinking the file system within the operating system, and then shrinking the actual virtual disk afterwards to reclaim space.Īs of Windows Server 2012 R2, Hyper-V allows us to dynamically shrink and expand the size of our virtual hard disk while the virtual machine is still running, meaning that there is no down time.
#Windows server change disk number how to#
Previously I’ve covered how to increase disk space in Windows server, now we’ll be outlining how to do the opposite by shrinking the disk space for a virtual machine running Windows Server 2012 R2.
