Hyper-V Server adjusts virtual hard disk size online

Source: Internet
Author: User

1. Technical Overview:

Starting with Windows Server R2, administrators can use Hyper-V to extend or compress the size of a virtual hard disk while running a virtual machine. Storage administrators can avoid costly downtime by performing maintenance operations on a running virtual hard disk. You no longer need to shut down virtual machines, which avoids disruption to users who access these virtual machines and helps reduce maintenance costs. Prior to the launch of Windows Server R2, if the virtual machine is online or a virtual hard disk is already in use, you cannot perform maintenance on the virtual hard disk without temporarily shutting down the virtual machine.

2. Technical Requirements:

The following features are required when an administrator uses online sizing of virtual hard disks:

1) A server capable of running Hyper-V. The server must have a processor that supports hardware virtualization. The Hyper-V role must be installed.

2) A user account that belongs to the local Hyper-V Administrators group or members of the Administrators group.

3) VHDX -the ability to extend and compress virtual hard disks can only be performed on virtual hard disks that use the. VHDX file format. The VHDX disk types, including fixed disks, differencing disks, and dynamic disks, support online sizing. The resize operation does not support virtual hard disks that use the. vhd file format.

4) SCSI Controller -the ability to extend or compress virtual hard disk capacity can only be performed on. vhdx files that are attached to the SCSI controller. VHDX files attached to the IDE controller are not supported.

Demo configuration adjusts the size of the online virtual hard disk. Virtual machine "bj-ap-01" the current virtual disk is configured to 100GB, which demonstrates online tuning to 150GB.

650) this.width=650; "height=" 274 "title=" clip_image002 "style=" margin:0px;border:0px;padding-top:0px; Padding-right:0px;padding-left:0px;background-image:none, "alt=" clip_image002 "src=" http://s3.51cto.com/wyfs02/ M01/56/01/wkiom1sjnolj1ejmaadrnhrx_z4547.jpg "border=" 0 "/>

A) Select the virtual machine for which you want to extend the virtual hard disk;

b) Click on the hard drive, select the currently used VHD file, click Edit;

650) this.width=650; "height=" 368 "title=" clip_image004 "style=" margin:0px;border:0px;padding-top:0px; Padding-right:0px;padding-left:0px;background-image:none, "alt=" clip_image004 "src=" http://s3.51cto.com/wyfs02/ M02/55/ff/wkiol1sjnxrhjyluaagxvsubs4i639.jpg "border=" 0 "/>

c) Find the virtual machine hard disk page, read the relevant warning and click Next

650) this.width=650; "height=" 234 "title=" clip_image006 "style=" margin:0px;border:0px;padding-top:0px; Padding-right:0px;padding-left:0px;background-image:none, "alt=" clip_image006 "src=" http://s3.51cto.com/wyfs02/ M00/56/01/wkiom1sjnolaeeyfaadog4emlna648.jpg "border=" 0 "/>

d) Select the Operation page, at which time you can choose to compress and expand, here Select "Extension";

650) this.width=650; "height=" 417 "title=" clip_image008 "style=" margin:0px;border:0px;padding-top:0px; Padding-right:0px;padding-left:0px;background-image:none, "alt=" clip_image008 "src=" http://s3.51cto.com/wyfs02/ M00/55/ff/wkiol1sjnxuswe_yaad4izihgto986.jpg "border=" 0 "/>

If the virtual machine is off, you can also choose to convert the virtual disk, such as converting the VHD file to a VHDX file

650) this.width=650; "height=" "title=" clip_image010 "style=" margin:0px;border:0px;padding-top:0px; Padding-right:0px;padding-left:0px;background-image:none, "alt=" clip_image010 "src=" http://s3.51cto.com/wyfs02/ M00/56/01/wkiom1sjnokayl6iaadqp0rfwlm528.jpg "border=" 0 "/>

e) on the Extend Virtual Disk page, enter a new virtual hard disk size. The size is specified in gigabytes, and the maximum size of any virtual hard disk is 64TB;

650) this.width=650; "height=" 227 "title=" clip_image012 "style=" margin:0px;border:0px;padding-top:0px; Padding-right:0px;padding-left:0px;background-image:none, "alt=" clip_image012 "src=" http://s3.51cto.com/wyfs02/ M00/55/ff/wkiol1sjnxvabb4caacxbz8o704447.jpg "border=" 0 "/>

f) On the Completing the Edit Virtual Hard Disk Wizard page, click Finish;

650) this.width=650; "height=" 305 "title=" clip_image014 "style=" margin:0px;border:0px;padding-top:0px; Padding-right:0px;padding-left:0px;background-image:none, "alt=" clip_image014 "src=" http://s3.51cto.com/wyfs02/ M00/56/02/wkiom1sjnoohtshnaaddl0ynwj8211.jpg "border=" 0 "/>

g) Enter credentials and log on to the virtual machine that extends the virtual hard disk;

h) Open "Disk Management";

i) Right-click on the C drive and select "Extend Volume";

650) this.width=650; "height=" 227 "title=" clip_image016 "style=" margin:0px;border:0px;padding-top:0px; Padding-right:0px;padding-left:0px;background-image:none, "alt=" clip_image016 "src=" http://s3.51cto.com/wyfs02/ M01/56/02/wkiom1sjnootnlheaacbrrp_db0660.jpg "border=" 0 "/>

j) Expand Volume Wizard page, select unused volumes

650) this.width=650; "height=" 479 "title=" clip_image018 "style=" margin:0px;border:0px;padding-top:0px; Padding-right:0px;padding-left:0px;background-image:none, "alt=" clip_image018 "src=" http://s3.51cto.com/wyfs02/ M02/55/ff/wkiol1sjnxusvj9paaftcyt4dkk323.jpg "border=" 0 "/>

k) on the Completing the Extended Volume page, click Finish.

650) this.width=650; "height=" 266 "title=" clip_image020 "style=" margin:0px;border:0px;padding-top:0px; Padding-right:0px;padding-left:0px;background-image:none, "alt=" clip_image020 "src=" http://s3.51cto.com/wyfs02/ M00/56/02/wkiom1sjnoaxoz0baad8znv-myy691.jpg "border=" 0 "/>

650) this.width=650; "height=" 331 "title=" clip_image022 "style=" border:0px;padding-top:0px;padding-right:0px; Padding-left:0px;background-image:none, "alt=" clip_image022 "src=" http://s3.51cto.com/wyfs02/M02/56/02/ Wkiom1sjnoexk4yzaac2xhmixkg843.jpg "border=" 0 "/>

To compress the size of a virtual hard disk:

The ability to expand or compress virtual disk capacity while the virtual machine is running enables customers to gain greater flexibility and reduce the possibility of load downtime due to changes in capacity requirements. This capability not only provides greater flexibility for virtual machines that require more data storage space, but also allows IT administrators to reclaim space that has been allocated to the virtual machine but is no longer in use. This is especially important for service providers or managed environments, where customers may have purchased 100GB capacity virtual machines, but only 30GB space, and want to reduce disk capacity to 50GB to lower costs. This operation is now available online without the need for a load outage.

Administrators can first compress the volume capacity within the guest operating system, and then compress the virtual disk using the Hyper-V management tool or PowerShell. The capacity of the virtual disk to compress is equal to the capacity of the virtual machine volume compression. Note that the compression operation can only be done for the VHDX.

The online compressed virtual hard disk size is no longer demonstrated here.

This article is from the "Xu Ting blog" blog, make sure to keep this source http://ericxuting.blog.51cto.com/8995534/1588909

Hyper-V Server adjusts virtual hard disk size online

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.