ESX FT Fault Tolerance VMware

By , October 31, 2012 6:55 PM

Quote the VMware FT compatibility Requirements:

Identify VMware FT compatibility requirements

  • Same Build number for ESX(i) hosts
  • Gigabit NIC’s
  • Common Shared Storage
  • Single Proc machine
  • Thin Provisioned disks not supported (automatically converted)
  • No snapshots
  • PROBABLY ONLY ONE CPU

Lab Environment

I have following hardware as my lab equipment.

2 identical HP server. 6 Nics on the server. 1 Test VM running W2K3R2 x64bit.

Test VM has 1 vCPU.

All right. We all set. Let’s see what we can do.

Turn on Fault Tolerance

If you got all your configuration right, all what you need to do is to right click your VM and choose Turn on Fault Tolerance.

ft-01

ft-02

However, you may got following errors.

Typical Errors

 

1.No FT VMkernel

ft-03

Reason:

FT requires to use specific Network to make sure logs will be copied from Primary VM to Secondary VM. You need to either create a specific VMkernel or use the exist one. In my case, I use my vMotion network since I know I don’t vMotion much.

Solution:

ft-04

 

 

2. Insufficient resources for HA

ft-05

Reason:

The FT requires HA to be enabled. However, with my scenario, I only have 2 hosts and HA enabled. The Host failure cluster tolerate is 1 host. FT won’t accept that. The easiest way is to use percentage of resrouces and setup it as 5%.

Solution:

ft-06

3. Thin disk need to be converted to thick

ft-07

Reason:

This is a test lab. The is no double I use thin disk for this test VM. so FT doesn’t work on thin disk and it has be converted to thick.

Solution:

Power off test VM. Go to that VM from datastore broswer and right click the vmdk. Choose “Inflate”

ft-08

 

Then, it should work!

ft-09

Conclusion:

Few tips for FT. FT is very powerful. I have running ping test from test VM and power off the primary host. No ping was dropped!. But it does generate heaps of traffic on FT log vmkernel (33MBPS). so Please be aware don’t put too much pressure on your network.

Sendmail and sm-client slow on startup

By , October 27, 2012 3:29 PM

Problem solved, I just had do add 127.0.0.1 localhost.localdomain localhost to /etc/hosts!

Rename VMware Virtual machines on ESX

By , October 23, 2012 9:07 PM

With the release of esxi/vsphere 5, storage vmotion no longer renames the files of a vm if the
vm was previously renamed. It only updates the folder to reflect the new name. If a person
wants to rename a virtual machine and make sure that the virtual machine reflects the new
name in the folder and files, follow these steps.

Warning: Try this on a non-production environment. We are not talking about what is
supported, just what works. Also, be aware that you may have more files involved, such
as an rdm, snapshot and so forth. Proceed at your own risk.

1. RENAME THE DIRECTORY
rename the directory to the desired name

2. RENAME ALL THE FILES
eg:

xxxxx.vmx  (This is the primary configuration file, which stores settings chosen in the New Virtual Machine)
xxxxx.vmsd
xxxxx.nvram  (virtual machine’s BIOS)
xxxxx.vmdk
xxxxx-flat.vmdk (This is a virtual disk file, actual virtual hard drive )
xxxxx.vmxf    (This is a supplemental configuration file for virtual machines that are in a team)
xxxxx.log   (you can probably delete this useful log file)
xxxxx.vmem  (is a backup of the virtual machine’s paging file. It will only appear if the virtual machine is running, or if it has crashed)
Note: In this case, there were no snapshots so the .vmsd file was empty.
xxxx.vmsd  (This is a centralized file for storing information and metadata about snapshots. )

2.EDIT THE CONTENTS OF FILES
xxxxxx.vmx file
Use a global search and replace.
to rename your machine

xxxxxx.vmdk files
Use a global search and replace.
to rename your machine

xxxxxx.vmxf files
Use a global search and replace.
to rename your machine

 

 

3. PRAY :)

if you have errors read them and slowly file by file trace them back

 

START VM WORKSTATION VM at STARTUP

By , October 21, 2012 7:34 PM

How to autostart a virtual machine in VMware Workstation
Create a batch file with this line:
“C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe” -T ws start E:\VMs\wxp-a\wxp-a.vmx nogui
Replace wxp-a with the name of your virtual machine.
Call this batch from your windows startup menu.

MYSQL REPLICATION SETUP

By , October 16, 2012 5:37 PM

SERVER SETUP

server-id    = 1
binlog_format=mixed

# LOG FILES ON THE SERVER FOR REPLICATION LOGS
# mserver-log-bin.log are the (log-bin) files that the slave will connect to
#ensure you make the directory of mysql qill fail
log-bin =E:/xampp/mysql/data/replication/mserver-log-bin.log
max_binlog_size = 500M
expire_logs_days = 50

#A Small Note: You may want to define a report host in your slave and master.
#You do this by adding report-host=masterIP on the slave and report-host=slaveIP on the master.
#Where masterIP is the masters IP and likewise for the slaveIP. This will make the boxes report to each other
#their hostname and some other information and allows you to query “show slave hosts”. While this seems semi-pointless,
#it ends up being quite useful.

#report-host=slaveIP to be used on the master
report-host=backup
report-host=vmbackup

 

SLAVE SETUP

binlog_format=mixed
#usually number assigned by phpmyadmin but not 1 and cant be the same as another slave
server-id=1350397249

#relay-log specifies the location and name of the relay log
#make sure the directory exists
relay-log = replicationrelayfiles/mysql-relay-bin
relay-log-index =  replicationrelayfiles/mysql-relay-bin.index
relay-log-info-file = replicationrelayfiles/relay-bin.info
relay-log-space-limit = 500M

#report-host=masterIP to be used on the slave machine
report-host=mserver

#read-only prevents data changes on the slaves, because slave is really usually used for reads
# so the database rep is not broken
read-only = 1

 

SETUP MASTER
e:
cd xampp\mysql\bin

mysql -u root -p
then enter your password

WARN USERS NOT TO USE MASTER SERVER FOR 3-4 mins

FLUSH TABLES WITH READ LOCK;
RESET MASTER;
FLUSH LOGS;
SHOW MASTER STATUS;

commonly mserver-log-bin.000001 |      107

this will give you a file name and a position, write these down
then copy over the databases over to the slave

UNLOCK TABLES;
QUIT;

Users are ok to use the master server,

SETUP SLAVE
e:
cd xampp\mysql\bin

mysql -u root -p
then enter your password

STOP SLAVE;
FLUSH SLAVE;
RESET SLAVE;

CHANGE MASTER TO
MASTER_HOST=’X.X.X.X’,
MASTER_USER=’slave’,
MASTER_PASSWORD=’slavepassword’,
MASTER_PORT=3306,
MASTER_LOG_FILE=’mserver-log-bin.000001′,
MASTER_LOG_POS=107;

START SLAVE;
SHOW SLAVE STATUS \G

 

 

Additional Replication Options

MASTER

Rather than all databases set the specific ones you want replicated

binlog-do-db=thisdb,anotherdb

OR per line

binlog-do-db=thisdb

binlog-do-db=anotherdb

 

Replicate all but the following databases

binlog-ignore-db=tempdb,testdb

OR per line

binlog-ignore-db=tempdb

binlog-ignore-db=testdb

 

 

SLAVE

Rather than all databases set the specific ones you want replicated

replicate-do-db=repthisdb,repthatdb

OR per line

replicate-do-db=repthisdb

replicate-do-db=repthatdb

 

Replicate all but the following databases

replicate-ignore-db=norepthisdb,norepthatdb

OR per line

replicate-ignore-db=norepthisdb

replicate-ignore-db=norepthatdb

 

Replication of specific tables

replicate-do-table=dbname.tablename

 

Preventing replication of specific tables

replicate-do-ignore=dbname.tablename

 

Rewrite the database name

replicate-rewrite-db=olddbname->newdbname

Thomas Challenger Thomas Challenger