A Gotcha with Remove-SCVMhost
I’m in the process of rebuilding my Hyper-V cluster (4 nodes, nothing major) and I’m using Bare Metal Deployment (BMD) with System Center Virtual Machine Manager 2012 SP1 (SCVMM) to do so – why would I use anything else?
During the rebuild of the second Hyper-V host I did something slightly out of order (I removed the host from the domain before removing it from SCVMM – no idea why I did it like that, must have a had a brain fart). By doing this the DNS entry for the host was removed, as it should be, and the host was powered down ready to be BMD’d from SCVMM. Realising my mistake I went in to SCVMM PowerShell and ran:
Remove-SCVMHost <HOSTNAME> -FORCE
I’ve done several times before however this time there was an error message basically saying: “Err… Can’t find it”. Odd.
I looked in SCVMM and sure enough it was still there. Now the definition of insanity according to Einstein is doing the same thing over and over expecting different results – according to him I’ve gone insane… Anyway I recreated the DNS entry for the host and reran the PowerShell command above – success.
Somewhat later in the day I had to move the SCVMM role from one cluster node to another – it wouldn’t start. Looking at event logs there were many .NET messages and buried in the messages was: VMM cannot find the Virtual hard disk object’ error 801. EH? Going to http://support.microsoft.com/kb/2756886 consequently solved the issue.
Moral of the story – do things in the right order.
- Bare Metal Deployment of Hyper-V Host from SCVMM 2012 RTM hosted in Azure IaaS (hmmconfused.wordpress.com)