Hyper-V server (Server-Core) Live migration - Issues and Powershell as a savour!
So - in my little lab at Microsoft, I have 2 Hyper-V hosts, one running Hyper-V Server 2012 as a Server-Core installation and the other running the full Windows Server 2012 DataCenter with the regular GUI and a Hyper-V role.I had to move one VM from one machine to the other, because of performance differences between the harddrives in each machine, as one runs a single 7200 RPM SATA disk, the other runs 2 10.000 RPM drives and SQL server weren''t happy! I set up both machines for live migration, using the Hyper-V manager and thought "hey, let''s migrate and all is fine". unfortunately not. Even though both were configred for using Live migration, it failed with an authentication issue when using RSAT. After "binging" the issue for a while, it seems I weren''t the only one with this particular issue - and for most people firing up a remote desktop session into the hyper-v host itself and running the migration would work. It worked for the full Server 2012 installation, since it has the ability of running the hyper-v manager - however, on the server-core installation, the ability to using the manager locally is not an option. Looking on TechNet I found an article describing the usage of live migration, which also had a reference to the powershell script, which moves vm''s between vm hosts.
PS C:\> Move-VM T-KENC-SP01 T-KENC-HyperV02 –IncludeStorage –DestinationStoragePath C:\Vms
would do the trick, wereas T-KENC-SP01 is the name of the virtual machine, T-KENC-HYPERV02 is the name of the target Hyper-V host and C:\Vms\ is where the storage should be stored on T-KENC-HYPERV02.
It took some time moving the ~30gigabytes of data - but it seems to work perfectly! :)