Archive

Archive for the ‘Win2012’ Category

Automated PowerShell to keep your template vhd(x) IC updated

March 31st, 2014 No comments

For the Veeam Seminar I did some digging in how to check and also apply updated integrational components on virtual disks in the System Center VMM library and found Ben´s script which I altered to fit my goal. This is quite convenient based on that you can schedule it and always have updated IC´s on those VHDX in the library.

I check and get the current IC´s from one Hyper-V host and thus based on that if it has been updated I also get that update instead of using a copied IC version locally in the VMM server. The script runs on the VMM server and that is why I use the Mount-DiskImage cmdlet instead of the Mount-VHD as that does not work on a non-hyper-V enabled windows server.

Screen Shot 2014-03-30 at 10.42.33

 

 

 

Windows Server 2012 R2 SOFS with tiering require some disks..

March 2nd, 2014 No comments

I was at a meeting last friday and they where in the process of deploying a Scale Out File Server environment on Windows Server 2012 R2 and that with a Dell jbod box.

MD1220_2

One important thing to consider when designing this is that if you want to use all the features in the new 2012 R2 with storage spaces there are some limits that could imply and affect your design.

If you want the new cool performance intelligent storage tiering in 2012 R2 that can only be used with either simple or mirroring protection on the physical level which result in quite an overhead on disks in your jbods to get some TB for the actual data. If only the deduplication feature would have been supported with server workloads and not just VDI setups, then this would not have been such a big deal.

Screen Shot 2014-03-02 at 08.52.51

Setting up your environment based on this would require some planning and creating several different storage selections where not everything stored on your superperformance auto-tiering parts of your SOFS. Maybe your budget would allow you to fill the JBOD with only SSD´s and then this is no problem :-) but if not you should at least consider creating several different shares where the virtual disks either have storage tiering with mirroring or a plain disk with parity.

I would love to see some development in the SOFS storage integrated with Hyper-V in the same manner that VMware has with their Storage-DRS that could, based on different workloads and their load on different VHDX, be moved between the different datastores not just the tiers. This could be even more refined when adding a StorSimple box and the data that has not been accessed for a while would be offloaded to Azure.

stokage-cloud-StorSimple-Microsoft

Yes I know the StorSimple hardware needs a refresh in their NIC connectivity (in the current boxes there is a 2*1 Gbit active) but hopefully we will see some new hardware in a not to far future. And in an solution where the StorSimple box would be used and connected in a SOFS cluster together with JBOD´s the network bandwidth would not have such a large impact.

 

 

Categories: Hyper-V, Virtualization, Win2012 Tags:

Wait! Are you going to migrate your old legacy VM´s?

February 9th, 2014 No comments

So I have in several posts described different ways on moving from one hypervisor to another with your VM´s. There are several different choices when it comes to the transitioning phase, some more automated than others.

iStock_000016604674XSmall-300x199

But wait!! Yea I know the virtualization is Gods gift to the IT but it also carries some responsibilities. The technique gives you as the IT admin the possibility to run old legacy operating systems almost forever.

One big thing in the Move projects is to also take into account if the workload running can be upgraded within the OS, not just moved to another virtualization platform. Surely you do not want to describe on your CV that in your last employment you had Windows 2003 Servers as Domain Controllers for instance. Compare it with VHS, do you still watch movies and record stuff on the 80/90´s system?

Tangled video tape

First of all you can use the Microsoft Assessment and Planning toolkit to analyze what of your workloads can be upgraded ( I know, it does not look at your third party server applications that needs some brushing of and upgrading also)

When you have analyzed and got some workloads that can be migrated then check out this page on what tools and wizards you can use to actually smoothen the process for those windows roles and features running on your old and soon to be unsupported OS to an new version! As you can see below, Windows 2008 R2 is coming to the last date of mainstream support!

win2008r2e

Yes I know that this often can be a quite burden on the IT department to carry out this kind of transformation projects and for several company-critical applications this can also become a serious cost that someone has to approve or maybe decide to decommission if they live outside of the support window!

Categories: General, Virtualization, Win2012 Tags:

SCVMM VM property dialog crash console with missing vhd(x)

January 14th, 2014 No comments

Today I was at a customer and they had an interesting error in their virtualization environment with Hyper-V 2012 and SC VMM 2012 Sp1 (yes I know, it is not R2 but we are working on it). One of their Hyper-V hosts had a hardware memory failure which lead to the host crashing and the VM´s restarting on other hosts..

during this the VM´s that was on that host got an error in the VMM db, looking and handling the VM´s from Hyper-V manager or failover cluster manager was no problem. Every time we tried to refresh the VM´s showed the following error and the job did not succeed.

Screen Shot 2014-01-14 at 14.36.51

And when we tried to look at the properties on the VM from VMM the console just died, and that happened every time..

Screen Shot 2014-01-14 at 14.28.50

So how could we find the VM´s that was suffering from this, well PowerShell could be used and with the following we could get the amount of VM´s and also easily get a list of the VM´s names.

Screen Shot 2014-01-14 at 13.26.15

So how could we fix this then,

There is a cmdlet in VMM with a parameter that can be used,  Remove-SCVirtualMachine -Force , this will remove the VM but not the virtual hard disk as it cannot find it..

Screen Shot 2014-01-14 at 16.20.21

But because we want to keep the VM we will do a bit of a workaround

  1. Stop the vm in VMM  by Stop-SCVirtualMachine own01  (even if the vhd(x) is not seen by VMM it will shut down the actual VM)
  2. Remove the VM from the cluster in Failover cluster manager or with powershell (this will only remove the cluster instance but not the actual VM)
  3. Start the VM in Hyper-V manager or with PowerShell  Get-VM own01 -ComputerName HV01 | Start-VM
  4. Remove the VM from the VMM with Powershell using the -force  Get-SCVirtualMachine own01 | Remove-SCVirtualMachine -Force (as I have removed the VM from the cluster VMM cannot find it and delete the vm´s xml file etc)
  5. Add the running VM to the cluster again with hyper-V PowerShell and failover cluster powershell using Get-VM own01 -ComputerName HV01 | Add-VMToCluster (Get-Cluster HVCL30)
  6. refresh VM´s in VMM and see that now the own01 vm can open properties

The reason I start the VM after removing it from the failover cluster is that VMM should think it is in stopped state, because that makes it easier to remove! And as in Hyper-V 2012 I can add a running VM to a cluster I do not have to keep the VM shut down during the whole process but just to get it into the right state in VMM :-)

Not the easiest way but hey who had said that VMM was self-healing :-P And yes we are in the process of upgrading to R2 and hopefully this error will not reemerge in that version….

 

Creating Hyper-V 12 R2 Cluster from Windows Server 12/VMM

January 10th, 2014 1 comment

I got a question about an error that occured when creating a Hyper-V 2012 R2 cluster from VMM 2012 R2 and the errorlog stated the following:

“Error (25325) The cluster creation failed because of the following error: An error occurred while performing the operation.. “

In the troubleshooting I found that the VMM 2012 R2 was running on a Windows Server 2012 Standard (which is fully supported). But as VMM uses the failover cluster cmdlets from the OS where installed it fails creating the R2 cluster as it is not supported to manage Windows 2012 R2 from a Windows 2012.

looking at the technet article regarding Server Manager it has a good table about support:

Screen Shot 2014-01-10 at 13.53.35

 

I have done some upgrades from VMM 2012 SP1 to 2012 R2 and have always in that process changed the operating system first to the latest version so this issue has not appeared for me before.

Testing to create a Hyper-V 2012 R2 cluster from a windows 2012 failover cluster manager gives the following error :

Screen Shot 2014-01-10 at 14.12.35

Categories: Hyper-V, SCVMM, Virtualization, Win2012 Tags:

New version of Convert-WindowsImage.ps1 that support Gen2

December 30th, 2013 No comments

So I noticed that the awesome Convert-WindowsImage.ps1 PowerShell script has been updated to version 6.3 and published during the Christmas holidays. The script is maintained by Microsoft Consulting Services and was originally created by Mike Kolitz.

I really like this script and have used it alot when creating new VM´s and I have been awaiting an update to support the Generation 2 VM´s with UEFI boot.

Here you can see that I have added the parameter -VHDPartitionStyle GPT to use for the generation 2 VM

Screen Shot 2013-12-30 at 21.59.28

You can find the script here.

 

Categories: Hyper-V, Powershell, Virtualization, Win2012 Tags:

Make running VM highly available in VMM 2012 R2

December 20th, 2013 No comments

So I was helping a customer to migrate a VMware VM to their Hyper-V environment that is managed with System Center VMM, As I described in an earlier post I had some things that I did not like in the built-in v2v conversion that is part of the VMM.

In this migration I used Double-Take Move and this is a really nice software from Vision Solutions that allows you to migrate a running VM and will only get a few minutes downtime during the failover :-). The great thing is that the VM is replicated to the hyper-v host directly and you get a synthetic NIC and also a VHDx virtual disk.

There are though some small things that need to be considered and Double-Take does not do the whole part when used separately, when using it with Vision Solutions system center integration toolkit we can automate these things too, but for migrating just a few VM´s that is a bit of overkill. So what do we need to take care of,

  • DT does not set VLAN on the nic for the migrated VM, that can be done during the replication in VMM when the newly provisioned VM appears there and set the right vm network and bandwidth etc.
  • DT does not make the VM highly available during the migration, it can be deployed on the Clusterstorage volume though.
  • DT does not remove VMware tools during the migration so that has to be cleaned up after.
  • DT does not update/install the Hyper-V integration components.

So now to the main focus for this article, when the VM has been migrated to Hyper-V, how do I configure it to be highly available? When looking in the properties of the VM on VMM that option is greyed out

Screen Shot 2013-12-20 at 12.56.41

And trying to add it through the PowerShell cmdlets in VMM gives the following error message:

Screen Shot 2013-12-20 at 14.50.46

So the way to do it is with the Hyper-V and failover cluster cmdlets instead:

Screen Shot 2013-12-20 at 14.58.34

And then when refreshing the VM in VMM you can see that it is now highly available :-)

Screen Shot 2013-12-20 at 14.21.48

The workaround option that is available in VMM to be able to make the VM highly available is to do a Live Storage migration to another CSV Volume/SMB share and in the wizard check the box for making it highly available but that involves file copying and goes painfully slower than the Add-VMToCluster on the running VM that already resides on a shared storage volume.

Screen Shot 2013-12-20 at 15.36.05

And this also (at least in my test environment) creates a copy cluster resource that has to be cleaned up manually cause the real one is running..

Screen Shot 2013-12-20 at 15.53.40

Categories: Hyper-V, SCVMM, Virtualization, Win2012 Tags:

Passed exam 74-409 today!

December 16th, 2013 3 comments

Today I was in the mood to take a Microsoft exam and as MSFT so generously gives a cert voucher for free it was not so much to argue about :-)

I already have the MCSE : Private Cloud

But now it was time for Microsoft Certified Specialist: Server Virtualization with Hyper-V and System Center (exam nr 74-409) and this exam reflects and measures the latest releases from Microsoft in Windows Server 2012 R2 Hyper-V and System Center 2012 R2.

The skills being measured can be found here.

I have some knowledge in the subject and have done some implementations before and also had the previous title MCITP: Virtualization Administrator so I thought it should not be too hard, as always some questions have to be read more than once before choosing the right answer.

I used Marius collection of study tips and also the Microsoft Virtual Academy that with registration gives you the free voucher

Good luck in your free tryout :-)

 

 

Categories: Hyper-V, SCVMM, Virtualization, Win2012 Tags:

Password dump from a Hyper-V Virtual Machine´s memory

November 29th, 2013 2 comments

So earlier this week the twitter flow went bananas when Remko did a blog about how to extract the password in clear text from a VMware vmem file with the add-on from Benjamin, Mimikatz that extends the windebug.

I wanted to test if it works also in Hyper-V and it is not so much difference, the main difference is how to create the dump file and here I use the vm2dmp (thanks to Yusuf for supplying me with a vm2dmp.exe that works with 2012!!) with the right switches, in this case the VM is in saved state but you can also use snapshots or just the vsv and bin file.

Screen Shot 2013-11-29 at 16.33.16

And then when importing the dump into the windbg I can with the commands get the password for the user that was logged in on the Win 7 VM

Screen Shot 2013-11-29 at 15.26.19

I have tested this on a Windows 7 virtual machine and also on a Windows Server 2012 R2 virtual machine both running on Hyper-V 2012. This highlights the importance once more that it is crucial to make sure that only the right people have access to the virtualization hosts and the storage where the VM´s resides!

Categories: Hyper-V, Security, Virtualization, Win2012 Tags:

Bug in VMM 2012 SP1 disconnect VM nic after cold migration?

November 9th, 2013 1 comment

Yesterday I was at a customer and working on configure their off site Hyper-V cluster. I was setting up live migration settings to be able to do shared nothing live migrate the VM´s between the data centers. I was  setting up kerberos authentication and also delegation in the active directory but did not think of the 10 hours (600 minutes) time that a kerberos ticket could live and got some errors regarding constrained delegation, as it says if reading a bit more carefully in this technet page on how to configure live migration outside of clusters  :”A new kerboros ticket has been issued. ”, I did not think of this at first and checked the hosts settings and the active directory objects twice :-P but it did not work and I did not think of the time….  If you want to purge the kerberos tickets you can use the klist command line tool.

Well during the error search I had to test to do a cold migration from SC VMM between the clusters and that looked like no problem at all. It should also be said that both clusters was configured with the same logical network, vm networks, logical switch and uplink so it was the same conf! SC VMM have been updated with the latest CU 4.

When the VM had been migrated i started it and tried to ping the IP address but got no response.. strange I thought, looked in VMM on the properties on the VM and it said that the network card was connected:

Screen Shot 2013-11-08 at 14.42.38

But still inside the VM it said not connected,

Screen Shot 2013-11-09 at 08.33.35

And then going into the Hyper-V manager and looking at the VM´s properties from there I could also see that it was not connected. I did a VM refresh also in VMM but it did not change the connection status on the VM object to reflect the status as the screen dump below from the properties in the Hyper-v Manager:

Screen Shot 2013-11-08 at 14.42.09

Once I connected it to the (logical) virtual switch on the host with Hyper-V Manager it started to respond to ping of course.

I will continue to exam this further and maybe it has been fixed in the VMM 2012 R2.

 

Categories: Hyper-V, SCVMM, Virtualization, Win2012 Tags: