I have a Win 2008 R2 Core SP1 Hyper-V in my VMM 2012 SP1 UR2 and wanted to test if this was still an issue. The main reason for upgrading to the WMF 3.0 is the rebuild of the vmm refresh that is described in this blog post.
First I just tried to run the install file for WMF 3.0 and got the following dialog, and after reading a bit more realizing that it was because I need the .Net 4 as a prerequisite.
I have had a lot to do and that is why I have not done so much updating on the blog, soon my third article will be published on Petri IT Knowledge 🙂 I have also attended the MMS in Las Vegas where I got loads of good information and meet lots of people!
In this post I want to show you the improvements in Windows 2012 and with the PowerShell native cmdlets in this version.
The task was to automatically create 2016 DHCP Scopes for clients on a DCHP server and every scope was a /29 net with 3 lease addresses and one router for each.
I tested this on a Windows 2008 R2 with the community powershell module and with the following script it took, and I am not kidding, almost 5 hours!! the module utilise the net sh commands with dhcp and probably there could be a lot of improvements for performance, and seriously, just creating one or two scopes can be done in the gui but doing over 2000 will demand a scripted way!
I have described before in blog posts about how to add a running VM to a Hyper-V failover cluster with the PowerShell cmdlets without moving it or turning it off, asuming it already was on a highly available storage such as a CVFS volume or smb 3.0 file share
In my exploration of the virtual machine manager PowerShell module I wanted to test and see if this was also possible in there but I do not succeed, or more correctly maybe should be noted that the SCVMM team has not implemented that for this release 🙁 what has been implemented is the possibility to make a VM highly available when moving between datastores on a cluster node or from a single hyper-v host to a cluster node. As there is some copying of data it will also take longer time than the below command.
In Hyper-V with failover cluster PowerShell module I can add a VM to the cluster with the following cmdlets without stopping the VM.
As you see, the reason why I have added the Hyper-V to the cmdlet is that because in the VMM PowerShell cmdlet there is an alias that is called Get-VM and refers to the Get-SCVirtualMachine and that conflicts with the Hyper-V PowerShell module´s Get-VM and I have imported both modules in the same console. I have also imported the failover cluster module in the same console.
If I try to use the Set-SCVirtualmachine vmtest -HighlyAvailable $true I get the following error.
In the VMM Console this option is also greyed out and cannot be set.
Here is the command to move the VM from one datastore to another and in the same time making it highly available,
I have made a blog post about the issue with Move-SCVirtualMachine not updating the cluster resource and this can be a way to handle this but in my opinion a far more complicated way as you have to move the VM to a new datastore and removing the high availability and then moving it again to another datastore and making it high available again, with a large virtual machine this can take some considerable time when it otherwise just is to run the cluster cmdlet.