VMware Cloud Community
Michelle_Laveri
Virtuoso
Virtuoso

vmhba syntax and HBA device

I have a minor irratation...

I have 4 servers each with QLogic card... two of these have an ordinary Smart Raid Array 6 controller, the other 2 have a SAS controller... this isn't embedded on the motherboard on but the second PCI bus on the riser.

So on two my servers the first fibre-channel HBA is vmhba1, but on the SAS boxes its vmhba0.

I assuming that if I want them to return vmhba1, the ONLY[/b] way to do this would be to re-order the cards in the PCI slots have the SAS controller above the Qlogic card...

Why is this an irratation? Kickstart scripts...

Regards

Mike

Regards
Michelle Laverick
@m_laverick
http://www.michellelaverick.com
Reply
0 Kudos
5 Replies
alistairjross1
Enthusiast
Enthusiast

Hi Mike,

Have you made any progress with this? I've started testing our Automated RDP build on a HP BL25p G2 and am seeing the same behaviour that you describe. I don't think physically changing the PCI order of cards is possible in the blade.

I'm looking at creating a scripted solution to this "irritation" as I have 96 G2 blades to build.

Cheers,

Alistair.

Reply
0 Kudos
bertdb
Virtuoso
Virtuoso

alistair, do you see different vmhba orderings with identical blades ??

Reply
0 Kudos
alistairjross1
Enthusiast
Enthusiast

I only have one G2 blade to test with in my Lab at the moment. the fact that the PCI order could change from G1 blade to G2 blade means I will need to do something in a script to meet both scenarios.

Cheers,

Alistair.

Clarifying...

Message was edited by:

alistairjross@hotmail.com

Reply
0 Kudos
bertdb
Virtuoso
Virtuoso

I assume that from reading a /proc file (/proc/cpuinfo), or from running a command like lspci or dmidecode, you can easily distinguish between two or three architectures. Make it a if/then or case statement in your script, and you're set.

Reply
0 Kudos
alistairjross1
Enthusiast
Enthusiast

Here's what I am doing in my build script. Using this I can run the same script across G1 and G2 hosts and not be concerned with the VMHBA/PCI numbering.

This could probably do with some streamlining when I get the time but it does the job so if anyone has a sweeter solution let me know.

\# Find Device ID by searching esx.conf for the Smart Array

deviceID=`cat /etc/vmware/esx.conf | grep "Smart Array" | awk -F"/" '{ print \$3}'`

#Use deviceID to find the vmhba controller number

controllerID=`cat /etc/vmware/esx.conf | grep $deviceID | grep "vmhba" | awk -F" " '{ print \$3 }' | sed -e 's/"//g'`

#Get the partition number

vmfsPartition=`fdisk -l /dev/cciss/c0d0 | grep fb | sed -e "s/\/dev\/cciss\/c0d0p\(.\).*/\1/"`

vmhbaID=$controllerID:"0:0":$vmfsPartition

#Use vmkfstools to format the partition

/usr/sbin/vmkfstools -C vmfs3 $vmhbaID -S $(HOSTNAME)-local

Reply
0 Kudos