Using the console it’s very easy to rescan a specific vmhba which can be useful when you are troubleshooting. For lazy people like me it’s disturbing that you have to type the command twice if you want to rescan both HBA’s. Well, as of version 3.5 VMware introduced a new setting in Advanced configuration section in the VirtualCenter Client:
Go to “Configuration” of the ESX Host
Click on “Advanced”
Click on “Scsi”
Set “Scsi.ScsiRescanAllHbas” to 1
This can also be done from the command line:
esxcfg-advcfg -s 1 /Scsi/ScsiRescanAllHbas
Now you don’t need to type “esxcfg-rescan vmhba1” and “esxcfg-rescan vmhba2” anymore, when rescanning an HBA all cards will be rescanned.
Gregory POIROT says
Hello,
This command doesn’t work :
esxcfg-advcfg -s 1 /SCSI/ScsiRescanAllHhas
error message :
Exception occured: Unable to find branch SCSI
best regards.
Gregory.
Duncan Epping says
try this one:
esxcfg-advcfg -s 1 /Scsi/ScsiRescanAllHhas
Gregory POIROT says
It doesn’t work :
esxcfg-advcfg -s 1 /Scsi/ScsiRescanAllHhas
Exception occured: Unable to find option ScsiRescanAllHhas
Duncan Epping says
which version are you using?
azn2kew says
isn’t it AllHBAs instead of AllHhas?
Tyl says
yes it’s ScsiRescanAllHbas. This is a mistake in the post.
Ruben says
On
# vmware -v
VMware ESX Server 3.5.0 build-153875
That setting is default to one (1) and affects the rescan that you do on the GUI, not the command line. You can verify that doing a rescan on the command line and you will see an error
—— Setting
# esxcfg-info | grep -i -C5 rescanall
\==+Advanced Integer Option :
|—-Option Name…………………………….ScsiRescanAllHbas
|—-Current Value…………………………..1
|—-Default Value…………………………..1
|—-Min Value………………………………0
|—-Max Value………………………………1
|—-Hidden…………………………………false
|—-Parent…………………………………/Scsi/
|—-Path…………………………………../Scsi/ScsiRescanAllHbas
——– Command
# esxcfg-rescan
Incorrect number of arguments.
Usage: /usr/sbin/esxcfg-rescan
# esxcfg-rescan -h
Usage: /usr/sbin/esxcfg-rescan
Ruben
Note: You can use the GUI to set up advanced options.