Friday, March 24, 2017

A case of unkillable hyper-v snapshot

Well.. not really unkillable. Just hard to kill
After one-time backup with Backup Exec, our hyper-v machine became stuck with “backup” checkpoint. Which was undeletable from GUI (no delete button).
Well, first we needed to do – is to delete rogue snapshot. Powershell for the resque!
Get-VMSnapshot <machinename> |  Remove-VMSnapshot
Now we need to merge. Snapshot left .avhd disk behind, and our machine’s system disk is considered differencing. That’s no good.
Hyper-v manager -> Edit disk (actions pane)
Now we need to point master to the avhd and tell him to merge it with parent disk
After that was finished, my vm still thought that her disk was under migration, so i deleted it in VM settings dialog (not from disk! =)) and then added merged VHD as a new drive.
And that’s about it.
Hope it will be helpful to someone!

Tuesday, March 21, 2017

xLiveMigration

First draft of Hyper-v Live Migration resource for DSC
Eventually, I’ll try to merge it with xHyper-V module (if guys who wrote it will accept my code of cource), but for now I’ll put it there.
With this you can enable VMMigration and configure all its options
DSC FTW!

Tuesday, March 7, 2017

Create multiple VM's from CSV and assign IP addresses

The title sais it all

Basically i needed to deploy multiple VMs on 2012 r2 windows server - so i could'n use powershell direct to setup machines. Fortunately, I discovered this post - a neet way to assign IP to VM via WMI

Script itself is fairly straightforward - you can find it and description on gitlab