HA High availability issue in ESXi 4.1

From somebody on expertsexchange

There are 2 main reasons cause the problem
1. DNS name issue
2.vcenter build version is not match the ESXi build version

Please following these steps to fix the problem, it’s my own notes, fixes all the 3 causes
Failed to enable HA agent on an ESXi host
1.Try to disable HA on Cluster level, by right click ‘clusterX’, edit setting. Uncheck HA and DRS.
2.Waiting for disabling HA tasks completed for all hosts.
3.Back to cluster “edit setting”, check only ‘enable HA’, click ok. It takes a few minutes to get all ESXi hosts on cluster have HA agent installed.
4.Then enable DRS.
5.If one or more ESXi host HA agent is not started. Right click the failed host, “reconfigure for HA agent”
6.If the problem still not get fixed. Disconnect the ESXi host, link through SSH, run the following to uninstall HA agent on host
7./opt/vmware/uninstallers/VMware-vpxa-uninstall.sh & /opt/vmware/uninstallers/VMware-aam-ha-uninstall.sh , restart vm management services by /sbin/services.sh –restart
8.Then reconnect ESXi on vcente, vcenter will push a new version of HAagent installation.

installing windows 2012 server onto esxi 4.1

edit vmx file and add lines:

bios440.filename = “bios.440.rom”
mce.enable = TRUE
cpuid.hypervisor.v0 = FALSE
vmGenCounter.enable = FALSE

the file bios.440.rom must be added into the same folder as the virtual machine. Link for it is below – rename it by changing .tiff to .rom after downloading.

bios440rom

Some references point to issues with this method, which may be solved with this:

To work around this issue, manually create a CPUID mask for the affected virtual machines:

To manually create a CPUID mask for the affected virtual machines:

1.Power down the virtual machine.
2.Right-click the virtual machine and click Edit Settings.
3.Click the Options tab.
4.Select CPUID Mask under Advanced.
5.Click Advanced. ◦For Intel:

1.Under the Register column, locate the edx register under Level 80000001.
2.Paste this into the value field:

—-:0—:—-:—-:—-:—-:—-:—-

For example, cpuid.80000001.edx = —-:0—:—-:—-:—-:—-:—-:—-

◦For AMD:

1.Select the AMD Override tab.
2.Change cpuid.80000001.edx.amd = ———–H——————– to
cpuid.80000001.edx.amd = —-0—————————

6.Click OK to close the virtual machine properties.

saltstack

SaltStack Enterprise
Speed + Scale + Flexibility + Simplicity

SaltStack is systems and configuration management software used to automate any infrastructure, cloud or DevOps function

SaltStack fundamentally improves the way enterprise IT organizations and DevOps teams configure and manage all aspects of a modern data center infrastructure. SaltStack provides a completely different approach to legacy alternatives not built for the speed and scale of the cloud. The largest enterprise IT and Web-scale organizations in the world use SaltStack to orchestrate and control any cloud while providing automation for the DevOps toolchain. SaltStack is built on an extremely fast, scalable and powerful remote execution platform for efficient control of distributed infrastructure, code and data.

better way to copy

Originally from servervault by a user named Johan

Bonus: a better way to copy

If you have thinly provisioned client, you can use the command-line tool vmkfstools like so:

vmkfstools -i /vmfs/volumes/path_to_datastore/path_to_source_vm/vmname.vmdk /vmfs/volumes/path_to_dest_datastore/path_to_dest_vm/vmname.vmdk -d thin &

This will clone (-i) the vmdk file and make sure the destination file is thinly (-d thin) provisioned. The & at the end of the command will make sure you get your command prompt back.

It will copy much faster than the GUI copy does, and you can cancel it easier.

canceling a vmkfstools copy

ps |grep vmkfstools Note down the PID. kill 12345
Where 12345 is the first number listed on the vmkfstools line.