Showing posts with label ESX. Show all posts
Showing posts with label ESX. Show all posts

Tuesday, September 29, 2009

ESX Host Loses Connectivity Briefly

I have seen this issue with ESX 3.5 Update 2 and Update 4, the host disconnects briefly from the console and there are no real error messages in VirtualCenter other than indicating the disconnection.

Some research revealed that this is due to a memory leak in hostd. To mitigate the issue, I increased the Service Console memory 800 MB and the modified the soft and hard memory limits in the config.xml file.

You can identify this issue from the following errors in /var/log/vmware/hostd.log:

[2009-09-29 01:25:54.857 'Memory checker' 19467184 warning] Current value 204800 exceeds soft limit 122880.
[2009-09-29 01:26:24.868 'Memory checker' 18668464 warning] Current value 204800 exceeds soft limit 122880.
[2009-09-29 01:26:54.879 'Memory checker' 3076465568 error] Current value 204852 exceeds hard limit 204800. Shutting down process.

To change the console memory configuration from the default of 272 MB with ESX 3.5 to the max of 800 MB, edit the memory settings from VirtualCenter under Configuration -> Memory -> Properties. This change requires a server reboot.

To change the hard/soft limits, add the following into the <config> section of /etc/vmware/hostd/config.xml
<hostdWarnMemInMB>300</hostdWarnMemInMB>
<hostdStopMemInMB>380</hostdStopMemInMB>

Do a restart on hostd process by:
service mgmt-vmware restart

Friday, September 11, 2009

Restart VMware Management Service

When all else fails..., run:

"service mgmt-vmware restart"

Recycling this service has cleared up many errors, I keep it handy. Case in point, the following error was thrown and then I lost control of the CD-ROM in one of my VMs. I recycled the VM and I still couldn't access the CD.

Error message:




Before recycling service:



After recycling service:

Sunday, July 12, 2009

How to Change the ESX Host IP Address

Use PUTTY to telnet to server
login as root

To change the IP address, do the following
Delete the current IP setting: esxcfg-vswif –d vswif0
Add the new IP address for interface vswif0:
esxcfg-vswif –a vswif0 -p Service\ Console -i 192.x.x.x -n 255.255.252.0 –b 192.x.x.255
The ‘\’ between service and console is required.

After the change, type in esxcfg-vswif –l to verify that the change was applied

If the default gateway needs to change, edit /etc/sysconfig/network. Use VI or your favorite editor to accomplish this.
Example using VI:
Type vi /etc/sysconfig/network
Press the letter i to put vi into ‘insert’ mode
Use the arrows on the keyboard to navigate to the GATEWAY and make the change.
To save the change, press ESC then colon :, then w then q
ESC :wq
To exist without saving, press ESC, then colon :, then q
ESC :q

Restart networking
Execute /etc/init.d/networking restart

Other tasks
Update the IP address in DNS
Remove and re-add the host to Virtual Center

Wednesday, July 8, 2009

How to remove snapshots for all VMs on a Host

From the ESX console, run the following command

vmware-cmd -l | while read vmxpath; do vmware-cmd $vmxpath removesnapshots;done

This gets a list of the VMS, for each item returned, pass in the path through the variable $vmxpath and run the removesnapshots command.