Bobcares

Dynamic resizing of virtual disks in windows server 2012 r2 – How to resize

by | Nov 30, 2020

Hyper-V Windows Server 2012 R2 has a function that allows dynamic VHDX resizing of virtual disks in Windows server 2012 r2.

As a part of our Server Management Services, we help our customers to resize virtual disks on Windows server 2012.

Today, let’s see what our Support Engineers do to resize virtual disks on Hyper-V Windows Server 2012 R2.

 

Dynamic Resizing of Virtual Disks in Windows Server 2012 R2

 

How to do dynamic resizing of virtual disks in Windows server 2012 r2?

Windows Server 2012 R2 uses ‘Online VHDX Resize’ which allows both to extend and to compact (shrink) a virtual disk.

Using Online VHDX Resize we can change the disk size on-wire without turning off the virtual machine. Both Windows and Linux can act as a guest OS.

We should keep in mind that only VHDXs can be dynamically resized

 

Steps to Extend VHDX in Windows Server 2012 R2:

Online VHDX Resize allows extending  VHDX in Windows Server 2012 R2, the steps followed by our Support Engineers to do this are given below:

  1.  Choose the virtual machine in the virtual machine manager Hyper-V
  2. And go to its Settings.
  3. Choose the virtual disk.
  4. Click the Edit button.
  5. In the appearing wizard, choose Expand.
  6. Specify the new size of the virtual hard disk as required.
  7. Then click Finish.
  8. Go to the console of the guest OS of the disk extended.
  9. Open the console of the Disk Manager, we can see unallocated space appearing in the system.
  10. Right-click the partition we want to extend.
  11. Choose Extend Volume, then specify the size of the extension.
  12. After completing the Extend procedure, the disk size will be increased.

[Need further assistance? We are here for you!]

 

Steps to Shrink VHDX in Hyper-V 2012 R2:

We can shrink the size of VHDX in Windows Server 2012 R2 few easy steps given below:

  1. Before shrinking the virtual disk, we should “cut a piece” from one of the volumes, thus making some space unallocated.
  2. To do this, open the Disk Manager of the guest OS.
  3. Select a volume and click Shrink Volume. (Shrink Volume becomes available only if there is some free space on the disk.)
  4. Specify the amount of space to shrink the partition.
  5. Once the partition of the guest OS has been shrunk, go to the Settings in the Hyper-V console.
  6. Click the Edit button again.
  7. Click Shrink in the wizard that appears.
  8. Specify the amount of space to shrink the VHDX file.
  9. After this step, we can see that space has shrunk.

[Need assistance to Shrink VHDX? We are here for you!]

 

VHDX Resizing with PowerShell (Alternative method):

We can change the size of the VHDX in PowerShell with the cmdlet Resize-VirtualDisk.

Resize-VirtualDisk -FriendlyName “ISCSIVHD1” -Size (50GB)

Earlier the cmdlet resize-vhd was used to resize the virtual disks. However, the virtual machine had to be turned off.

We can  change the size of the file system in the guest OS partition using the command:

resize-partition -driveletter C -size (50GB)

 

Conclusion

In short, we’ve discussed how to do dynamic resizing of virtual disks in Windows server 2012 r2. Also, we saw the steps followed by our Support Engineers do this.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF