Tiny Deathstars of Foulness

A really neat new feature in 2012R2 is that Hyper-V can resize a running virtual machine (.vhdx) to the smallest possible size, while the virtual machine is running. To do so, use Get-VM in PowerShell. Here, we’ll use the -Path option to define the location of our vhdx, the -ToMinimumSize option to indicate that we’d like to shrink it down as low as we can go and -AsJob so it runs in the background: Resize-VHD –Path D:\myVM.vhdx –ToMinimumSize -AsJob

March 16th, 2014

Posted In: Windows Server

Tags: , , , , , , ,

The vhdx format provides support for 2 terabyte drives, can difference dynamic disks faster and provides more options for sector sizes. When upgrading into Server 2012, you can migrate your vhd files to vhdx files using Hyper-V Manager. To do so:
  1. Open Hyper-V Manager
  2. Click on the Action pane from the Action menu
  3. Click Edit Disk…
  4. At the Edit Virtual Disk Wizard click Next
  5. Provide the name of the location for the vhf file
  6. Click Next at the Location pane
  7. Click Convert at the Choose Action pane
  8. Click Next
  9. Click the vhdx format at the Choose Disk Format
  10. Click Next until the wizard is complete
You can also use the convert-vhd powershell cmdlet to covert these vhd files. It’s an easy powershell command to use. Simply  specify the source as your first positional parameter and the target as the second, as follows. convert-vhd V:\myvm.vhd V:\myvm.vhdx The fact that you can manage these from a script also opens up the ability to automate the conversion for a number of files concurrently.

March 14th, 2014

Posted In: VMware, Windows Server

Tags: , , ,