• 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

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!

Check if autostart is enabled from the COS

Duncan Epping · Jan 1, 2009 ·

I didn’t know this was possible. But you can easily check via the COS if autostarting of VM’s in enabled or not according to this KB article:

  1. Log in as root to your ESX host with SSH.
  2. Open the /etc/vmware/hostd/vmAutoStart.xml file in text editor.
  3. Search for a line that reads:

    <enabled>true</enabled>

  4. If you find the line, the functionality is enabled. If you do not find the line, the functionality is disabled.
  5. If you want to disable autostart for all virtual machines on the host, remove the line.
  6. If you want to enable the functionality, add the line immediately after the line ending with:
  7. <dynamicProperty>

  8. Save your changes and exit.
  9. Restart the management agents on the ESX host:
    service mgmt-vmware restart

Happy New Year

Duncan Epping · Jan 1, 2009 ·

I just wanted to wish you all a happy New Year! Let’s hope 2009 will be as great as 2008 was. I will try to produce a whole bunch of great articles again! And Yellow-Bricks will have other contributors in 2009 to bring Yellow-Bricks.com to the next level. So keep checking this site for the latest and greatest info! When the first contributor is settled I will give him a proper introduction!

Just before 2008 ends: Patches!

Duncan Epping · Dec 31, 2008 ·

Just before 2008 ends VMware released a bunch of patches for the 3.0.X release of VMware ESX. 9 Patches, all are “General” patches:

ESX303-200812401-BG: Virtual Machines Stop Responding When Disconnected from Serial Port
ESX303-200812402-BG: Fix for vdf -P Command to Delimit the Output Values With Proper Spacing
ESX303-200812403-BG: Qlogic iSCSI Driver Allocates Target IDs Greater than 255
ESX303-200812404-BG: Permissions on the Service Console File System Change to Read-Only During Long NetApp Cluster Failover
ESX303-200812405-BG: CHAP Authentication Failure on ESX Server
ESX303-200812406-BG: Fix for hostd RPM
ESX303-200812407-BG: Required Patch for IBM FAStT Storage Arrays (DS3000, DS4000, DS5000 families) to Correct an Issue with Failover; Fix for a VMFS Filesystem Issue
ESX303-200812408-BG: QLogic Driver RPMs Versions Mismatch
ESX303-200812409-BG: Hyperthreading Status Reported Incorrectly on Non-HT Multicore Processors for ESX Server 3.0.3

VM’s vmware.log rotation options

Duncan Epping · Dec 30, 2008 ·

Yesterday I posted about the article on the hostd, vpxa and vpxd log file options. Today another KB article has been released to setup a rotation scheme for the VM’s log file: vmware.log. Might be worth checking it out and setting it up. You need to change the VM’s vmx file for this to work though. In short:

logging = true or false
log.rotateSize = maximum size in bytes the file can grow to: 10000
log.keepOld = rotation level, amount of log files to keep: 10
log.fileName = change name and path of log file

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 406
  • Page 407
  • Page 408
  • Page 409
  • Page 410
  • Interim pages omitted …
  • Page 492
  • 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)

Advertisements




Copyright Yellow-Bricks.com © 2025 · Log in