Hyper-V

Lately I’ve been standing up more and more Hyper-V hosts – I’d estimate my environment is 80% virtual at this point with a total of 20 servers.

I had one remaining XenServer with about 4 VMs running on it. I wanted an easy way to move these VMs to Hyper-V. I tried using the XenCenter GUI to export to a workable format but that kept failing – unfortunately I don’t have any screenshots since this was done a while ago so the exact errors escape me.

This was tested on XenServer 5.6

My process was:

Decide where to export the converted virtual machines to. I opted for an SMB share on a NAS, but you can easily adjust to save to a USB drive or to local storage, if you’d like.

The scenario that started my day: One of my programmers complains of time-drift on his workstation. His machine has synced to a VM domain controller, which is odd, since it’s not the PDC, doesn’t hold any FSMO roles…I’ll figure that out later.

I recall reading about the time synchronization integration feature that Hyper-V has, and the problems it can cause with VM time settings. I want to query my Hyper-V server and see if the feature is enabled for any of the VMs.

Lately I’ve been looking into more and more automation – the sentiment of “Work smarter, not harder” comes to mind. If you’re a Windows admin, this means your gonna have to crack your knuckles and launch into Powershell.

For some time I’ve dreamed of being a Powershell guru – I’ve always been jealous of the guys who bang out amazing one-liners in bash, creating miracles in strings.

Sure, I’ve “scripted” a bit. I know many can relate to this: putting scripts together can be a collage-type experience; that is, Googling each piece and pulling snippets from the various resources, a little regex from StackOverflow, some modification followed by trial and error from a Technet thread, a random tool pulled from some guy’s blog.

But more and more I want to learn the tools and syntax so I can do things my way first and only ask for help later.

I’ll assume:

You already have RSAT tools installed/enabled on whatever machine you’re connecting from

You understand the terrible oversight of Microsoft to only allow 2012 management tools to be installed on Windows 8.

Additionally, these tools don’t allow backwards compatibility, so if you’re still using a 2008/2008 R2 HV server, you’ll need Win 7 or Server 2008 to connect via a GUI or cmdlet.

My goals:

Find all servers which have time sync enabled as a Hyper-V integration feature.

Just came across an issue in Hyper-V: I was making changes to a network adapter’s binding in Hyper-V manager under the Virtual Network Manager when MMC crashed, closing out Hyper-V manager. Upon reopening, trying to bind the virtual switch to an External Adapter resulted in the following error:

[Window Title]
Virtual Network Manager

[Main Instruction]
Error Applying New Virtual Network Changes

[Content]
Setup switch failed.

Cannot bind to ‘HP NC373i Multifunction Gigabit Server Adapter #8’ because it is already bound to another virtual network.