• 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

Management & Automation

vimsh, what can I do with it?

Duncan Epping · Jan 5, 2009 ·

Vimsh(and vmware-vim-cm) is probably one of the worst documented commands out there. At the same time it’s one of the most powerful commands(I know it’s a shell…) out there. You name it and “vimsh” does it. Most of you ran into the “enabling vmotion” from the Service Console problem when first starting out with scripted install. Vimsh solves this:

/usr/bin/vmware-vim-cmd “hostsvc/vmotion/vnic_set vmk0″

As you can see “vimsh” is very powerful, but most of the other command-line stuff can be handled with the “esxcfg-*” commands. Well almost, for instance we talked about enabling autostart in my previous post. According to the KB article you must edit the file “/etc/vmware/hostd/vmAutoStart.xml”. Editing this file can be dangerous, I guess this goes for most ESX configuration files. During the Dutch VMUG I had a short chat with Wil van Antwerpen, Wil told me he was busy documenting the “vimsh” “command” in a wiki. After I published the enabling autostart blog Wil emailed me that this could and should be done with “vimsh”. I fully agree with Wil:

vmware-vim-cmd /hostsvc/autostartmanager/enable_autostart true

This enables the autostart functionality without manually editing the files. But I guess you would like to check if it’s enabled or disabled:

vmware-vim-cmd /hostsvc/autostartmanager/get_defaults

The big question remains, how do I know what I can and can’t do with “vimsh”. Well that’s the main reason for this post, as I said Wil has been very busy documenting “vimsh”. Wil created VI-Toolkit.com. VI-Toolkit.com contains a section on vimsh. Besides the the info that the vimsh command provices Wil added sample code. The sample code can be very usefull, but the search function is even more useful. Searching the vimsh documentation provides you with a fast way to check if a specific configuration action can be scripted with “vimsh”. For instance a search on “vimsh role” returns the following:

* Vimsvc/auth/role add
==== vimsh vimsvc/auth/role_add ==== Usage: role_add roleName [priv0] [priv1] [priv2] [priv3] [priv4]
171 B (24 words) – 14:32, 26 December 2008
* Vimsvc/auth/role permissions
==== vimsh vimsvc/auth/role_permissions ==== Usage: role_permissions roleName
1 KB (118 words) – 22:26, 28 December 2008
* Vimsvc/auth/role remove
==== vimsh vimsvc/auth/role_remove ==== Usage: role_remove roleName [failIfUsed]
123 B (16 words) – 14:34, 26 December 2008
* Vimsvc/auth/roles
==== vimsh vimsvc/auth/roles ==== Usage: roles
7 KB (550 words) – 21:50, 28 December 2008

I guess I can sum up this blog post in just one line:”Bookmark VI-Toolkit.com and add it to your RSS reader!”. Be sure to not miss out on anything regarding “vimsh” or any of the VI Toolkits that Wil be be describing and aggregating source code for. The “vimsh” section alone is already 345 pages large and it will continue to grow even more. Keep up the great work Wil and it was nice meeting you in person!

UPDATE: ESX Deployment Appliance 0.85

Duncan Epping · Dec 29, 2008 ·

Like I told you guys in my post on the ESX Deployment Appliance, Herco keeps developing / tweaking the ESX Deployment Appliance. Two days ago 0.85 was released. This new version contains:

  • ESXi support (it works, just not unattended yet. hints appreciated!)
  • New scriptbuilder interface. Makes building scripts even easier and more accessible
  • Scriptpart editor. rudimentary but working nicely 😉

For version 0.9 Herco has got the following features / additions on his todo list:

  • Boot from SAN support
  • Editing the order of the scriptparts
  • Hopefully, unattended ESXi installations

So keep checking the VMware virtual appliances section or Herco’s blog for information on new releases. Start checking it out and keep giving feedback so Herco can keep improving his excellent appliance!

ESX Deployment Appliance

Duncan Epping · Dec 22, 2008 ·

A couple of weeks ago I was working on a project together with a consultant from PQR, Herco aka Brugh. He told me about a Virtual Appliance he created called “EDA”. It took a couple of minutes before I knew what he was talking about… ESX Deployment Appliance. I’ve played around with it for a while about half a year ago but because we were actively using UDA(ultimate deployment appliance) I didn’t had much time to actually get used to it and introduce it to my colleagues.

During the project Herco showed me what he had actually created and how easy it was to deploy ESX with his appliance. I don’t think there’s a reason to tell you guys again why you need to do a scripted install. EDA is a PXE Boot Virtual Appliance build on JeOS. In other words, boot your ESX installer / iso via the PXE appliance. So no need for burning modified iso’s or hosting your scripts on a random webserver. EDA does all of that for you. Because JeOS was used the appliance is small and doesn’t contain any slack.

The cool thing about EDA compared to UDA is that EDA is specifically created for ESX. It contains a lot of sample code which will make your life a lot easier when creating scripts. EDA also works a lot more intuitive than UDA in my opinion, the GUI looks solid. Besides that, EDA is actively being developed and UDA seems to have died.

If you want to have a better understanding of what EDA is take a look at this video that Herco made:

Herco also started a topic on the VMTN forums, if you’ve got any questions contact him via the forums. He usually responds very quick. And if you’ve got good tips / scripts / modification he will look into it and might integrate it with the new upcoming version. For a short guide on howto install and using the appliance check Herco’s blog. Herco told me that there’s a new version coming up soon. Add his blog to your favorites and keep checking it.

By the way, Herco is also the guy who created the X-M0n0wall Virtual Appliance. His colleague Ruben Spruijt also wrote an article on EDA a couple of months ago, you can find read it here.

Add RDM Size info to VI Client using Powershell

Duncan Epping · Dec 19, 2008 ·

Hugo keeps on going writing and updating his powershell scripts! This time Hugo created a script that adds a custom field to your VC with RDM disk size info:

In the VMware VI Toolkit Communities, a request was made for a similar script that adds the total size of all Raw Device Mappings (RDMs) on a VM to a Custom Field in the VI Client.

Visit his article for the script and the complete blogpost. Don’t forget to download the updated versions of the other custom field related scripts.

Health Check tools I use

Duncan Epping · Dec 18, 2008 ·

A few days ago Scott Lowe asked me which tools I use to deliver a health check engagement. A health check is a standard VMware PSO engagement, a VMware Consultant will be on site to check the status of your environment and will draw up a report.

I personally use the following tools:

  • Health Check script by A.Mikkelsen → for a quick overview of the current situation and setup, small files and easy to carry around, runs from the Service Console.
  • VMware Health Analyzer Appliance → A linux appliance that can connect to your VC/ESX and analyze log files. At this point in time it’s only available for VMware Employees or Partners with access to Partner Central.
  • Powershell: Report into MS Word → Alan Renouf created this great reporting powershell scripts. It dumps info into a word document. (And i’ve heard he’s also working on a Visio export)
  • Powershell: Health Check Script → Create an html report with datastore, cpu, memory and snapshot info… and more.
  • RVTools → Gives a quick overview of current VM setup like snapshots, memory, cpu etc.
  • Common sense → I hardly encounter really huge problems, mainly decreased availability cause of choices made during implementation / design phase without following VMware’s guidelines. Use common sense is the best advise in this case and read the best practice documents and VMware’s collection of pdf’s!
  • And when there are some disturbing errors in one of the various log files you have the option to run it through one of the many toolkits we internally have.

I’m not using the following tools actively during engagements because of licensing but they can be very usefull in your enviroment:

  • Replicate Datacenter Analyzer → Analyze your VI3 environment, I wrote an article a few weeks ago on RDA, click here
  • Veeam Monitor → Monitor your VI3 environment including performance graphs etc.
  • Veeam Reporter → A reporting tool, which will come in handy when documenting environments and comparing the current config to an old config.
  • Vizioncore vFoglight → Might come in handy when doing analyses of trends and pinpointing resource contention.
  • Tripwire Configcheck → Analyze the security of your VMware ESX environment. Check my blog post on Configcheck here.
  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 32
  • Page 33
  • Page 34
  • Page 35
  • Page 36
  • Interim pages omitted …
  • Page 44
  • 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