May 21, 2012

Straighten up with a new UBER tool : Presenting UBERAlign

NOTICE: For more info on UBERAlign Advanced (API / CLI / Powershell) features also read the new post here: http://nickapedia.com/2011/11/07/for-advanced-users-uberalign-api-cli-powershell/

You know how in cartoons they show a small snowball rolling down a hill until it grows into a massive beast of a snow boulder?

Well, that is kind of how my most recent UBER project has gone. I know it is a been a little while since I have released a tool for the community and I am hopefully making that up with my newest creation: UBERAlign.

The idea of creating this came from the lack of a decent free alignment tool out there for VMware admins. Most every other one at there was either something you had to purchase or you had to be a customer of the vender to get access to it. And even after getting access these tools were either (in my opinion) limited in what they did, how they did it, or had become obsolete in a console-less vSphere 5 architecture.

For those they don’t know, alignment with Virtual Machine disks on top of Storage Arrays has been a performance issue for a long time. I won’t go into long detail explaining the problem or the benefits to alignment. There are great posts by Duncan (http://www.yellow-bricks.com/2010/04/08/aligning-your-vms-virtual-harddisks/) and Kevin(http://www.blueshiftblog.com/?p=300) on what the issues are and some of the tools available.

So my goal in creating UBERAlign was to once and for all create a free and powerful tool resolve this issue for everyone in the VMware community. Along the way I ended up probably overdoing the way I went about it. Turns out there are issues with aligning Windows boot disks, drive letter mappings getting lost on changes, current tools requiring copying of the whole disk, and tools frying NTFS metadata. I ended up deep in the weeds learning more than I have wanted to about NTFS, MBR/GPT, and disk logical formats. I also ended spending days writing data movement algorithms on my whiteboard over and over and I tried to solve specific problems with aligning a VM. And along the way I realized I had an opportunity to solve another issue that did not have a good universal answer.

So let me cut the background story down and get right to the details.

Presenting UBERAlign, a tool for VMware Virtual Machine alignment and Space Reclamation3

Features:

  • Allows for fast alignment checking of virtual machines with detailed logging.
  • Can perform alignment to any offset you want. Even the crazy ones that you shouldn’t choose.
  • Works with both Windows 2000/XP/2003/2008 (NTFS) and Linux Distros (EXT2/EXT3/EXT4).
  • Is able to work on NTFS boot drives perfectly. It does this by rewriting NTFS Metadata (the right way).
  • Auto detects Windows 2008 and Windows 7 native installs (alignment not needed). Will not touch a System Reserved Partition (important for Windows 2008).
  • Preserves all Windows drive mapping (AFAIK only one to do so). This means no having to remap drive letters and complete support for non “C:\”  system drives with some Windows builds (some Citrix stuff).
  • Doesn’t trash the NTFS and Boot mirrors like other tools.
  • Handles Primary and Extended partitions like it is no big deal on both Windows and Linux.
  • Has the ability to handle multiple disks for a VM.
  • Multiple disks + Multiple Partitions + Multiple types (primary, logical) + Multiple file systems (NTFS, EXT#) =  no problem
  • Also allows for optional Space Reclamation on both NTFS and Ext! That’s right: you can choose to do space reclamation at the same time as an alignment or as a option to itself. This means you can retrieve space no longer used on Thin VM’s using UBERAlign.
  • Operational model allows for completely CONCURRENCY with processing VMs. You can run up to 6 simultaneous jobs per Console and as many Consoles as your VCenter can handle. This was designed to allow people with big environments to process through a large set of VM’s.
  • Options to check, align, or reclaim any choice of disks in a VM.
  • Powerful very simple to use graphic console and easy to deploy OVA’s.
  • Orchestration for batch operations allowing you to process groups of VM’s with just a couple clicks.
  • Getting started is simple with just entering VCenter credentials/IP and pointing at a vAligner.
  • Space Reclamation should also help with possibly speeding up defragmentation of some NTFS file systems after. Your mileage may vary.
  • Space Reclamation can help you turn a thick VM into a thin one and actually get the space back!
  • Does all operations IN-PLACE! My first big goal was this. No more having to copy disks using the ESX command line(especially since ESX is going away). This will process a VM’s disks in-place.
  • Automatically makes a snapshot before running for failback. If you turn on your VM to check it and see anything you don’t like you can simply revert to the UBERAlign snapshot and be right back. (You should always have a backup and test also, see prereqs)
  • Automatically rolls the snapshots back if it sees an error. UBERAlign has the ability to do health check throughout the jobs and if it sees something wrong it will roll back it’s own snapshots for you.
  • Automatically enables CHKDSK scanning on each NTFS volume on the next boot.
  • Completely Storage Array agnostic. That’s right: if it connects to vSphere and host storage UBERAlign will work with it. This includes local disks (see prereqs below) and arrays other than EMC. Don’t say that the EMC vSpecialists don’t love all VMware users.
  • Completed tested against vSphere 4.1 / 5 environments.

So as you can see UBERAlign got to be a bit of a beast along the way.

2UBERAlign comes in two pieces. The UBERAlign Console which is a graphical interface meant to be run on a Windows XP/7/Server system with .Net 4.0 or greater. And the UBERAlign vAligner vAppliance which is deployed from OVA into a vSphere environment. The console connect to the vSphere via SOAP and to up to 6 vAligners via REST interface. The way it works is: each vAligner can process VM’s on the storage the vSphere Host it lives on has access to. So you should spread vAligners across clusters and make sure one is on any vSphere Host that has local storage you want to access.

These features are meant to make the life of a VMware admin much easier when taking on this kind of task. But, let me cover some prereqs and how-to information.

Prerequisites/Tips/Caveats:

  • All VM’s must be turned off to run any operation on. I won’t go into detail on why in-place + on is risky but suffice to say I wasn’t going to give it to you Smile
  • Console has been tested on Windows 7 SP1 and Windows 2008 R2. You need the very latest .Net 4.0 updates also.
  • As said above: only VM’s powered off and residing on storage visible to an attached vAligner will be selectable. You don’t have to restart the console but it may take up to 60 seconds for you to see a newly turned off VM.
  • Only vAligners managed by the VCenter you connected will be useable. One VCenter per console.
  • Concurrency is based on the VM level. Which means each vAligner can handle and process through different VMs. But, a single VM with multiple disks will not be split across multiple vAligners. They will process in a linear fashion one at a time.
  • If UBERAlign detects an error on a VM disk when a previous disk was processed it will revert the previous jobs also. This is because snapshots are handled at a VM-level.
  • When doing multi-disk Windows VM’s it is recommended to align them all and to use the same offset. When the System disk is processed it assumes all the disks will be done and at the same offset. You don’t HAVE to do this but you may have to remap drive letters otherwise (not a huge deal, just annoying).
  • In order for Space Reclamation to work you must boot VM (check that it is healthy), delete all snapshots, svMotion to a different datastore while specifying that you want it thin (important). Another option is to clone the existing VM from a power off state to a new VM on another datastore while 1specifying Thin for the disk format.
  • By default *Natively* installed Windows 2008 and Windows 7 installs don’t need alignment. Upgrades from Windows 2003 do. But Space Reclamation works on all of them.
  • Space Reclamation does make alignment jobs take about 15-20% longer. It all depends on the speed of the storage underneath.
  • You need to have at least 20% free space on any NTFS volume to safely align/reclaim. This can be less on a very large volume but is a safe rule to follow. If you have to, expand a drive to make a little extra room. The alignment check reports information you can use to check.
  • vAligners currently pick up a DHCP address. You can view what the address has become by looking at the info pane in VCenter. Or you can set an IP manually. The vAligners are running Ubuntu and the login is root/UBERAlign.
  • I have tested the console over WAN (Texas –> North Carolina) and it works very well.
  • LVM’s are NOT supported. Long story but #1 the test cases for this are crazy and difficult to QA and #2 technically LVM gives you its own options.
  • UBERAlign is aware of how much storage space is used/available within a datastore. It keeps track and will not start jobs if there is a possibility it could cause an out of space error.

*DISCLAIMER*
Ok, before I go any further I want to mention one important thing. UBERAlign is an experimental tool and carries no support from EMC Corporation or myself (Nicholas Weaver). It is being released in beta state and while it does have functions that allow for failback you should only perform operations on Virtual Machines for which you have a solid backup. Also, I recommend you test in your lab thoroughly to make sure you understand it fully. You accept full responsibility when you use this tool.
*DISCLAIMER*

Ok, now that that is out of the way here are a few videos showing off the console and some of the cool things you can do (these are some quick/rough cuts):

.

And now for the downloads:
(New links are HTTP, no more FTP issues)

UBERAlign Console 1.1 – FTP

UBERAlign vAligner OVA (~500 MB) – FTP

This was a long process for me. It was something I started in June and had to delay because of VMworld 2011 and side projects. It is my last tool as a vSpecialist (more on my move here) and I hope it helps the VMware community somehow. The good news is this was designed from the beginning to be hypervisor agnostic so watch for a Hyper-V and Xen version in the future.

I also want to thank Larry Whitlock (EMC vSpec) who was the primary tester during the harder part of this. Without his help I would not have gotten anywhere.

Questions, comments, and critisism are all welcomed.

.nick

Excited about EMCWorld 2011? : Show it off

I was working on something completely different when I realized some of the code/graphics I had put together would look quite cool as a screensaver. So if you are a fan of the cloud, a fan of EMC, or even just a fan of slick multi-monitor screensavers; give my new EMCWorld 2011 screensaver a shot.

Couple of details:

  1. It is hardware accelerated. I can’t guarantee the frame rate on weaker graphics chips. All mine are beefy.
  2. It is multi-monitor capable. Looks great on my 3 monitors.
  3. Works is all the resolutions I could try. You can have different resolutions on different monitors also.
  4. Each monitor gets a different randomized effect which looks quite cool.
  5. Reminds you every once in a while about EMCWorld 2011 being the place where Big Data and Cloud are going to meet.
  6. I don’t have a Mac version yet and probably won’t since I don’t own a Mac (I know, my team shuns me for this…)

Video:

EMCWorld 2011 Screensaverfrom Nicholas Weaver on Vimeo.

 

And the download:

EMCWorld 2011 UBER Screensaver

 

Installation Instructions:

  1. Download
  2. Unzip
  3. Right click as an Administrator and click ‘Install’
  4. Open up Screensaver settings and select ‘EMCWorld 2011’

 

Disclaimer:

This screensaver is neither endorsed nor supported by anyone at EMC. It is solely the product of me, an overactive and slightly strange geek.

 

Comments rock my world. Thanks

.nick

Creating a vApp : UBER UIM

I recently jumped in to help my team create a vAppliance for Unified Infrastructure Manager (UIM). This was to help enable both the EMC and Cisco field teams to demo and standup proof of concepts. As part of this I decided to try and create a web-only wizard for setting up the appliance. I used a combination of PHP/Perl/Bash and smashing my head on the keyboard. I made a short uber-video (just coined that term) which demonstrates how a simple 60 seconds web wizard let’s the user deploy UIM automatically. My goal is web-based configuration for everything I do from now on. [Read more...]

UBERShell : Ninja Scripting

Every time I release a tool or write a blog post there is a voice in the back of my head saying, “Dude, no one is going to like this”. I think this is the first time that voice never said a word. From the beginning it was more of a question of how to make this work the way I wanted. And when I started to be able to play with it myself, I was blown away with how lucky I got in the final product. [Read more...]

Play it again, Sam: Celerra UBER v3.2

The UBER VNX VSA was just released. Go HERE to download the new version.

PLAY_IT_AGAIN_SAM_poster

 

Another bug and another fix. I can’t tell if I am getting better at finding bugs or worse at testing.

Today I was able to replicate a weird issue that caused iSCSI LUNs to not show up with the ESXi 4.1 iSCSI adapter. Quick fix but if you are going to do iSCSI instead of NFS and are having issues, download the new VSA below:

Workstation Version
(MD5: a2136179d4d9544e4f8e3b43b7cc182e)

vSphere Version OVA
(MD5: c3d8abfb536aecca34c83d318c2c3e5f)

Thanks,

.nick

UBERTastic : Celerra UBER VSA v3 – Unisphere

Man this has been a busy couple months. I have a whole different blog post about VMworld and the MADNESS. But suffice to say I have been busy. So busy in fact that I didn’t really have time to work on the new Celerra UBER VSA until this week. Which also happens to be a week vacation for me.

Now for a normal 9-5 kind of guy, working a little bit on your vacation is ok. Some people frown, some people smile and approve. But, on the vSpecialists this is a big "no-no". So because of my strong desire to get this awesome piece of virtual goodness in your hands I have risked the smack down from my teammates and managers for working on it during my vacation. I shall likely be banned from a console for a bit so remember me when you are checking out the UBER cool new Unisphere interface.

And so I am excited to announce the release of the Celerra UBER VSA version 3.
I got quite a bit of new features as well as the new code/management interface you have been hearing about. Here is the list of changes and additions:

  • DART is now 6.0.36.4
  • Unisphere management console (rocks!)
  • The Celerra VSA is now 64 bit! This means you can throw RAM at it for bigger setups and it will use it. Over 8GB becomes less beneficial without code changes to simulation services. Future updates will fix this from the Celerra VSA engineering teams.
  • The biggest and most difficult change to construct is that the configuration is now adaptive depending on the virtual machine setup. This version is now intelligent in seeing how many resources you have given it.
  • The new Celerra UBER VSA uses this intelligence to now allow *Thin* mode. If you give the VSA under 2GB of RAM it will automatically size the memory limits, processes, and management interface settings to allow it to run with as low as 1024MB of RAM. You won’t do replication or host a ton of VM’s but you can use this mode to host a few and fully demonstrate/test the new Unisphere interface on even a 2GB laptop.
  • The new VSA also uses this intelligence to automatically allow the configuration of single or dual Data Mover version based on the memory assigned. If you give the VSA more than 4GB of memory you will be given the option to enable an additional Data Mover for use as a standby or load balancing experimentation. This means this single appliance can be a small lightweight NFS unit at 1024MB of RAM or can be a 2 Data Mover powerhouse at 8GB of RAM. All automatically configured on first boot through the wizard.
  • Automatic VMDK/Storage additions have been adjusted for new 64 bit OS. This means this still works. Shutoff the VM, add VMDK(s), turn on and you have more space. Automagic
  • Since automagic is so cool, I have changed the Data Mover Ethernet binding to be automatic also. The VM starts with 1 interface for management and 1 interface for the Data Movers. If you want more for the DM(s), just shutoff the VM, add NIC cards (up to 6 additional), and turn back on. It will automatically bind the Data Mover (yes it works with the 2 DM mode also) to the new interfaces and virtual slots. Just go back into Unisphere and assign away. This allows scale up for the bigger 2 Data Mover 8GB of RAM versions easily.
  • Configuration is now Perl/Bash based instead of just Bash to keep things cleaner and slicker and allow for some coolness later on ;)
  • NTP from the configuration portion of the wizard works correctly. It sets both the Control Station and all Data Movers and enables NTP as a running service. Make sure your NTP server is valid.

So let’s summarize:

  1. New Unisphere
  2. 64 Bit
  3. Automatic sizing
  4. Thin Mode
  5. Optional 2 Data Mover mode
  6. Automatic Data Mover Ethernet adding (along with fixed Storage [VMDK] adding)
  7. NTP works now

Just my opinion but this my favorite version yet. Even without one single piece of my code this version is faster than the last.

Couple things to note:

Adding an extra Data Mover can extend the setup time up to 5-10 minutes depending on your hardware. I will speed this up in the future but for now this is a one-time penalty for being Data Mover greedy. Also remember to give it the extra RAM/vCPU before turning it on the first time.

You cannot change the number of Data Movers without redeploying a new version. Once it is born with two heads it stays that way. Same thing with the Thin mode. Once it is deployed Thin, adding more RAM will not refactor the VSA.

Thin mode (< 2GB of RAM) will still incur some mild swapping the closer to 1024MB you get. If you have a laptop with an SSD putting the first drive on it will almost completely negate any noticeable slowdown with mild loads.

From now on Eth0 is the management interface. This corresponds to NIC1 in your VM. Every other interface after is for the Data Movers and will start at CGE0 and increment. So NIC2 is Eth1 is CGE0 (per DM) inside Unisphere and NIC3 is Eth3 is CGE1 inside Unisphere. Pretty easy…

Now that this is 64 bit you can no longer run it inside a virtual ESX(i) inside Workstation 7. It has to be run directly on ESX(i) or Workstation 7.

Now get to downloading… (***UPDATE links below are the updated 3.2 version fixing 3.0/3.1 bugs. ****) – LINK

Workstation Version
(MD5: a2136179d4d9544e4f8e3b43b7cc182e)

vSphere Version OVA
(MD5: c3d8abfb536aecca34c83d318c2c3e5f)

Ton of work, ton of lost brain cells so pretty please comment and provide feedback. I am releasing videos on how to configure very soon and maybe a surprise or two. If there is something you would like to see please leave it in the comments below.

.nick