• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Yellow Bricks

by Duncan Epping

  • Home
  • Unexplored Territory Podcast
  • HA Deepdive
  • ESXTOP
  • Stickers/Shirts
  • Privacy Policy
  • About
  • Show Search
Hide Search

scripts

Repairing your vmdk header files…

Duncan Epping · Apr 3, 2009 ·

Increasing the size of a disk when a snapshot exists or deleting the wrong folder on your vmfs volume, it’s something that probably has happened to all of us.

This usually means that you will either need to edit the current vmdk header file or even recreate it. Although it’s not a difficult task it’s still error prone cause it’s a manual task, the procedure is outlined in this KB article for those interested.

Eric Forgette(NetApp), also known of mbralign and mbrscan, wrote a script that automates the recreation of a vmdk header file. The script also gives you the option to verify a header and if it’s corrupt fix it. Eric posted his script on the NetApp community forums and it can be found here.

I especially like the “fix” option of which the following is an example output:

[root@x3 root]# vmdkdtool /vmfs/volumes/test/testvm/fixed-template.vmdk

vmdkdtool version 1.0.090402.
Copyright (c) 2009 NetApp, Inc.
All rights reserved.

/vmfs/volumes/test/testvm/fixed-template-flat.vmdk is 12884902400 bytes (12.0000004768372 GB)

size = 25165825 (current 25125)
sectors = 63 (current value 21)
heads = 255 (current value 3)
cylinders = 1566 (current value 106)

NOTE: A backup of the file will be made if you choose yes.
Shall I fix the descriptor file? yes
Creating a backup of /vmfs/volumes/test/testvm/fixed-template.vmdk
Fixed.

Head over to the NetApp communities and pick it up, definitely a must have for your toolkit.

SRM: Running a script from a Recovery Plan

Duncan Epping · Mar 30, 2009 ·

I got a question today from one of my customers on how to run a script from an SRM Recovery Plan. They tried everything but never got it working. It’s fairly easy, although you would need to take a couple of things in consideration. And reading the SRM Admin Guide page 52 and 53 wouldn’t harm you as well. But then again we’re talking technical people here, who reads the manual? (Besides Mike Laverick aka Mr RTFM of course. Mike, btw, also recently released the third chapter of his SRM book for free, which is most definitely worth reading!!)

I guess the most important things to remember if you want to run commands/batch files from SRM are:

  • SRM can only execute .exe or .com files, if you need to run a batch file do the following:
    c:\windows\system32\cmd.exe /c c:\yellow-bricks.bat
  • Scripts must reside on the host where the SRM server is installed.
  • SRM callouts to batch files or commands run as the local administrator of the SRM server host, and not as the user logged into the VI Client.
  • A recovery terminates if a command or script exits with a non‐zero status.
  • If the script call out takes longer than 300 seconds to complete it will be terminated. You can increase this by changing/adding the following line in vmware-dr.xml with the desired value:
    <calloutCommandLineTimeout>600</calloutCommandLineTimeout>

Update: VMware Health Check Report 0.94

Duncan Epping · Mar 27, 2009 ·

William Lam posted an update of his Health Check script on the VMTN Communities. I’ve been using this script extensively at several customer sites together with VIMA. Here are the release notes:

03-24-2009 – v0.9.4
Fixes:
-There was a bug reported by Duncan Epping and others regarding hosts that were appearing in the wrong cluster with respect to the portgroup listings, this should be fixed.

Enhancements:
-Detail Hardware Health sensor readings provided by CIM
-CDP Summary (individual cdp.pl available)

Speed up your powershell scripts

Duncan Epping · Mar 24, 2009 ·

On the VI Toolkit blog there’s a great article for people like me. They explain how to speed up your scripts. I’m no powershell guru, and these kind of articles are more than welcome to boost my scripting skills.

In short, it comes down to these three tips:

  1. Try to load as many objects as possible into arrays beforehand. Once you’ve got them loaded you can use them as arguments to multiple calls without having to resort to potentially expensive lookups every time.
  2. Just like in sample 1 above, when you’ve loaded objects, use the objects directly rather than using their names. This is usually not hard as our cmdlets are designed to take object first-and-foremost, and names are supported just as a convenience.
  3. If you absolutely need to load a single VM object by name, load it using the Get-VMFast function below. While this approach can certainly help, it’s not nearly as good as using the other two techniques mentioned above.

Head over to the VI Toolkit blog and start reading.

mbrscan, mbralign and RCU

Duncan Epping · Mar 23, 2009 ·

A while back I wrote an article on checking your disk alignment and even changing the disk alignment from the service console. Since then a lot of people asked me for the exact link, because I don’t have a now.NetApp.com account I wasn’t able to provide it. Today I received an email from the developer, Eric Forgette, with a link to a community article which contains links to both tools, mbralign and mbrscan.

Eric is also the one who developed RCU(Rapid Cloning Utilities). I just watched the demo video on youtube. In short: It’s a vCenter pluging which enables you to deploy hundreds of VDI desktops by utilizing the capabilities of the array. Keith Aasen wrote a blog article on this plugin which has some more details. I guess with the vStorage API coming up we can expect more vendors to add storage capabilities to the vCenter GUI, think snapshots / clones and more…

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 4
  • Page 5
  • Page 6
  • Page 7
  • Go to Next Page »

Primary Sidebar

About the Author

Duncan Epping is a Chief Technologist and Distinguished Engineering Architect at Broadcom. Besides writing on Yellow-Bricks, Duncan is the co-author of the vSAN Deep Dive and the vSphere Clustering Deep Dive book series. Duncan is also the host of the Unexplored Territory Podcast.

Follow Us

  • X
  • Spotify
  • RSS Feed
  • LinkedIn

Recommended Book(s)

Also visit!

For the Dutch-speaking audience, make sure to visit RunNerd.nl to follow my running adventure, read shoe/gear/race reviews, and more!

Do you like Hardcore-Punk music? Follow my Spotify Playlist!

Do you like 80s music? I got you covered!

Copyright Yellow-Bricks.com © 2026 · Log in