How to detect VMFS3 and VMFS3 Upgraded Datastores with PowerCLI; Now with more sugar!

You’re not new to Virtualization, this isn’t your first VMware rodeo, but you find yourself starting to question… OMG DO I HAVE VMFS3 DATASTORES STEATHILY HIDING IN MY SYSTEM?! I mean you do your due diligence, you check and confirm that it says VMFS5 and that it has a 1MB (Universal) block size, but yet… you’re still not sure… Hell, you might even be saying WTF? 1MB BLOCK SIZES? WTFS?!  Well, hopefully this helps break through some of the barriers to not only identify whether you have VMFS3 datastores period, whether they’re actually stealthily hiding!

What’s the big deal with upgrading VMFS3 to VMFS5?

Yea, you read the VMware documentation like this; How VMFS5 Differs from VMFS3 – Basically by reading that you come to the conclusion of ITS EASY, JUST DO IT, YAY!  But to quote Jason Corbett @NGTJason “migrate > upgrade”

Why exactly though? I mean if you read what Cormac Hogan @VMwareStorage wrote so long ago vSphere 5.0 Storage Features Part 1 – VMFS-5 you might be pressured to believe that it’s all good, caveats aside that your VMFS5 upgraded datastores will rock out just like VMFS3, but take a gander at Jason Boche @JasonBoche VMFS-5 VMFS-3, What’s the Deal?

Differences between upgraded and newly created VMFS-5 datastores:

VMFS-5 upgraded from VMFS-3 continues to use the previous file block size which may be larger than the unified 1MB file block size. Copy operations between datastores with different block sizes won’t be able to leverage VAAI.  This is the primary reason I would recommend the creation of new VMFS-5 datastores and migrating virtual machines to new VMFS-5 datastores rather than performing in place upgrades of VMFS-3 datastores.
VMFS-5 upgraded from VMFS-3 continues to use 64KB sub-blocks and not new 8K sub-blocks.
VMFS-5 upgraded from VMFS-3 continues to have a file limit of 30,720 rather than the new file limit of > 100,000 for newly created VMFS-5.
VMFS-5 upgraded from VMFS-3 continues to use MBR (Master Boot Record) partition type; when the VMFS-5 volume is grown above 2TB, it automatically switches from MBR to GPT (GUID Partition Table) without impact to the running VMs.
VMFS-5 upgraded from VMFS-3 will continue to have a partition starting on sector 128; newly created VMFS-5 partitions start at sector 2,048.

I THINK I HAVE VMFS3 VOLUMES HOW DO I TELL, OMG WHAT IS THAT BURNING SENSATION

Hey, calm down, calm down… I think we can solve this problem pretty easily! And if the burning sensation continues, get that checked out!

I don’t know about you, you might have 1 vCenter, 3 Servers and a handful of Datastores. I have thousands… of EACH, so I needed something to do my scans and checks at scale with PowerCLI because I’m a baller, and apparently I pull that off rather well. :)

Methods of detecting whether you have VMFS3, VMFS3 upgraded to VMFS5 or otherwise mismatched sets..

  • Block Size is greater than 1MB
  • Partition type is msdos instead of gpt (*Detected by checking whether the StartSector is 128 instead of 2048)
  • And of course, your VMFS version is VMFS3 or 3.46

But wait, didn’t you say above that partition types will change from MSDOS to GPT if they’re expanded? Doesn’t that make tracking harder? Yes.

Let’s get our PowerCLI on so we can crack this nut!

Get-Datastore | Get-View | Select-Object Name,@{N="VMFS version";E={$_.Info.Vmfs.Version}},@{N="BlocksizeMB";E={$_.Info.Vmfs.BlockSizeMB}}
// To check VMFS version & block sizes – Really useful to just check in general that your version is 5.54 and your blocksize is 1MB though if you VMFS3->5 In-place upgrade when VMFS3 was 1MB, this won’t reveal itself to you

Get-Datastore | Get-View | Where {$_.Info.Vmfs.Version –eq “3.46”} | Where {$_.Info.Vmfs.BlockSizeMB -eq "1"} | Select-Object Name,@{N="VMFS version";E={$_.Info.Vmfs.Version}},@{N="BlocksizeMB";E={$_.Info.Vmfs.BlockSizeMB}}
// To Check VMFS Version and Block Sizes but only listing mismatches you specify  – so if you want to see if you specifically have any 3.46 VMFS and various block sizes

Busting out the mad $esxcli syntax!

This is where we start to get real. The following examples are simple ‘one-liners’ which are cute and all if you’re checking one host, but I also give you one which will scan EVERYTHING so you can just sit back and bask in the glow of figuring out WTF IS GOING ON WITH THIS BURNING, HELP HELP HELP!

$esxcli.storage.core.device.partition.list() | Select Device, StartSector
// Dumps all Offsets – This can be useful if you want to see a lot of data… but less so if you’re looking for something specific…

$esxcli.storage.core.device.partition.list() | group-Object -Property Device | Where {$_.StartSector –eq “128”} | Select Device, StartSector
// Dumps only offsets which "equal" a startsector, in this case 128 – Now we’re cooking with oil, a StartSector of 128 leans on a datastore being VMFS3 or VMFS5 which had been upgraded from VMFS3

$esxcli.storage.core.device.partition.list() | Where {$_.StartSector -eq "128"} | Select Device, StartSector
// This will dump all of your partitions which have a starting offset of 128, same as above but shorter

Script me baby one more time!

OMG YOU JUST MADE A HORRIBLY DATED REFERENCE TO BRITNEY SPEARS. For what its worth, I believe she did some scripting in her days…   The scenarios below will just ‘do it’ based upon whatever hosts you connected to with Connect-VIServer, obviously the difference being ‘comments’ or not.

foreach ($myHost in get-VMHost)
#This tells the system to do a run the command against all "VMHosts" that you have defined as part of your Connect-VIServer
{
    Write-Host ‘$myHost = ‘ $myHost
    #Display the ESXi Host that it is operating against, helps if you’re scanning multiple vCenters
    $esxcli = Get-EsxCli -VMHost $myHost
    #This sets the syntax and the context for the Get-EsxCli command to operate, a requirement for running $esxcli.Commands
    $esxcli.storage.core.device.partition.list() |
    #Use Get-EsxCli to list the core storage devices
    Where {$_.StartSector -eq "128"} |
    #This specifies we’re only looking for partitions which have a StartSector of 128, which could mean either VMFS3 or VMFS3 upgraded to VMFS5 Datastores
    Select Device, StartSector
    #When all is said and done, it’s nice to see it in a ‘pretty’ format to see what work you need to do!
}

Without Comments

foreach ($myHost in get-VMHost)
{
    Write-Host ‘$myHost = ‘ $myHost
    $esxcli = Get-EsxCli -VMHost $myHost
    $esxcli.storage.core.device.partition.list() |
    Where {$_.StartSector -eq "128"} |
    Select Device, StartSector
}

Now technically you could use partedUtil but that’s a pain in the ass.  – But for the sake of continuity here is the syntax/results!

~ # partedUtil getptbl "/vmfs/devices/disks/naa.60a98000646e4f4b475a6a4975422d66"
msdos
261083 255 63 4194304000
1 128 4194298394 251 0
~ # partedUtil getptbl "/vmfs/devices/disks/naa.60a98000646e4f4b475a70516f34416f"
gpt
534698 255 63 8589934592
1 2048 8589934558 AA31E02A400F11DB9590000C2911D1B8 vmfs 0
~ #

So in case you’re wondering if the script is working properly you should end up with results similar to this below;

Results:
$myHost =  103.domain.local

Device                                                      StartSector
——                                                      ———–
naa.60a98000323764703424434e6246775a                        128
$myHost =  102.domain.local
naa.60a98000323764703424434e6246775a                        128
$myHost =  101.domain.local
naa.60a98000323764703424434e6246775a                        128
$myHost =  037.domain.local

And that is basically all it takes! This hopefully should give you the fuel you need to scan your environment with minimal effort and identify any VMFS3 datastores so you can clean that stuff up and MIGRATE!  I discovered a bunch of them which aren’t so kind, and what ensues is massive migrations!

Good luck out there! and if you can find some good way to hack esxcli to ALSO have it then correlate that data to what the datastore name is… I FAILED :)

Live from Afghanistan, an Update from @CXI – WILL HE TELL US WHAT HE’S DOING?!

Here are some of the top questions I’ve been getting lately since I’ve been here in Afghanistan.

Why the hell are you in Afghanistan?!   What are you DOING there?!

I mean, sure I was a little… obtuse about details, for safety and security reasons when I shared things initially in my post Taking a stand and serving my country; or WTF is @CXI doing in Afghanistan?!? but I think I’m comfortable answering a few of these questions for you :)

So on the initial question, WHY am I here – refer to my blog post above and I think you’ll get that answered pretty easily! But more importantly…

What am I actually doing here!

So, I eluded to doing things with Storage… Virtualization… Cloud… etc.   Well, here is a little low-down at the best I can possibly offer you. :)

In 2011 Afghanistan NATO and International forces had ~800 bases or so, and then started closing down or transferring bases, take the 202 bases closed in 2012 alone and as we are here in 2013, more and more bases are being closed as we ready for the complete draw-down slated to finish Dec 31 2014.   So, you’re asking WTF ARE YOU DOING, STOP STALLING!  :)  

Where I come in, is as these bases start to close up, there’s infrastructure which gets decommissioned, data-centers closed, services shut down or consolidated.   And as the Afghanistan theatre and country lead for Virtualization and all the fun that falls underneath that… Well, let’s just say… There’s a whole lot of fun that falls underneath that! Between the sites which are shutting down and the ones which will continue running for a long time to come. :)  

Hopefully this gives you a little bit of an idea of what I’m doing, how I’m doing it, and all of the evolution and change which goes with that!   I’ll provide more details, stories and so much more as time goes on, you can’t even begin to imagine the challenges and woes of high tech infrastructure in a warzone and as applicable I’ll share those stories here, at conference and beyond when I come home!    Also, I’m planning to do some ‘virtual’ VMUGs here for the guys on the ground who haven’t had that experience and if you’re a speaker/presenter who would like to try to remotely present let me know!

Some of you ask about sending me letters, care packages and what-not, feel free to send whatever you’d like to me at the address below!

Christopher Kusek
JNCC-A Task Force Signal
APO, AE 09354

I wish you all the best and don’t hesitate to reach out to me in the short and the long-term!   Eventually I’ll be coming home and the eventual adventures I’ll pursue when I come home, Safely.  :)

Taking a stand and serving my country; or WTF is @CXI doing in Afghanistan?!?

A lot of you have been asking about this.  So I thought it about time to finally share just what is going on!    An interesting opportunity presented itself recently to allow me to serve my country in a way I am capable of and more importantly, allow me to do my part to help bring our troops home.     Allow me to provide a little background and context.   I am no warrior, I am no soldier.   I can barely even carry the gear that is the bare minimum used for protection, I can’t even begin to imagine just what the weight of the weaponry involved is!

Allow this visual depiction of my experience of getting blood drawn for putting my DNA on file to give you an example of just how non-capable for soldiering I am!   And why yes I did pass out during the blood draw, really it wasn’t the blood draw so much as the WHERE IS THE VEIN, I KNOW, LETS MAKE HIM PASS OUT! It wasn’t the first time, and I warned them up front this was bound to happen if they didn’t find the vein the first time!

This apparently is what happens when my blood is drawn... 

But with all that said and done, I am still physically fit to actually BE here, and apparently, strong enough to at least WEAR this gear when time calls for it!

me-gearme-c130

Though I’m far more accustomed to just wearing a jacket and take photos of myself after not having slept for days and days – Oh, where would I not sleep for days and days? Probably some place like this PAX Terminal which often receives mortar attacks…

Pax1 Pax2

But I digress a little.   Back to what I am doing here.   I am no warrior, I am no soldier… I am a technologist, I teach, educate, evangelize, enliven, and solve problems and let me tell you, <REDACTED> <REDACTED> <REDACTED>, Pretty awesome, right?

I’ll be honest, due to the sensitive nature of what I am doing here, what and where I am working on, etc; I am unable to really share a whole lot of what I am doing or what it entails but I can via obfuscation share that I am helping spread the good word, will, and journey of all things that are Storage, Cloud, Applications, Virtualization, Security and more.   You know, all the kinds of things you often enjoy my expose’s of and the like!   The real and ultimate goal of this journey is doing my part to help bring our troops home safely, and ensure that the the infrastructure which helps support and save lives sustains.

This world is a very secretive one but there are parts of that experience often never shared that I’ll be able to reveal as I serve my time here.

Many of you have asked how you might go about sending me letters, care packages, whatever or the like; provided below is my APO for those wondering.

Christopher Kusek
Trace Systems
JNCC-A Task Force Signal
APO, AE 09354

I also have a DoDAAC which is pretty awesome for FAST delivery, but that’s not really needed at all!  A conversation on facebook revealed that USPS has free shipping materials for APO addresses.   Honestly, I really don’t think I need much, I mean I try to be a pretty easy person; albeit vegan food options out here are quite difficult and interesting to say the least…

I do apologize I haven’t been on Twitter much, Internet connectivity here SUCKS and I cannot get to twitter from my work machines, though Facebook works fine, thus I’ve been being as regular there as I possibly can respectively. :)    I cannot stress enough how having a max 5k download speed at times really means, it makes Skyping challenging enough as it is at times. :)

I’ll keep you all updated on my journey, and new and interesting lessons learned from the Warzones, consider me the eyes into this world which often is shrouded from our very eyes in media reports and beyond.    I hope you all are well, and I take steps to ensure my safety on the regular so I’ll be able to return home in this mission to help return home our troops and do my part in the United States drawdown from Afghanistan.

Be well, and I hope this revealed enough to comfort or alleviate any thoughts some of you may have been having! :) Comments, letters and beyond are always welcome! :)

Happy Virtual Holidays; Best Practices for Virtualizing Mission Critical Applications, Storage and Hyper-V!

Hey everyone out there!   I hope this finds you well and your holidays are off to a festive start.   I find no better gift to you within the community than the motherlode and brainshare of information I’ve collected, assumed, and delivered throughout the years and even a rare ‘sighting’ of my own delivery of said material in case there is ever anything you’re wondering about the what, the where and so forth!

A little bit about this source material; The emphasis and focus on this is intended to be around virtualizing Exchange and SQL.   And while some of you hardcore VMware zealots expect me to only discuss VMware it does take into heavy consideration and discuss the materials at hand on how to go about addressing this within the body  of work that is Microsoft Hyper-V as well – So happy holidays to all virtualization! :)

To start I’d like to focus on my most recent delivery of this presentation material for our good friends at Windows IT Pro, Power IT Pro, and more specifically the instance of the discussion was with VM Tech Pro!

VMtech Pro - Virtualization Strategies - Putting VMware to Work for you 

There by clicking on the handy dandy image, or even by this embedded link you will have access to the live presentation I delivered for the folks over by there and the some ~130 or so attendees who were on the line (submitting questions, so on and so forth).   As most of you know this is something I’m particularly passionate about (Virtualization, Best Practices, Mission Critical Apps) all of that, and I do love to share my body of work to help make your day to day jobs even easier.    I definitely encourage you to go through the link to check out the live version of events (slides can only tell so much of the story, and I share a lot of stories not reflected directly in the slides) but I also encourage you to check out the links below which will have the original source material and SPEAKER NOTES OMG THE SPEAKER NOTES!  Those are filled with every ounce of material you need to help make your case and continue to make your case when it comes to virtualizing and driving your story home; it’s something you won’t regret having on hand. :)

I do encourage you to use this material to help make your case, if you’re going to publicly share the slides or use them in your own source (as many have done) I appreciate a reference or just letting me know (sometimes I update material and I’d hate for you not to have the latest material :))

Also anyone who wishes to contribute back into this living body of work, don’t hesitate to in the comments.   We’re only as good as our information and any chance to improve that I’ll be sure to reference back to you as well!   Thanks, and here is the rest of it! :)

Slides delivered for the Virtualization Strategies session (Hyper-V material had been hidden)

Slides delivered for The Experts Conference 2012 #TEC2012 – Best Practices for Virtualizing Mission Critical Applications

Slides delivered for The Experts Conference 2011 #TEC2011 Session (material was later updated in 2012, but I am full disclosure :))

… And just for good measure since I’m sharing… here for a little of storage is…

Slides delivered for The Experts Conference 2012 #TEC2012 Session of Storage, Backup, Recovery for HyperV

… And the holidays wouldn’t be proper without adding one last mini-gift! My Post-VMworld 2012 Update – Cherish :)

Slides delivered for the St Croix Solutions community with the Post VMworld 2012 Recap!

 

So a hearty happy holidays to you and your kind, as we launch into a brand new year… Oh the exciting things we will have to share when that time comes! :)

Stay tuned :)

Life vMotion, how John Troyer has changed lives for the better #vTHNX @Jtroyer

First of all I want to introduce you to John Troyer, the gem of Virtualization.   (No, I’m not equating John to Jem and the holograms!)

John Troyer @Jtroyer as Jem in the Holograms! Oh and for the record I SUCK at image form ;) John Troyer @Jtroyer as Han Solo (John Solo) Photo with Chewbacca

But it is time to get serious now.   John is often portrayed in the community as Chewbacca, but unbeknownst to popular belief he is actually a tad more related to John Solo.    Although even through this brief history of time, I’d like to share with you my impressions of John over the years, how I’ve seen him and the community grow to foster what is today one of the most well formed and well knit communities on the globe.

John Troyer – The Man, the Legend

In the beginning.   There was investment into social media by VMware.    Yea that is how I remember it.  The first time I saw John Troyer was there were these little live interviews going on at VMworld broadcast to the world via uStream.   It was a very adhoc activity… not officially or formally planned, very thrown together, filled with problems, antics and everything you might expect, but all at the same time, amazing!   Everything really seemed to come a fold in 2008 (Maybe VMware decided to really start investing in the community in 2008… or make John went full stream ahead, either way, VMworld Videos, VMware Communities Podcasts, everything started to unfold from there)

All of a sudden.    VMware had a face.   An adorable face, a human voice, someone who can roll with the punches of trying out new things have problems with people flushing toilets on live recorded podcasts and STILL come out of it stronger! [BTW John, it doesn’t classify as just doing your job especially when you do it so well :)]

John Troyer – Just doing my job

As we got to know John just like we got to know VMware we became to notice various similarities.    WOW [VMware/John] helps me do my work easier!  I no longer feel I’m alone because I suddenly know of others out there just like me! A true sense of community started to form with John as the catalyst.     A little backstory. *I* [CXI] have been working with Virtualization [VMware and others] since VMware was founded as a company.   And honestly, it wasn’t until you got involved John that it went from just being ‘Technology’ to actually having a ‘Community’ If that is just doing your job, point 1: Well done! but it didn’t stop there.    It’s one thing to be responsive and reactive to someone within the Virtualization communities needs, but time and time again you would go above and beyond.    In fact it almost felt like ‘above and beyond’ was the defacto norm; and that is definitely true because of what a total Rockstar you are, character, personality and beyond.    I’ve seen more lives change as a result of interaction with you than you may ever realize [Though hopefully you’ll get to glean and learn some of stories out of these blog posts :)]

Where your Job ends and where John Troyer begins

3 Tips you’re doing your job well

  • The virtualization community continues to grow and prosper
  • Through education and awareness the mission of VMware focused virtualization is spread
  • VMware initiated go to market strategies are executed on

3 things John Troyer has done instead

  • Built and fostered not just a community, but a family of virtualization focused overlays; bridging the storage, networking and security communities to Virtualization, even in spite of your own efforts it continues to grow!
  • Encouraged individuals and created through no fault of your own [though highly influenced] not only a huge stack of bloggers and often self-made rock stars, but Authors.   Helping foster some of the largest publisher stake investment and drive in a technology ever.
  • Brought together the industries best virtualization experts under the guise of vExperts – which the program itself would never have gotten where it is today without your Guidance, Direction, and Brand ownership.   [Some might say that’s a VMware success, but without you in the seat, it could just have easily fallen off like similar programs under other company offerings]
    • Side bar: The vExpert Program continues to receive industry recognition and is seen as a OMG MUST HAVE Accolade.    And that accolade is DIRECTLY changing the lives of those in the virtualization community.  Feel free to do an analysis of just the careers of those who hold the designation and what directions and impact it has made on them as people and their future [I’ve done the analysis. Result: John you rock! ;)]

So, when I would have discussions with you and you’d be saying “Oh, I’m just doing my job”.  Yea I too am just doing my job, and we all work when we’re desperately under the weather and our voices get so low and deep we can rock it out with some Barry Manilow Karaoke.   But merely ‘doing your job’ ‘doing a great job’ and where the “John Troyer” effect come into play make the difference between Lightning and Lightning Bugs!

The John Troyer Effect

I want you to know John that I’ve put a lot of time and research in to this and you are an absolute rock star.  The virtualization community would NOT be where it is in strength, numbers and closeness today if it were not for you.   This is not just some mild passing idea or concept, this is a FACT.    Virtualization will come and go, but John Troyer, the connections you foster and grow, the way you enable others to prosper and grow on their own.   Your going above and beyond and BEYOND the call of duty (All claiming it to be in the name of just doing your job)   You my friend ARE Virtualization and the Cloud.     You Life vMotion simply admins and architects and bring them to a transformational journey where they come out of it a better person, a stronger communitarian, and they begin to continue to pay it forward carrying the cycle above and beyond again.

So on behalf of the virtualization, storage, security and cat ears wearing community.  We love you John and we cannot thank you enough for every single thing you do each and every day!    Keep up the OMG amazing everything and have a Happy Birthday!

And last but not least a few words in the heat of the storm.