Tuesday, July 21, 2015

Installing Windows server 2012R2 bugs

Ever installed Windows Server 2012R2 on a system with 1,5 TB of memory? 

Well I bet you did not. I did. And to my surprise Windows 2012R2 tells me that a system disk of 300 GB is not enough. Ough! WTF! 

Yip, someone in the installation team of Windows Server made an stupid error: he/she puts in place the option that the swap file is automatically managed by Windows and did not put any limit or warning when a system has an exceptional amount of memory. 

So following the standard Windows rules for a swap file it searches for a disk that has 1,5 * 1,5 TB of disk space available. Yes! That is really stupid! 

So what you have to do is get the memory out of the machine and install the OS with for example 256 GB of memory. After the installation is finished you can add the 1,5 TB of memory again.

With our ATOS Bullion S line servers that is really easy because the memory is hot swappable if the OS supports it. Fully certified for Windows 2012R2 !


Check it out:



Scalable servers 

Microsoft licensing is pushing you more and more to an online subscribtion

Playing with the new Office 2016 preview which is like Office 2013+ makes one thing clear to me: the licensing of Office gets more and more restricted and the on or off button is in Redmond. 

I personally don't like it when someone else decides when and what I can use if it concerns my operating system and my office suite. They are of vital importance and they should not work only when online, because to many times online is not available and in that case no Office.

Instead of making the preview freely available to as much users as possible to promote the product and to generate future sales, new users find themselves like me struggling with the license that suddenly expires and you can no longer change or even have access to your documents. There is no information, no dashboard, nothing. It is all secretly managed in Redmond.

When that happens you will run into timely uninstalls, reinstall, public product keys that should override the subscription licenses but in fact don't and then your stuck. Office is huge and installing takes easily 20 minutes on a SSD equipped computer.

This all is in sharp contrast with the (still) free Google Office applications which get better year by year and you just have to wait that they get so good that users massively switch over like they have done with the Windows Phone to Apple and Android. And next to that there is the Google Dashboard that shows you what is going on with all the products you use and gives you the possibility to manage it. Really way ahead of Microsoft, that seems to be stuck in their 25 years enigma of "It is MY product and I decide if you can use it".

Once a market is lost it is very hard to win it back. Users will be very forgiving if they like your product but ones something better is tested they are gone and all that use to be "not important" becomes the burden to never return again. 

For me personally it is a very sour experience if you take into account how much sales I have generated over the years for Microsoft. Millions and millions of Euros have passed through my hands on licensing and I received never a single flower of even a free license to thank you.And I am not the only one.

Check out this link for more info: http://www.smh.com.au/technology/technology-news/does-your-copy-of-office-2013-die-with-your-computer-20130210-2e3a1.html

Tuesday, March 3, 2015

How to effectively shrink dynamic disks in a Hyper-V

The ever growing disk consumption of Virtual Machines is a problem if you don't have a lot of disk space. So the question is: how can we tame this disk space eating monster?

You have to follow these steps in Hyper-V but for ESX it works the same way:
  1. Defragment the disk of your Virtual Machine. I use Defraggler (https://www.piriform.com/defraggler) which does a pretty good job but because it is sequential - disk by disk - it takes pretty long. 
  2. Go to Windows Disk Management, right click on the disk in question and chose Shrink Volume the disk in the menu.
  3. Select the smallest size possible and let Windows do its work.
  4. When finished shut down your Virtual Machine and go to Edit disk and select Shrink (it appears only when you have unallocated disk space due to the shrink). 
  5. After the Shrink is finished choose Compact in the Edit disk menu of Hyper V
  6. When that is finished choose Expand and reset the disk to its old value
  7. Start the VM and as soon as you're in there reset the disk to its previous size in Disk Management. 
 That should do the job.

How the Windows installer works and how it explodes the Windows directory

This blog post is based on my experience with Windows and my desire to keep the Windows OS directory lean and mean for my Virtual Machines.

I noticed that over time my Windows directory has grown to enormous proportions on my Virtual Machines and using them on a laptop with limited disk space it makes me getting worried.

Looking around I found very quickly the one responsible: C:\Windows\Installer

Ha, I hear you say, that one does not exist. Oh, yes it does, but you have to type the name in the address bar of the explorer. See?

In fact this is a hidden system directory where Windows Installer dumps all the necessary files (.MSI) and the updates (.MSP).
Here I selected the files needed to install SQL Server 2014 up to CU6. Total size 1 GB and growing with every Cumulative Update. Grrrrr.

Next to these files you will find also tons of directories with GUID names and often you will find there only a small file with no extension, like this one:
Don't touch them because this is a little copyright trick of Microsoft: every application will use these files to show their icons on the desktop. If you delete them you will see those rotten standard Windows Icons and you have no idea where the nice ones are gone unless you enter into the registry and search for the program, find the GUID etc etc.

In my situation this directory contained like 20 GB on .MSI and .MSP files and because I was really in need for space I though what the heck, Windows is self repairing, let's dump all this shit away.

Well that was the idea.

It worked for the point that I regained a lot of space from the system disk of my VM but then I wanted to install SQL Server 2014 CU6 it got messy, but I learned a lot and also that the system Microsoft invented is crap. I will explain why.

First point is that the Windows Installer repairs nothing if it is not in the C:\Windows\Installer directory. You have to do that yourself! Even if the file is included in the installer package the Windows Installer tells you with a big error: DO IT YOURSELF FRIEND! and it stops as you can see here:


Of cause the message is rather cryptic but I figured it out:

Windows Installer copies on demand or standard all the installation files to the Windows Installer directory and to prevent that files that have the same name but another version get overwritten Microsoft invented a "clever" (really) mechanism that gives the file a new name that nobody can understand.

So in this example sql_engine_core_shared.msi becomes 16b911.msi. Clever, he?

And if there is an update the update is called sql_engine_core_shared.msp becomes 16bde9c4.msp. 
Wow, that seems even more clever. No it isn't. How do you know that these two files are related? You don't but Windows does. Check it out in the registry. Then you receive another update and again the file is called  sql_engine_core_shared.msp becomes 11bde4b.msp.

You  see the problem now? The Windows installer directory grows and grows and we all know how many updates there are coming every month.

And it gets even worse. Even the developers at Microsoft get lost. I was restoring these files 1 by 1 and .msi +.msp files and I had to start the installer 36 times to make it forgive what I did and make it run again. Thank you, thank you.

But because I am human and smart and the Windows Installer is none of that, I noticed I had to copy a file twice with a different encrypted name. He? Yip, sometimes the Windows Installer gets lost in its crappy business and just copy some installation files twice. Who will notice? Nobody but me, because I had to restore them 1 by 1.

Take a look:

Both files with encrypted names have the same size and the same date and actually come from the same DVD. So not only the Windows Installer eats up your disk, it also does it like you want your Windows directory to grow as much as possible. Because it is hidden, nobody notice.

The whole Windows Installer construction is pretty bad and should be completely revised. The idea of a correct behaving application is that all its files are grouped in the therefore authorised directories and even Microsoft applications have to comply (usually they don't because you know).

I remember Bill Gates telling me during a presentation that Windows applications need to clean up their whereabouts after they get de-installed on the desktop. I asked the question: "What about the server? Should the Windows applications not do the same there?". Bill never answered but send me a present.

The best way to deal with the same name but different version is actually making a backup in a the application folder with a version number. No encrypted names, so if something bad happened administrators can manually repair the problem. Now everything is packed together and if an application is deleted and there are still files left it will be visible and it can be corrected. The same with the excessive growth of an application because it copies all its install files to the Programs directory. Now this become visible and it can be corrected.

The Windows Installer directory is only a new possibility for hackers to take control of an application or a system. You just have to add malicious code in the package, find the file and replace it with the given encryptic name and damage the product to run it.

The installer will ask administrative permissions and hoppa the code is executed. We just have to wait for the hack.