Friday, February 20, 2009

vmware navisphere agent install

Here is how to install the navisphere agent on esx

Log into ESX server via ILO
VI /etc/ssh/sshd_config
Change permit root login = yes to uncommented
comment out permit root login=no
run service sshd restart
Use winscp to connect to the server via ssh
Copy the navisphere files to /home
Log into the ESX server via ssh
See if the agent is already installed by running rpm -qi naviagent
rpm -ivh naviagent-.rpm
add user system@(IP address of SPA) to the agent.config file in /etc/navisphere/agent.config using vi
add user system@(IP address of SPB) to the agent.config file in /etc/navisphere/agent.config using vi
You can also do the above steps using the navicli by typing: navicli remoteconfig -setconfig -adduser system@SPA IP (Do the same for SPB)
run service naviagent start from the command line
Open up firewall ports by typing the below commands
[root@server home]# esxcfg-firewall -o 6390,tcp,in,naviagent
[root@server home]# esxcfg-firewall -o 6391,tcp,in,naviagent
[root@server home]# esxcfg-firewall -o 6389,tcp,in,naviagent
[root@server home]# esxcfg-firewall -o 6392,tcp,in,naviagent
[root@server home]# esxcfg-firewall -o 443,tcp,out,naviagent
[root@server home]# esxcfg-firewall -o 2163,tcp,out,naviagent
[root@server home]# esxcfg-firewall -o 6389,tcp,out,naviagent
run service firewall restart
run esxcfg-firewall -q to see open ports
run service naviagent restart

Friday, February 13, 2009

VMware round robin load balancing

I have been curious to test out round robin load balancing in ESX 3.5. Recently I have been only working with Clariion (active/passive) arrays. Now at my new client they have active/active arrays (Symmetrix).

From my understanding the way it works is it will push I/O on an HBA path until a set amount of blocks are sent. At that point it looks to see which HBA has a smaller queue and it will use that path until the number of blocks is reached again.

You dont have to set it like this. You can have it use a preferred path, etc., but this option seems to make the most sense.

I dont know if this is how it really works, but that is my understanding. Pretty cool stuff if it works. As to this day it still says experimental.

Anyone use this?

Wednesday, February 11, 2009

SYSLOG with ESX

To use a syslog server with your ESX environment:

In /etc/syslog.conf file add the line "*.* @IP Address”
service syslog restart
"esxcfg-firewall -o 514,udp,out,syslog" to allow syslog outgoing trafic
"esxcfg-firewall -l" to load config

Monday, February 9, 2009

Convert RDM to VMFS

To convert a VMware RDF device, which is harder to manage than a VMFS volume, you can run the below command. I have needed to this for various reasons, namely data center migrations. You can conver it back later, if needed, which I have also done.

vmkfstools –i /vmfs/volumes/data1/W2K3standardgoldenmaster/W2K3standardgoldenmaster.vmdk -d rdm:/vmfs/devices/disks/vmhba1:0:6:0 /vmfs/volumes/data1/rdmvir/rdmvir.vmdk

VMware queue depth

I know every ESX admin has dealt with storage performance issues at some point. Most detailed research includes modifying the HBA queue depth.

Basically queue depth is the number of outstanding requests between the HBA and storage. I believe the default is 32. This is normally fine, but with VMware you are sharing the HBA so if you have a multitude of high i/o servers, you may have more than 32 requests.

When the queue length is reached there is basically a SCSI reset and communications is briefly halted. This can cause performance issues if it happens often.

You can use ESXTOP in disk mode to see your queues. If you decide to change them you can use esxcfg-module as per below (from http://communities.vmware.com/message/790859#790859):

Set the HBA queue length to 64 on all adapters

to get driver: vmkload_mod -l | grep qla for q logic
vmkload_mod -l | grep lpfcdd for exmulex
to change q logic
esxcfg-module -s "ql2xmaxqdepth=nn"
esxcfg-boot -b or esxcfg-boot -m
reboot
to change on emulex
esxcfg-module -s "lpfc0_lun_queue_depth=nn lpfc1_lun_queue_depth=nn"
esxcfg-boot -b or esxcfg-boot -m
reboot

Make sure to defragment your VC DB

I have been doing this for years, but wanted to make sure that I shared this. If you see any performance issues with Virtual Center, this usually helps the problem.

I would assume everyone does it, but when I talk to people about it, they generally dont.

This is how to defrag the DB:

Log in to Microsoft SQL Server Management Studio as an administrator.
Right-click on the database that VirtualCenter is using.
Click New Query.
In the New Query window type:
Use (DB)
go
dbcc showcontig (VPX_HIST_STAT,VPXII_HIST_STAT)
go
where represents (DB) the name of the database that is running VirtualCenter.
Click Execute.
Look at the amount of fragmentation
To defragment
Log in to Microsoft SQL Server Management Studio as an administrator.
Right-click on the database that VirtualCenter is using.
Click New Query.
In the New Query window type:
dbcc indexdefrag ('', 'VPX_HIST_STAT', 'VPXII_HIST_STAT')
go
where represents the name of the database that is running VirtualCenter.
Click Execute.