Tuesday, June 19, 2012

vmware esxi5.0: How to Add a driver for the card QLogic Corp SP232-based 4Gb Fibre Channel to PCI Express HBA

How to Add a driver for the card QLogic Corp SP232-based 4Gb Fibre Channel to PCI Express HBA
i know, there is various post on the net regarding this tips, but my blog is my place to put my tips :-)
So, you requested to your IT if they have a SAN card, to put on one server you just received from another service, and they send you a:
QLogic Corp SP232-based 4Gb Fibre Channel to PCI Express HBA.
No chance, this card is unsupported on the esxi5.0.
But still, you can have access to your san with it, here is howto do:

1 - Activate the card on the BIOS,
2- Connect with ssh to your ssh server
then lspci -v show us this:
000:011:00.0 Fibre Channel Serial bus controller: QLogic Corp SP232-based 4Gb Fibre Channel to PCI Express HBA
         Class 0c04: 1077:5432
And the content of the driver map is:
cd /tmp
cp /bootbank/scsi-qla.v00 /tmp/
vmtar -x scsi-qla.v00 -o  scsi-qla
tar xvf scsi-qla
cat etc/vmware/driver.map.d/qla2xxx.map
regtype=linux,bus=pci,id=1077:2400 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:2422 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:2432 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:2532 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:8001 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:8021 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:8432 0000:0000,driver=qla2xxx,class=storage
edit the file etc/vmware/driver.map.d/qla2xxx.map and add the line
regtype=linux,bus=pci,id=1077:5432 0000:0000,driver=qla2xxx,class=storage
so your qla2xxx.map will be:
cat etc/vmware/driver.map.d/qla2xxx.map
regtype=linux,bus=pci,id=1077:2400 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:2422 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:2432 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:2532 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:5432 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:8001 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:8021 0000:0000,driver=qla2xxx,class=storage
regtype=linux,bus=pci,id=1077:8432 0000:0000,driver=qla2xxx,class=storage

rm scsi-qla
mv scsi-qla.v00 scsi-qla.v00.ini
tar -zcvf scsi-qla etc usr
vmtar -v -c scsi-qla -o scsi-qla.v00
cp scsi-qla.v00 /bootbank/scsi-qla.v00
That's all, restart your server and you should see, if all goes well: (note the vmhba at the end):
000:011:00.0 Serial bus controller: QLogic Corp SP232-based 4Gb Fibre Channel to PCI Express HBA [vmhba2]