Archives For December 31, 2008

Taken from http://www.lavmug.org/node/31

“Could not power on VM : No swap file. Failed to power on VM” – This issue is caused when a VM guest tries to power on and some other ESX host has one or more guest files open. This is usually due to a crash or fault in the ESX Cluster that HA did not complete successfully.

 

Here is how to fix:

#1) Login to each ESX’s service console and issue this command: is case sensitive.

For ESX2.x and 3.0.x type: ps -ef | grep vm_guest_name
For ESX3.5.x type: ps -efwww | grep vm_guest_name

If the VM is not running on the ESX host you are on, you will get something like:

root 3483 3217 0 10:38 pts/2 00:00:00 grep vm_guest_name

If you get something like this: (This is the process that has your file open in ESX)

root 1092 1 0 10:33 ? 00:00:00 /usr/lib/vmware/bin/vmkload_app /usr/lib/vmware/bin/vmware-vmx -ssched.group=host/user -# name=VMware ESX Server;version=3.5.0;licensename=VMware ESX Server;licenseversion=2.0 build-82663; -@ pipe=/tmp/vmhsdaemon-0/vmx6a6188c22e804baf; /vmfs/volumes/48729e6e-7cf3b2df-6ca0-001ec9b1b30a/vm_guest_name/vm_guest_name.vmx
#2) You will want to kill the process that is still holding your VM guest files open. You can do this by typing:

kill -9 pid
Example using above VM: kill -9 1092 ( you will notice the pid/process ID in bold)
#3) After doing this, you should be able to Power On your VM guest.

*** Please remember that some HA/DRS issue could have caused this error. Please take a close look at your guest/hosts logs OR call VMware support.

-Will

All these commands are performed at the command line on the console or by using a SSH client (using SSH client allows some nice copy and paste action).

Firstly open the firewall ports
esxcfg-firewall -o 80,tcp,out,”APC PowerChute Port 80″
esxcfg-firewall -o 3052,tcp,out,”APC PowerChute Port 3052″
esxcfg-firewall -o 3052,tcp,in,”APC PowerChute Port 3052″
esxcfg-firewall -o 3052,udp,out,”APC PowerChute Port 3052″
esxcfg-firewall -o 3052,udp,in,”APC PowerChute Port 3052″

Download the software from ftp://ftp.apcc.com/apc/public/software/unix/linux/pcns/221vmware

Then install the APC Network Shutdown Software
rpm -ihv pcns-2.2.1-100.i386.rpm

Then configure the software
/usr/local/bin/PowerChute/PCNSConfig.sh
Type 3 and press enter
Type in the IP address of the Management Card and press enter
Port 80
Enter the Username, Password and Authentication Phrase
Repeat for the second management card
Answer No to registering another management card
Answer Yes to starting the service

Now you can configure the event actions etc by pointing your web browser to http://servername:3052/

Other commands
/etc/rc.d/init.d/PowerChute stop
/etc/rc.d/init.d/PowerChute start
To uninstall, type rpm -e pcns

MOST IMPORTANT SETTING OF ALL (IMHO)
Once logged on to the web interface
Click the ComputerName link
Specify the Configure Shutdown settings
UNTICK Turn off the UPS after the shutdown finishes.
Click Apply

This step is EXTREMELY important, otherwise once this server has shutdown it will power off the UPS regardless of other servers connected to the UPS.

Anways let me know if I’ve missed something or if I’ve opened too many ports etc. Always willing to help out.

Troy