Waclaw Chrabaszcz
... there is no spoon ...

Hyper-V & PowerShell – How to create a VM with a differential disk

Friday, April 17, 2015 9:33 PM

How many times you have to create a VM to test something? How many times you have to watch OS installation progress. Enough! All you need is to create a differential disk to your golden image and spin it. There is another advantage of differential disk. You can create a pseudo strip and keep master image on one drive (SSD) and differential disks on other hard drives. I like this setup for my R&D games. It saves a lot of storage and improves VMs performance. Ad of course I can repeat something again, again and again …

$myVM = "SQL2012"
$myNetwork = "Internal"
$myVHDpath = "D:\Hyper-V\$myVM\$myVM.vhdx"
$myParentpath = "C:\Users\Public\Documents\Hyper-V\Virtual hard disks\Server2008.vhdx"

$myVHDX = New-VHD -Path $myVHDpath -ParentPath $myParentPath -Differencing
$myVM = New-VM -Name $myVM -MemoryStartupBytes 1GB -VHDPath $myVHDpath
$myVM | Get-VMNetworkAdapter | Connect-VMNetworkAdapter -SwitchName $myNetwork




Feedback

# re: Hyper-V & PowerShell – How to create a VM with a differential disk

How many times you have to create a VM to test something? How many times you have to watch OS installation progress.takeout near me Enough! All you need is to create a differential disk to your golden image and spin it. There is another advantage of differential disk. You can create a pseudo strip and keep master image on one drive (SSD) and differential disks on other hard drives. I like this setup for my R&D games. It saves a lot of storage and improves VMs performance. Ad of course I can repeat something again, again and again … 2/8/2018 12:12 PM | AnnG

Post a comment