The Case of the Missing Azure Portal Detach Button

This is going to be a really quick post but one I thought may be worth sharing. Imagine that you are working in the Azure Portal and you are trying to update a Virtual Machine configuration to detach an existing data disk on the VM. You’ve done everything right following the steps at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/detach-disk by stopping the VM and waiting for it to fully stop.

For normal users, this wouldn’t be an issue however if you are like me and you care for your eyes and have switched to the dark theme in the Azure Portal, you are in for a problem. When you select Edit on the disk configuration of the VM, you notice that the Detach button that the Microsoft article refers to is missing as shown below.

The Detach button should be visible just to the right of the Host Caching drop-down menu but as you can see, it is not.

It turns out, this is a bug in the Azure Portal when using the dark theme and I have reported this already. If you switch to one of the other theme colours, the button magically appears.

The problem is that the buttons are meant to change when you select the dark theme. If you look at the Save and Discard buttons at the top of the screenshot, you can see that in the dark theme, these two buttons are white to constant with the dark background and when using the white theme, these buttons are black to contrast with the background. The Detach button at the moment, doesn’t appear to be properly changing between white and black to cater for the background colour in use.

Update for Windows 7 SP1 to Cleanup WinSXS

I was surprised that I missed this release initially so I’m a few days off the pulse with this post but Microsoft have released an update for Windows 7 SP1 and it’s a good one.

http://blogs.technet.com/b/askpfeplat/archive/2013/10/08/breaking-news-reduce-the-size-of-the-winsxs-directory-and-free-up-disk-space-with-a-new-update-for-windows-7-sp1-clients.aspx

This update gives you new options for cleaning up the WinSXS repository using the Disk Cleanup tool, allowing you to reduce the footprint of your Windows installation. As time goes by after installing Windows Updates which are released to address security flaws or provide stability and reliability improvements, this folder grows. This is because this folder stores previous versions of updated files to allow you to roll back.

With Windows 7 SP1, we had the DISM command for removing the Pre-SP1 WinSXS repository files which for some people, depending on updates you had installed could save gigabytes of disk, so this update to clean up Post-SP1 updates is really welcome.

There are some options for managing the usage of this clean up as an administrator for enterprise desktops however the process is a little clunky due to the fact that it is dependant on some registry and manual command line actions, but its nothing that can’t be achieved with the deployment of a Group Policy Object with a machine start up script.

Happy Cleaning.

How to Delete a VHD BLOB on for an Azure VM

A while ago I signed up for a 3 month trial for Microsoft Azure to allow me to continue to use the Azure Backup service after Microsoft moved it from Windows Azure Online Backup Preview into a more mainstream service.

Last night I decided to have a play whilst I’m still on the trial to see how quickly I could stand up a Windows Server 2012 VM instance. The answer is quickly by the way. Within five minutes, I was able to download the .rdp file and connect to the machine, but I digress.

After I was finished, I deleted the VM, but the disk remains in the event that you want to reattach it to another VM. When I tried to delete the .vhd file I got an error that it was still in-use. I wasn’t able to find the answer initially, but after a post on TechNet someone came straight back with the solution in an Azure Technical Support (WATS) blog post at http://blogs.msdn.com/b/windows_azure_technical_support_wats_team/archive/2013/02/05/iaas-unable-to-delete-vhd-there-is-currently-a-lease-on-the-blob.aspx.

In a nutshell, although the VM is deleted, it leaves behind a disk mount resource which is used to link the VM to the VHD BLOB. Follow the steps in the post to delete the link an you will be given an option to delete the actual .vhd file as well as the link. Job Done.

The Problem with Storage Spaces

As you may well have gathered from a number of my previous posts about Windows Server 2012 and Storage Pools, I was intending on using them for my home server rebuild, and I am indeed using them, however I have neglected to post anything showing the new server (although I will change that shortly).

I ran into a problem with Storage Pools today which I think quite frankly blows. I got myself a new Western Digital 3TB Red drive to try out. The plan is to replace all of my existing six 2TB Western Digital Green drives with these for a number of reasons including greater bang for buck on power consumption, increased IOPS, cooler running temperature and improved reliability.

Not wanting to keep a mixture of Green and Red drives for very long, I proceeded to remove one of the drives from the pool to replace with a Red drive. The Storage Pool refused to remove it as a Simple non-redundant Storage Space was being hosted on this drive.

Problem 1:  Storage Spaces cannot be converted between Simple, Mirror or Parity. Once they are created, they are created. My only option for this was to create a new temporary Space marked as Mirror and copy the data from the Simple so that I could delete it. Once deleted, I tried a second attempt to remove the drive and I got an error that I needed to add another drive to the pool as there was insufficient capacity.

I’m sorry, what?

Problem 2: I have six 2TB drives in an uber-pool. I am currently less than half of it, so removing the drive should be no problem. I tried this a few more times and each time I got the same error that I would need to add more capacity to the pool before I would be able to remove the drive, which I know to be cobblers.

In the end, I just pulled the disk from the server and let the Storage Pool have a cry about the missing disk. From here, I marked the disk for removal to allow Windows to think that the disk was failed and that it was never coming back. This worked although is time consuming as it forces all Mirror and Parity virtual disks to enter a repairing state, copying blocks to remaining disks in the pool to keep up the protection level.

This brings me softly onto another point which is more of a beef.

Beef 1: One of the tricks of Windows Server 2012 was deduplication. Anyone familiar with Windows Server 2012 will know that Storage Pools and deduplication do work together, but in Essentials, deduplication is absent, missing, not there. The feature is completely missing from any of the Server Manager interfaces and from PowerShell, the command Get-Command -Module Dedup* returns nothing.

Why is it missing from Essentials? Essentials is the release of Windows Server 2012 targeted at SMB/SME and pro-home customers, the customers most likely to be storing a lot of data on a tight budget, so why strip out the feature that they will probably be highly interested in, in Windows Server 2012.

I really hope that Microsoft get enough complaints from customers of Essentials to release a Feature Update to re-add the support for deduplication.

With this done,

Storage Architecture for Windows Server 2012 Essentials

Two of the best features in my eyes in Windows Server 2012 Essentials over Windows Home Server 2011 are both related to disk.

RAID Support
Windows Server 2012 Essentials is a grown-up Windows Server unlike Windows Home Server 2011 which in an aim to simplify the server in the home idea for consumers, removed the ability to use hardware RAID the operating system volume. This was a horrible thing for Microsoft to do in my opinion.

Storage Spaces
In a nod to Driver Extender from Windows Home Server (v1) Windows 6.2 kernels running on Windows 8 and Windows Server 2012 both support Storage Pools and Storage Spaces. This allows you to pool disks together to produce simple, mirrored or parity volumes from a single pool of disks. It’s like RAID on steroids because it means you only waste the chunks on disk that you want to for volumes that you want to protect, not all of them.

So taking these two ideals into consideration, what am I going to do?

Step 1 is to get the operating system off of the pair of 2TB disks I have, where there is a 60GB partition for the OS and a 1.8TB partition on one disk, and a 1.8TB partition on the second mirrored from the first disk using Windows Disk Management mirroring.

Step 2 is to maximize the utilization of the capacity of my six 2TB disks.

To achieve step 1, I am investing in a pair of SSD disks. For Windows Server 2012 Essentials to accept them they have to be over 160GB, so I am looking at the Intel 520 Series 240GB disks which are currently on Amazon reduced from £300 to £180. These will be connected to my SATA RAID controller in a RAID1 mirror and will be installed in a Lian Li 5.25″ to dual 2.5″ adapter, allowing me to utilize one of the three 5.25″ bays in my case which I will not ever use otherwise, opening up two slots for 3.5″ high capacity disks for future expansion. Needless to say, a pair of Intel 520 Series 240GB disks will give the operating system volume unbelievable IOPS and will allow the server to boot, reboot and access the OS extremely quickly. I’m also going to leave it as one super-sized 240GB partition so that I never have to worry about Windows Updates or software I install on the server causing me to need to think about repartitioning in the future.

To achieve step 2, it’s simple. Connect the now completely free to breath six 2TB disks to any of the on-board or two remaining SATA RAID controller ports, and configure them in Windows Server 2012 Essentials as a single, six disk Storage Pool and carve my volumes out of this 12TB raw disk pool using the protection levels I see fit for my needs.

Thanks to the ability to over provisioning (or thin provisioning as Microsoft incorrectly refer to it in my opinion) on Storage Spaces, I can create spaces larger than my current capacity and add disk or replace existing 2TB disk with 3TB or 4TB disk as available to extend the live capacity.

Over time, as I require more disk there will be one ‘problem’ in that I will have depleted all of my SATA ports. Luckily, my SATA RAID controller supports Port Multipliers, and a cheap and potentially nasty Syba 5 to 1 SATA Port Multiplier for about £45 means I can extend my capability to an extra four ports which at that point reaches the capacity of the case chassis. Power also isn’t an issue as my Corsair AX750 power supply was selected at the time specifically because of it’s amazing ability to run at peak power efficiency at extremely low consumption levels and also to support up to 12 SATA disks with its modular cabling design.

So there we have it…my design for Windows Server 2012 Essentials Storage Architecture. It’s by no means conventional but then I don’t really think anything about my server build is, with it’s 4U rack mount configuration packing a build-out consuming less power than your average light fixture.

I only designed and stood up the Windows Home Server 2011 setup little over a year ago. I think we all secretly knew that Home Server as a product family was a dying breed and that Microsoft would either kill it off completely or encompass it into another product family sooner than later to drop the support overheads. Thankfully it happened sooner I feel: Yes, it means that I have to rebuild my setup not that long after it was actually first built, but thankful because it meant I haven’t invested too heavily in customisation or further expansion of my current setup leaving me playing the corner flag with a legacy product at work. Luckily now, with Windows Server 2012 Essentials being a core SKU in the Windows Server family, it will be three years until the next major release. Although a Windows Server 2012 R2 release may appear sometime in the middle of the three year release cadence for server operating systems, at least being on the RTM release for the same product should make that migration a hell of a lot easier.