IT tutorials
 
Technology
 

Windows Server 2012 : Managing virtual machines (part 3) - Optimizing virtual disks

4/23/2014 9:28:04 PM
- Windows 10 Product Activation Keys Free 2019
- How to active Windows 8 without product key
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

3. Optimizing virtual disks

Although both fixed-size and dynamically expanding virtual hard disks are supported in production environments, Microsoft still recommends in Windows Server 2012 Hyper-V that you continue to use fixed-size virtual hard disks to ensure that virtualized workloads on your production hosts do not run out of storage space.

Because dynamically expanding disks can automatically grow over time as data is written to them but do not automatically shrink when data is deleted from them, you might want to shrink such disks to reclaim unused storage space on the host so that you can allocate the reclaimed space to other virtual machines. And because fixed-size disks can fill up over time, you might need to expand such disks to make more room so that the guest operating system and applications can continue to perform optimally. Hyper-V allows you to perform different kinds of actions on virtual hard disks to help maintain or optimize their performance:

  • Compacting virtual disks This action reclaims empty disk space and reduces the size of the virtual hard disk. Such empty disk space is left behind when files are deleted in the disk. You should defragment the guest operating system before you compact the disk. Both dynamically expanding and differencing disks can be compacted; fixed-size disks cannot be compacted.

  • Converting virtual disks This action can be used to convert between different virtual hard disk formats (VHD and VHDX), between different virtual hard disk types (dynamically expanding and fixed-size), or both. During the conversion process, all data is retained and the guest operating system is not changed. You cannot convert dynamically expanding or fixed-size disks to or from differencing disks.

  • Expanding virtual disks This action can be used to expand the size of an existing virtual hard disk instead of creating a new disk and manually migrating the data. You can expand all types of virtual hard disks provided you have free storage space on the host.

  • Shrinking virtual disks This action is new in Windows Server 2012 Hyper-V and can be used to reduce the storage capacity of a virtual hard disk. You can shrink all types of virtual hard disks provided you have first freed up space in them.

Important

Shrinking a virtual hard disk

Before you use either Windows PowerShell or Hyper-V Manager to shrink a VHD or VHDX file, you should log on to the guest operating system and use the Disk Management snap-in to shrink the volume on the virtual disk you want to shrink.

There are also two actions you can perform only on differencing disks:

  • Merging differencing disks This action can be used to combine the changes stored in a differencing disk with the contents of its parent disk. You can do this either by copying the contents of the parent disk and differencing disk into a new virtual hard disk, leaving the two source disks intact, or by applying the changes contained in the differencing disk to the parent disk.

  • Reconnecting differencing disks This action is available only when you select a differencing disk and the parent disk cannot be located. If the disks involved belong to a chain of differencing disks, this action is available only if none of the disks in the chain can be found.

Important

Avoiding data loss

Do not compact, convert, expand, shrink, or merge a virtual hard disk when any of the following conditions apply:

  • The disk is associated with a virtual machine that has snapshots.

  • The disk is associated with a virtual machine that has replication enabled.

  • The disk is associated with a chain of differencing disks.

If you perform any of these actions under such conditions, data loss or corruption might occur.

Using Hyper-V Manager

You can use Hyper-V Manager to compact, convert, expand, shrink, merge, and perform other actions on virtual hard disks. The actions that are available to be performed will depend on the type of virtual disk you are selecting. To perform any of these actions, click Edit Disk in the Actions pane to launch the Edit Virtual Hard Disk Wizard. Then after browsing to select the disk you want to edit, you can choose the action you want to perform on the disk as shown in Figure 3.

Editing a virtual hard disk using Hyper-V Manager.
Figure 3. Editing a virtual hard disk using Hyper-V Manager.

Using Windows PowerShell

You can also use Windows PowerShell to compact, convert, expand, shrink, merge, and perform other actions on virtual hard disks. For example, you can use the Optimize-VHD cmdlet to compact a virtual disk, the Resize-VHD cmdlet to expand or shrink a virtual disk, or the Convert-VHD cmdlet to change the format version or type of a virtual disk. For help with any of these cmdlets, use the Get-Help cmdlet.

 
Others
 
- Windows Server 2012 : Managing virtual machines (part 2) - Optimizing network performance
- Windows Server 2012 : Managing virtual machines (part 1) - Optimizing workload consolidation
- Sharepoint 2013 : Configuring User Profile Synchronization (part 4) - Writing Back to Active Directory
- Sharepoint 2013 : Configuring User Profile Synchronization (part 3) - Importing User Profiles from Active Directory
- Sharepoint 2013 : Configuring User Profile Synchronization (part 2) - Creating the User Profile Service Application, Starting the Services
- Sharepoint 2013 : Configuring User Profile Synchronization (part 1) - Establishing Managed Accounts
- Sharepoint 2013 : A User’s Profile, The User Profile Infrastructure
- Microsoft Exchange Server 2013 : Email address policies (part 4) - Creating email address policies with custom filters
- Microsoft Exchange Server 2013 : Email address policies (part 3) - Focusing on certain recipients by using filters
- Microsoft Exchange Server 2013 : Email address policies (part 2) - Creating a new email address policy
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
programming4us programming4us
 
Popular tags
 
Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS