Azure Site Recovery for VMware VM´s now GA

Today was not only the day when Office 2016 for Mac was released but also the day when ASR for VMware and Physical was released as GA.


This is some awesome news for companies that want an easy way to create a DR plan and site for their most important systems and not only for those lucky guys that already run Hyper-V and can utilize Hyper-V replica.

I did some evaluations for a presentation about ASR for VMware VM´s when it was in preview and it requires some additional VM´s for management of the replication such as the process server and on the Azure side, Master target and config server. If you like me evaluate this with an MSDN Azure subscription, be sure to shut down the servers on the Azure side when not using it as it otherwise will drain your money :-) , that of course should not be done when in production. It uses when protecting Windows workloads the built in VSS to create consistent replicas.


And the supported OS´s are the ones supported in Azure:

  • Windows 2008 R2 SP1
  • Windows 2012
  • Windows 2012 R2

So if you still use Windows 2003 and earlier OS then you need upgrade before utilizing this.

TechDays Session: Managing your Azure workloads with Chef and PS DSC

Are you possibly going to the TechDays Sweden this autumn ? Me self and my friend and former colleague Fredrik Nilsson will have a session on this conference about automation and how to use Chef and PowerShell DSC for your deployment.

Screen Shot 2015-06-24 at 10.20.32
This session will focus on how Chef, a systems and cloud infrastructure automation framework, can manage both Windows and Linux workloads on Azure or any physical, virtual location no matter the size of the infrastructure easily.

We will also look at how Chef can interact with PowerShell Desired State Configuration to deliver a consistent and compliant infrastructure. In this session you will learn the basic paradigms of Chef, launching VM instances and deploying applications to these instances. It is DevOps times now with a faster and agile world where the IT-Dinosaurs will have to watch out! 


New sponsor: VirtualMetric – cool monitoring and reporting for hyper-v

I am very proud to tell you that I have a new sponsor on my blog and that is VirtualMetric.

Have you not heard about them then it is time to go and check out their website at to learn more because they have an awesome monitoring and reporting platform for your Hyper-V environment!. It is agentless and it also reports Hardware status for the hosts via IPMI.


There will be a more thorough post about how to get the platform up and running and how to use it later on!

Nanoserver TP2 ( Winserv 2016) running in Azure IaaS

I have been evaluating Nanoserver that was released and wanted to try if I could get it to work in Azure IaaS as a VM. And as you can see, it works!!

Screen Shot 2015-06-10 at 12.51.55

I had created a VHDx with the packages that was described on the “getting started with Nanoserver” So first of all as only vhd is supported I had to convert the disk and then I used Azure PowerShell to upload it to Azure storage:

Screen Shot 2015-06-10 at 12.59.37

After creating a VM I tried to connect to it from remote over the Internet but that did not work, probably something that needs to be configured with winrm setup on the Nanoserver or I just missed something. I created a VM with Winserv TP2 in the same Azure network and tried to connect to the nanoserver which succeeded:

Screen Shot 2015-06-10 at 13.06.11

And I can also change name and it reflects on the Azure portal:

Screen Shot 2015-06-10 at 13.39.38


Screen Shot 2015-06-10 at 13.40.18

Is this cool or what?!



Hyper-V Cluster Heartbeat for MDT ref VM goes bananas or?

I have been helping a customer with their environment and we had a problem that took me a while to figure out.

They were baking reference images for their SCCM environment and the best and easiest way is to use VM´s of course. The problem that occurred was that when the image was being transferred back to the MDT server the VM rebooted after half of the image had been uploaded….

So what was doing this crazy behavior? It took me a little while before I realized what it was all about and it had to do with the Hyper-V cluster platform and resilience and heartbeat functionality!

So at first the build VM boots from the MDT image, no integration tools yet then but then it restarts to install applications and stuff within the OS and as the customer works on a Windows 7 image you can see it starts to send heartbeat to the host.


As you might know, clients and servers since Windows Vista and 2008 have integrational services by default in them although best practice is to upgrade them as soon as possible if the VM shall continue to reside in Hyper-V.

The interesting part in this case was that the OS rebooted within itself when it was finished with sysprep to start the MDT image for transferring the WIM back to the MDT server and the cluster/hyper-v did not notice this and thus it thought that the heartbeat stopped.


And as it was a cluster resource this heartbeat loss was handled by default, and guess what, rebooted!

So what settings in the cluster resource does this madness? First of all, the Heartbeat setting on the cluster vm resource properties



This can be read on the technet site about Heatbeat setting for Hyper-V clusters:

Screen Shot 2015-06-04 at 10.35.22

And then you have policy what the cluster should do after it thinks the vm has become unresponsive:

Screen Shot 2015-06-04 at 14.14.56 1



There are different ways to stop the cluster from rebooting the machine and one of them is to disable heartbeat check and another is to set the response to failure to do nothing,

The customer uses mostly VMM console and for them when building a new VM for MDT reference builds they can set the integrational services to disable heartbeat check and thus not get their work postponed by unwanted reboots.


During the search for why I checked Host Nic drivers as I thought that it might have something with a transfer error but could not find anything, positively the hosts got up on the latest nic firmware and drivers 😉 . My suspicion that it had to be the cluster was awaken after I had spun up a test VM that was not part of the cluster and that one succeeded in the build and transfer.

This is a rare case and I would say that in 99% of the cases you want the default behaviour to happened as a VM can become unresponsive and then the cluster can try a reboot to regain into operations..

Clarification: If you spin up a VM with a OS or pxe image that does not have integrational services it will not reboot the VM after the cluster timeout, the OS has to start sending heartbeat to the Hyper-V host and then it will be under surveillance and managed by the cluster until properly shut down!

Hope that this helps for someone out there wondering what happens…



Taking the SCVMM 2012 R2 UR6 for a test drive

Noticed this evening that Microsoft released the UR6 for System Center and my interest is in Virtual Machine Manager so I wanted to test-install it  and also connect to an Azure IaaS subscription as this was one of the new added features besides all fixes and also of course the other added feature with Generation 2 Service template support etc.

Screen Shot 2015-04-28 at 20.15.14

Here you can read more about the fixes and also if you do not use Microsoft Update, download the files.

As I had my environment connected to the Internet I could press install,

Screen Shot 2015-04-28 at 20.18.03

Once it was finished a reboot of the server had to be done and I could start to add Azure subscriptions to VMM. Here you have to use a management certificate and that is easily created with makecert if you do not have any other CA available!

Screen Shot 2015-04-28 at 20.59.47

And when that is complete you can see my VM´s in Azure on the subscription and the commands that I can use on them,

Screen Shot 2015-04-28 at 21.03.15

Good luck in your tests of this nice new feature.


Watch out, extended OS disk in Azure IaaS VM makes it not bootable

After a week of Azure Ninja course at Microsoft Sweden I wanted to dig a bit deeper into Azure IaaS.

I found that the Update-AzureDisk had a new parameter that looked interesting -ResizedSizeInGB and I wanted to test that one in real action on the OS disk which resulted in a VM that could no longer be started :-(. As described in an earlier post it was a bit more difficult to extend a vhd for a VM in Azure before this powershell way and in those days you had to tear down the VM and throw it away and also the pointer to the blog and after that you could with a tool extend the blob.

Screen Shot 2015-04-23 at 17.22.03

So far it looked good but when I then tried to start the VM I got the error

Screen Shot 2015-04-23 at 18.43.57

This VM was provisioned from the gallery and after reading the blog about the changes in Azure and that the OS disk now could support 1 TB in size i also found this little text saying that it only applied to disks that was migrated to Azure and not the gallery items or already provisioned VM´s…

Screen Shot 2015-04-24 at 14.56.10

So I wanted to test the same thing as above for a migrated vhd, first of all I created a vhd on-premise with 140GB vhd and then used powershell Add-AzureVhd to upload it.

Screen Shot 2015-04-24 at 14.33.45

after that I created a VM and started it with no problems :-)

And then I ran the above resize parameter on this uploaded vhd to extend it to 150GB. With the PowerShell cmdlet I can apply this to a VM that is not running and do not need to remove any relations to the blob or VM´s.

Screen Shot 2015-04-24 at 14.33.22

Started it and as you can see it worked nicely

Screen Shot 2015-04-24 at 14.58.39

Here you can see when looking inside the VM and checking the Disk manager it shows the extra 10 GB

Screen Shot 2015-04-24 at 14.32.34

So watch out if you test to extend your Production VM´s VHD´s depending on where they have come from, although an OS volume does not need to be too large..

I have tested the Update-AzureDisk -ResizedSizeInGB on VM Data disks without any issues no matter if they were created or uploaded so this warning just points at the OS disk!

Playing with the Azure VM agent and changing user on IaaS VM with PowerShell

I am at a Azure training at Microsoft and have been playing a bit with both the portal and PowerShell.

We where talking about the VM agent that is installed on the IaaS VM´s and what functionality it has.

There is a nice and powerful feature that allows you to reset the password for the user from the Azure PowerShell console. The cool part is that you also can change the user on the VM so if you have to take over a Azure IaaS deployment and do not know the username or password for the virtual machines you can change it!

from Keith Mayers blog post I used the PowerShell code and changed both password and username for a user

So first of all in my Windows 2012 R2 I have a user vniklas and I want to change it to Bruno, but as I said above you do not have to know the username that is set inside the VM´s to be able to change it!

Screen Shot 2015-04-20 at 16.33.09

And I use PowerShell to set a credential with username and password:

Screen Shot 2015-04-21 at 10.14.56

And the following change both user and password, updates the VM and then to actually get it to hit on the VM I need to restart the VM:

Screen Shot 2015-04-21 at 10.24.11

And when you then try to use RDP in to the VM you need to use the new password and username and as you can see on the Local Users the account have changed to bruno instead.

Screen Shot 2015-04-20 at 16.21.53

Here is the PowerSHell code to get this to work:

And now as you see that this is so easy you can realize that your Azure subscription account becomes quite important to keep safe and not let anyone get access to it.

May the force be with you!

Exclude VM´s from dynamic optimization in SC VMM

In a case where we had a VM that was a bit sensitive with an application that does not like the ping loss during live migration between hosts in a cluster we wanted to exclude the vm from the automatic dynamic optimization. It might not be totally clear where you find this setting for the VM´s you want to exclude from this load balancing act.

First of all, do you know where you set up automatic dynamic optimization in System Center VMM 2012 R2? For some reason you set it up on the hosts folder and not on the cluster object in VMM:

Screen Shot 2015-04-16 at 13.00.13


So where do you exclude VM´s from this optimization? If you look under a VM´s properties you can check the actions and there you see the magic checkbox :

Screen Shot 2015-04-16 at 12.55.35

And now when the automatic job runs my sensitive VM will stay on the host.

SC VMM Error 803 after restoring a duplicate VM with alternative name

I was at a customer today testing some backup/restore scenarios with their backup providers software and where we got an interesting error: 803 “Virtual Machine restore-Test5_gen1 already exists on the virtual host other cluster nodes” Recommended Action: “Specify a new name for the virtual machine and then try the operation again”



In the Backup/restore console we wanted to do a restore to alternative place and an alternative name as we had not deleted the original VM (for instance if you need files or just verify some state or something), in the configuration of the restore job we checked that the restore process would create a new VM Id which was the first thing we thought that was why VMM complained.

The thing was that this error only appeared when we did a restore to another hyper-v host, if we restored to the same where the original VM was residing there was no error..

As you can see after the restore both the original VM and the alternate had the same “#CLUSTER-INVARIANT#” id but different VMId´s, and when we tried to refresh VM´s we got the error above.

Screen Shot 2015-03-30 at 20.56.59

The solution was not so farfetched and can be read about in the KB2974441 although that case is about RDS VDI but still, and as can be read about why the ID is in the notes field from the beginning: “VMM adds a #CLUSTER-INVARIANT#:{<guid> } entry to the description of the VM in Hyper-V. This GUID is the VM ID SCVMM uses to track the VM.”

For the VM not showing up in VMM console we just went into the notes field on Hyper-V Manager and removed that specific “#CLUSTER-INVARIANT#” id and after that VMM generated a new for that VM and it appeared in the VM list on the VMM server.

So why was it no problem when we restored to that same host? For some reason VMM managed to see the duplicate residing on the same host and generate a new id in the notes field for that and thus appearing in the VM list without any massage..