Windows Updates eats up the system drive and how to mitigate this

I had a instance that I provisioned within the cloud and after running for a while it has been slowly eating up space on the system drive and if the system drive is not large enough once provisioned there is no easy way to just expand it online…

So how can I remove stuff from the Windows\WinSxS folder in a safe manner, and yes removing them by just deleting is not the way to go because that will get you into trouble big time!

So how do you do it then?

Jan has written a blog post about using DISM and you can then massage so the files that have been superseded by a new patch or service pack can be removed thus saving space

To analyse if it is needed you can run the

DISM /online /Cleanup-Image /AnalyzeComponentStore

And then you can as described in Jan´s blog post either run

DISM /online /Cleanup-Image /StartComponentCleanup

or

DISM /online /Cleanup-Image /StartComponentCleanup /ResetBase

Where the later cleans out so you cannot uninstall updates or servicepacks (although there is more cumulative updates rather than servicepacks nowadays )

But what do you do when it fails?

There is a switch for the command that helps out here

DISM /Online /Cleanup-Image /RestoreHealth

after running this and I had actually to repair twice before I could get a successful cleanup 🙂

And yes I know the best way is to respawn instances instead of patching them and in a perfect world that would be the best of course…

Year of 2016 in review…

So the end of 2016 is near and I wanted to do a post about what has been going on during this awesome year…..

Starting in January I had my achilles tendon rupture that happened in December 2015 to recover from and that made me a little more inmobile than usual but still that did not hold me back from being one of the proctors at the DevOps Hackathon in Copenhagen where I got to be with Rasmus and Aleksandar from Microsoft and also Claus and Fredrik helping the teams doing magic with the time limited to 2 days. It was really cool to see all ideas and how they tried to work together and reach the goal..

Then in February it was time for the NIC Conf in Oslo where I and Fredrik had two sessions about Chef and Azure. It is a great conference and if you have time this year I would strongly recommend you to go there! After that great event and networking we headed back to Sweden and the Microsoft TechX Azure conference where me and Fredrik had the first AzureStack session in Sweden, also during the days we had a Chef DevOps and a Operations Management Suite session. Also in February Me and Fredrik together with two developers Mathias and Jakob did a whole DevOps-day at the Microsoft office in Stockholm and the event was sold out and a total success!

In March it was time for a vTech seminar where I had sessions about Operations Management Suite and AzureStack together with Microsoft and HP Enterprise showing the CPS in their 250 box.

In April I went to the awesome PowerShell Europe Conference in Hannover and helped out Steven from Chef as he could not make it so I did his session on Chef together with PowerShell DSC making awesome stuff on Azure. If you are smart and want to stay in IT I recommend you to go to this conference in 2017!

In the beginning of May me and Fredrik had a session on SCUG Datacenter day about Azure Site Recovery. Also later in May it was time for the DevOps Hackathon in Sweden with Rasmus and Aleksandar where I also was a proctor and helped out with the event!

In September I had a session on the gigantic Microsoft Ignite conference about Puppet and PowerShell in a real world case. During this event Windows Server 2016 and System Center 2016 was released also! I had some great networking with people and I helped out some with different expertise areas! Of course the Swedish Chef was there!

In October I got to be part of the Swedish Microsoft Webinar series about the release of Windows Server 2016 and my part was about Hyper-V and VMM.

In November I went to the MS HQ in Redmond and had as always a great time networking with Microsoft people and other MVP´s. During the week I was trying to schedule my time the best way but as always you cannot be everywhere in the same time unfortunately. One of the key take aways was the workshop on Thursday about Value Stream Mapping and I will surely use it in the future and that not only for pure software development stuff! If you have some time over during the holidays I would recommend you to read the Phoenix Project!!

The week after the MVP summit I was at the Microsoft TechDays Sweden where I was part of both a preconf and also a session. The pre-conf was a short DevOps hackathon and we had about 20 attendees that during 6 hours hacked on some ideas, as always when Mathias, Jakob, me and Fredrik do things together we had a great success 🙂

The last time-slot on the last day of the TechDays conference me and Fredrik had the fun session about Puppet and PowerShell, unfortunately our session was not one of the recorded this year.. 

Thank you all for being part of this awesome year of 2016 and hope to see you all next year!

 

VMM 2012 R2 support for Windows Server 2016 guest OS

So I am working on a customer and their path of upgrading to 2016 versions. The first step was to make sure that the VMM 2012 R2 server was updated to latest UR and that I can deploy guest vm´s with 2016.

After the update of VMM to UR11 I checked the list of OS,

screen-shot-2016-11-25-at-11-00-48

So to be able to see the 2016 as a guest OS i have to add a hotfix and that took some time but what ever you do, do not cancel but wait and wait and wait and the never ending progress bar will eventually go away 😉 . And yes you have to add one hotfix for the console and one for the vmm server!

screen-shot-2016-11-25-at-11-33-19

And once that is applied,

screen-shot-2016-11-25-at-11-43-52

Good luck in your upgrading story !

 

 

Pester Operational Testing results to Slack take2

So I have been doing some work in the infrastructure as code space and I have been utilizing Operational testing with Pester to make sure that the environment is configured and working as intended.

I used Irwin´s work in Active Directory tests and adding several other parts for SQL etc so it would do the tests that was applicable for us! Then I scheduled it to run every day at 9 AM and reportunit created nice html reports like Irwins that was sent to operations email box as an attachment.

Now I got a new request from one of the recipients that they wanted it in a Slack channel instead so I used the Warrens Slack module like Irwin.

screen-shot-2016-11-02-at-15-20-51

So far so good! Though when I had an failed test we did not get any more information in the slack message and we would need to go to the mail and open the Nunit html report to find out what pester tests actually was failing and that is lame right?!

How could I add that information in the slack message so we got to know what tests failed from the same place? Here I had to add a some code to Irwins to make it also display some meaningful information, which in the extension could be utilized by a chatops bot 🙂

screen-shot-2016-11-02-at-15-20-30

As you can see only if I will get more than 0 failed tests I create an array of the errors and then send them as one message

Happy Operations Testing!

 

Installing System Center VMM 2016 and SQL 2016 on Windows Server 2016 Core

I am a firm believer that Servers should not be used for the wrong things and thus I have now installed the new System Center VMM 2016 on a Windows Server 2016 Core.

In my home lab I do not have so many hosts so I have used the opportunity to install the SQL 2016 on the same core instance.

As I am installing the SQL on the same machine I had to enable the .net 3.5/2.0 feature on this server and yes I know and can´t agree more, please remove this requirement dear SQL team and move to the future!

screen-shot-2016-10-14-at-13-53-46

SQL 2016 does not support installing via the wizard on server core so I used the command line way (by the way based on this information req page it is not supported on Windows 2016 core yet 😉 )

Although it is not supported with the wizard for sql install on core it do show some progress through a graphical dialog…

screen-shot-2016-10-14-at-14-07-10

So once that was up and running I installed the ADK for windows 10, and I used the one for Windows 10 1607.

And then I could start the VMM install. And yes there is a command line way of installing the VMM but this time I wanted to see if I could use the wizard in core!

screen-shot-2016-10-14-at-14-26-54

During the installation the wizard complained about my memory that I had assigned to the VM that I was installing on and I could with the superduperfeature in 2016 add more to the running VM without doing any stop and start!

screen-shot-2016-10-14-at-14-44-54
screen-shot-2016-10-14-at-14-45-14

After that I had no more issues and the installation completed successfully!

screen-shot-2016-10-14-at-15-01-15

Well once installed I had to do some patching as at the same time VMM 2016 was released Microsoft also announced the availability of CU1 🙂 and trying to use the short cut from the installation dialog fails on a Server core as those GUI parts are not present! I can though use the Sconfig and the “Download and install updates” option to get the updates I want…

screen-shot-2016-10-16-at-23-21-27

Happy playing!

Deploying VMM 2016 will require SQL 2012 SP2 or later

Revised: Based on the SQL req page that have been updated it now is supported to run on SQL standard and from SQL 2012 SP2, the following link on the VMM page though still says 2014 Enterprise but that will be updated. My MVP friend Anders Asp have got info that I share here:

“Official MSFT statement: That is likely a carry over from earlier TP content when we had a bug that installation would fail on Std SQL(TP3?). Standard should work.”

//As you can see the System Center VMM 2016 GA will require a SQL 2014 Enterprise or later, so you will not be able to use a standard SQL to be supported. So if you are upgrading from a VMM 2012 R2 you will also have to upgrade your SQL to the Enterprise level.//

screen-shot-2016-10-13-at-16-42-25

The SQL instance solely used for the System Center is included in the System Center licensing.

Going from Windows Server 2016 Eval to GA license

Today You might have seen that Windows Server was released and available from Volume center and MSDN etc.

I had previously reinstalled my Hyper-V node at home with a new 2016 eval media and now I wanted to activate it with a license to not have it time out in 170 days

Going into the control panel and trying to change keys was not the way to do it!

screen-shot-2016-10-12-at-22-20-05
screen-shot-2016-10-12-at-22-22-51

Reading about how to do it in 2012 R2 gives a hint that I should use DISM to set the new key instead

screen-shot-2016-10-12-at-22-46-12

And then after two reboots I log in and can verify that my license have been applied 🙂

screen-shot-2016-10-12-at-22-51-16

And if you wonder about 2016 KMS keys you can find them on technet on this link!

Windows Server 2016 is now available on Azure

So the day has come when Windows Server have arrived at Microsoft Azure and you can start deploying your new workloads.

You either find the different flavours from the portal or from PowerShell

screen-shot-2016-10-12-at-15-37-58

And the command for finding them with PowerShell AzureRM module is

and running it looks like this:

screen-shot-2016-10-12-at-16-12-07

Good luck in deploying!