Thursday, November 29, 2012

Bring ESX host out of maintenance mode without vCenter

I had a downtime recently that we were moving very old hardware running VMware ESX 3.5.  After the move the vCenter server would not start up, it wouldn't even boot!  The worst part is the hosts were in maintenance mode and wouldn't manually allow me to start the guests from the command line!  

The command to exit maintenance mode also failed:
vimsh -n -e /hostsvc/maintenance_mode_exit

So I knew this being based off of linux that there had to be a conf. file of some sort somewhere that told the host that it was in maintenance mode or not.  I found it here:
/etc/vmware/hostd/hostsvc.xml

This is what the code should look like:

  mode normal mode 






 B
y editing the file and changing the word maintenance to normal and rebooting the host I was then able to issue the command to start the vm:

vmware-cmd vm_guest.vmx start

It worked!

Error message when you try to set an IP address on a network adapter

Recently I have done some P2V and V2V migrations with the guests being windows 2003 and above and I get an error message when I go to IP the new nic's about there being a "hidden" nic with the same IP address.  I followed this KB and it did work.  In short here are the steps that I did:

Method 1

  1. Click Start, click Run, type cmd.exe, and then press ENTER.
  2. Type set devmgr_show_nonpresent_devices=1, and then press ENTER.
  3. Type Start DEVMGMT.MSC, and then press ENTER.
  4. Click View, and then click Show Hidden Devices.
  5. Expand the Network Adapters tree.
  6. Right-click the dimmed network adapter, and then click Uninstall.