3 Ways To Deal With Lingering Hyper-V Checkpoints Formerly Known as Snapshots

Excellent write up, I have always used option 3, but as the author says its better to use 1 and 2 first!

Working Hard In IT

Lingering or phantom Hyper-V checkpoints or snapshots

Once in a while the merging of checkpoints, previously known as snapshots, in Hyper-V goes south. An example of this is when checkpoints are not cleaned up and the most recent avhdx or multiple of these remains in use as active virtual disk/still even as you don’t see them anymore as existing in the Hyper-V Manager UI for example. When that happens you can try looking at the situation via PowerShell to see if that show the same situation. Whatever the cause, once in while I come across virtual machines that have one or more avhdx (or avdh) active that aren’t supposed to be there anymore. In that case you have to do some manual housekeeping.

Now please, do not that in Windows Server 2012(R2) Hyper-V replica is using checkpoints and since Windows Server 2012 R2 backups also rely on this. Just because…

View original post 539 more words

Advertisements

VMM 2012 – missing VMs do not appear in VMM console

In VMM 2012 situations may arise where a VM is no longer visible in the VMM console, note that I am not referring to a VM that is present but in a ‘missing’ state, that is something different.

VMM relies heavily on the SQL backend. If something is missing it could be caused by a duplicate VMID as it was in my case.
Firstly, find the VMID of the VM that is missing, you can find this by looking at the XML file of the VM.
Then do a search via powershell on the VMM server for the VM:
Get-SCVirtualMachine -ID VMID
If this comes back with error 801 then the VM could exist already in the database.
locating the VM is difficult. Try searching for the hostname of the VM:
get-SCVirtualMachine | Where ComputerName -eq Hostname
Examine any VMs that are returned. If this is an environment where cloning takes place on a regular basis, then it could be that an improperly cloned VM has somehow retained its original VMID, or it could be a library object. Finding and removing the missing/orphaned culprit will fix the issue.

VMM 2012 | Modify VLAN on Network Site

The VMM GUI is great at restricting what you can and can’t do, there are times when you need to change a Network Site VLAN when that network site is already linked to a VMNetwork that is already in use by Virtual Machines and/or Hyper-V host vNICs.

Luckily there is usually a way around the GUI. Enter Powershell.

 

The script can be found here:

http://powershelltaskforce.com/2013/08/changing-vlan-for-a-network-in-system-center-vmm-2012-sp1/#comment-404

Big thanks to Niklas Akerlund who wrote this one.

VMM 2012 Error 1604 | Using Powershell to connect to VMM with custom Credentials

This little command allows an administrator to connect to the VMM using powershell, normally this is as simple as launching the “Virtual Machine Manager Command Shell” from either the start menu or from within VMM, however there are times when an authentication problem may prevent this from happening.

To connect using powershell we have to pass credentials through. The easiest method is to use the following commands:

 

$Cred = Get-Credential -Credential username

Get-SCVMMServer VMMServername -UserRoleName ‘Administrator’ -Credential $Cred

 

The above command will allow you to connect to VMM using powershell, this can be useful when you are faced with error 1604 “account is not a member of a valid user role…”