Enter maintenance mode from the ESX command line:
vimsh -n -e /hostsvc/maintenance_mode_enter
I have used this command several times in anger. It is particularly useful if you can’t get to your VirtualCenter server for whatever reason.
There are some commands which are definitely worth learning. Fortunately you can get by with just a small handful.
Sometimes people ask me why they would want to learn CLI commands, when the VI Client provides a nice GUI. This topic is worthy of a long post of its own, but to cover some of the obvious ones:
- Some people find it easier/quicker than the VI Client
- Some functionality is still not available from VI Clien
- CLI allows for scripting
- Sometimes the VirtualCenter is not available (particularly if it is a VM itself)
- If the VirtualCenter database server is offline, VirtualCenter itself can become unworkable
- If the ESX hosts console networking gets screwed
- You have physical access to ESX consoles but no way to get to a windows GUI
When things need fixed quickly, usually at some ungodly hour of the night, those CLI commands can be difficult to remember. However, as long as you know a bit about the CLI, if you remember these simple things then you can do just about anything:
This lists out most commands that you would use. Some of the command names aren’t that obvious e.g. vmkfstools. This listing will often help you remember what you are looking for, or spark an idea when your mind has gone blank.
Once you’ve figured out which command it was that you were looking for, then run it with the –h option. For all VMware commands this will show a short listing of all the command’s options, switches and syntax; very similar to the /? from DOS. You can use man command if you need a more detailed explanation, but –h usually does enough to spark some synapse.
-l (l for lima)
Often worth remembering, as this switch will usually list the current configuration set.
These days, just about all the important log files are here (and its sub-directory). With this command you can see which log files you might want to look at and run them with a simple tail command (or even grep).
This command will produce a fair amount of information so you can pipe it to grep to look for running or stopped, or query the status of a single service. However it can also provide some useful extras – for example it tells you what registered services have the local firewall ports opened for them.
Most commands I run, I have usually run before. This is the ultimate reminder.
You see, very simple commands, but great starting points. Unfortunately, now the basic VMware Install and Configure course doesn’t cover much (if any?) CLI stuff, it is often though of as a real black art.
It is always worth reminding people that even if the VirtualCenter server is unavailable, that you do have a couple of other options in an emergency:
- You can connect the VI Client directly to host ESX servers. A lot of less experienced people think of the VI Client as VirtualCenter. However if VirtualCenter is unavailable then the VI Client can connect to hosts.
- The VI web access. You can connect to each host server via its web access on https://hostname/ui. From Web Access you can do basic VM management. Even VirtualCenter itself hosts its own Web Access portal https://VC_hostname/ui.
These two methods are often forgotten in a panic, but they have helped me countless times.
You don’t always need to remember how to do everything, just how to help yourself remember.
- @nickmarshall9 I'll be at SFO this year, bit I'm running low on time to put things together. : 5 days ago
- @gurusimran Would like to but I need to think about what I'd submit as a design. : 5 days ago
- @coolsport00 @timantz @virtualizecr Thanks guys! (Shane, your study notes were great - vBeer coming your way at VMworld 2013) : 5 days ago
- Whoohooo! Just got my VCAP5-DCA score - 441. Very happy as I'm not so hands-on these days. Step 3 complete, onto step 4. : 5 days ago
- @theGuate Yes, that's no longer the case & is an error. When we realized we told the publishers to remove from reprints & add to errata. Thx : 5 days ago
- #KneeKnacker training run this morning http://t.co/EcDcACDohP : 1 week ago
- Off to sit my VCAP5-DCA. Fingers & toes crossed. : 2 weeks ago
- View 5.2 tip: Win 7 Optimization Guide advises setting Win Firewall service to disabled. This breaks Blast service (HTML5 access). : 3 weeks ago
- Check out this handy online IOPS calculator, very nicely done: wmarow.com/strcalc/strcal… : 4 weeks ago
- VMware Certified Professional on vSphere 5 (VCP5) Study Guide | The Virtualization Guy on vSphere 5 vReference card – vCenter section
- VMware Certified Professional on vSphere 5 (VCP5) Study Guide | The Virtualization Guy on vSphere 5 vReference card – VM section
- VMware Certified Professional on vSphere 5 (VCP5) Study Guide | The Virtualization Guy on vSphere 5 vReference card – availability section
- VMware Certified Professional on vSphere 5 (VCP5) Study Guide | The Virtualization Guy on vSphere 5 vReference card – networking section
- VMware Certified Professional on vSphere 5 (VCP5) Study Guide | The Virtualization Guy on vSphere 5 Card
- VMware Certified Professional on vSphere 5 (VCP5) Study Guide | The Virtualization Guy on vSphere 5 vReference card – resources section
- My VCP5 upgrade experience on vSphere 5 Card
- Paul Kelly on VCAP5-DCD: small but important change to the exam format
- Cheat Sheet: vSphere 5 Reference Card on vSphere 5 Card
- Chris. on vSphere 5 Card