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 http://www.virtualmetric.com 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.

vm

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.

workingheartbeat

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.

lostcom

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

hearbeatsetting

 

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.

VMM-VMSettings

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…

 

 

Microsoft Ignite Sessions to watch part 1

I have been quite busy after Ignite but wanted to share with you what sessions I attended and the recordings for those so you can watch them. There were some better quality sessions and I will try to guide you to them. My interest was of course Hyper-V, Nanoserver, Docker, Azure, Automation, System Center, Storage….

Monday

First of was of course the keynote https://channel9.msdn.com/Events/Ignite/2015/KEY01

Then I went to the foundation session “Bring Azure to your datacenter” with Jeffrey Snover and Mark Russinovich https://channel9.msdn.com/Events/Ignite/2015/FND1451 and in this session they where not allowed to show any demos but cheated a bit anyway 😉

After that I went to the Azure Operations: Enabling IT Organizations to Leverage Microsoft Azure https://channel9.msdn.com/Events/Ignite/2015/BRK3475 – “Shadow IT is here to stay”

Tuesday

First of I went to the second “Platform vision & strategy” foundation session https://channel9.msdn.com/Events/Ignite/2015/BRK2466

I had my own Community Theater Session at 1 PM and had to prepare so I did not attend other sessions prior to that

In the afternoon I went to my MVP-friend and Hyper-V colleague Aidan Finn´s “Hidden treasures in Hyper-V 2012 R2″ https://channel9.msdn.com/Events/Ignite/2015/BRK3506 which is a keeper as it gives you some hints on what to think about to make your hosts run better and that is with the version available for production today!

Wednesday 

After a great party by Veeam I was a bit late in to the sessions on the morning but got a nice breakfast and chat with a Microsoft guy, after that I went to the Nanoserver session with Jeffrey Snover, always a pleasure to listen to a guy that can do presentations https://channel9.msdn.com/Events/Ignite/2015/BRK2461

After that It was lunchtime and then I went to watch my friend Fredrik Nilsson´s Community Theater Session “Getting started with Chef”

Then it was time for the Windows containers session with Hyper-V PM Taylor Brown https://channel9.msdn.com/Events/Ignite/2015/BRK2493

I guess that most of the Hyper-V MVP´s present at Ingite went to the what´s new with Hyper-V in Windows 2016 and watched the session given by Ben Armstrong and Sarah Cooley from the Hyper-V team https://channel9.msdn.com/Events/Ignite/2015/BRK3461

Thursday

The first session of the day for me was “Managing Windows and Linux on Azure with Chef” https://channel9.msdn.com/Events/Ignite/2015/BRK3722

After that I went to the “Automating operational tasks with Azure Automation” https://channel9.msdn.com/Events/Ignite/2015/BRK3451

During lunch I went into the Expo Area and watched my friend Jakob G Svendsen´s Community Theater Session with device management and a bit lego-robotstuff.. hilarious!

After lunch I attended “Azure Iaas for Azure Stack” https://channel9.msdn.com/Events/Ignite/2015/BRK3479

And then I attended the “Enabling Private Cloud Storage Using Servers with Local Disks”  https://channel9.msdn.com/Events/Ignite/2015/BRK3474

One of the funniest sessions was the “Exploring Storage replica in Server vNext” with Ned Pyle https://channel9.msdn.com/Events/Ignite/2015/BRK3489

There was a bunch of more sessions that I could not attend to in person but still was really valuable and I will do a follow-up post giving the links to the records of those so stay tuned :-)

 

 

Download SysCtr Technical Preview 2 eval VHD´s with Powershell

I have just updated my script that allows you to download all or selected roles of the newly released System Center Technical Preview 2 that was announced on Ignite.

Update 2015-06-12 :  Now I configured a If that checks if the file already is downloaded…

It will depending on your broadband connection take various of hours getting all the files..

Good luck in testing those new things you learned about from Ignite :-)

My presentation on MS Ignite on “PowerShell Community Jewels”

I had an Community Theater Session this Tuesday on the Microsoft Ignite conference and so fun that there was about 100 people showing up in the area that was sized for about 40! I promised that I was going to put my slides on my blog so that you could see and get the links and info. The Session was about 15 minutes.

mysessuin

Sadly there was no recording on these sessions but here is the PowerPoint for you :-) NiklasAkerlund_May5_105PM_1

Downloading MS Ignite content with PowerShell and Bits from CH9

So after the first day of Microsoft Ignite I have altered the script I had for Teched and now I can present the first version that download the material,

Update # 2: I had some brainfreeze with the first version of the script so now Markus Bäker helped me with some fixes so now it actually works 😉 Thanks a million!!

UPDATE: It has started to appear videos on the channel 9 rss and I will monitor during the day. There are some categories now in the script so if you are only interested in cloud or iaas then you do not have to download all!, the plan is to have all categories in place so you do not have to download all 800+ sessions :-)

dowloadkontent

You can though use the -All parameter to get all the files .. as I use logic to check if the file have been downloaded I will not download any material twice.

If you want to follow my script I have it on GitHub where you probably will find the latest version !

 

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!

My Theater Community Session on Ignite – be there or …

Today I was browsing the session catalog on myIgnite and could see that my session “PowerShell Community Jewels” was now added to the list!

Screen Shot 2015-04-22 at 09.21.40

So if you will be going to Chicago and also attending the Microsoft Ignite conference I would love to see you on the Lounge B Theater on Tuesday!

Me self and The Swedish Chef will be there and maybe just maybe there will be a possibility for you to take a selfie with the Chef after the session!

10271304_745037768850455_7817596746289511557_o

(Last year at Teched Houston with Mr PowerShell himself)