• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Yellow Bricks

by Duncan Epping

  • Home
  • ESXTOP
  • Stickers/Shirts
  • Privacy Policy
  • About
  • Show Search
Hide Search

Rescan all vmhba’s at once with the esxcfg-rescan command

Duncan Epping · Jan 25, 2008 ·

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.

Share it:

  • Tweet

Related

Server 2.5, 3.5, ESX, service console

Reader Interactions

Comments

  1. Gregory POIROT says

    17 November, 2008 at 11:02

    Hello,

    This command doesn’t work :

    esxcfg-advcfg -s 1 /SCSI/ScsiRescanAllHhas

    error message :
    Exception occured: Unable to find branch SCSI

    best regards.

    Gregory.

  2. Duncan Epping says

    17 November, 2008 at 11:53

    try this one:
    esxcfg-advcfg -s 1 /Scsi/ScsiRescanAllHhas

  3. Gregory POIROT says

    18 November, 2008 at 17:33

    It doesn’t work :

    esxcfg-advcfg -s 1 /Scsi/ScsiRescanAllHhas

    Exception occured: Unable to find option ScsiRescanAllHhas

  4. Duncan Epping says

    18 November, 2008 at 20:14

    which version are you using?

  5. azn2kew says

    23 December, 2008 at 17:53

    isn’t it AllHBAs instead of AllHhas?

  6. Tyl says

    23 September, 2009 at 21:00

    yes it’s ScsiRescanAllHbas. This is a mistake in the post.

  7. Ruben says

    12 January, 2010 at 11:09

    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.

Primary Sidebar

About the author

Duncan Epping is a Chief Technologist in the Office of CTO of the Cloud Platform BU at VMware. He is a VCDX (# 007), the author of the "vSAN Deep Dive", the “vSphere Clustering Technical Deep Dive” series, and the host of the "Unexplored Territory" podcast.

Upcoming Events

Feb 9th – Irish VMUG
Feb 23rd – Swiss VMUG
March 7th – Dutch VMUG
May 24th – VMUG Poland
June 1st – VMUG Belgium

Recommended Reads

Sponsors

Want to support Yellow-Bricks? Buy an advert!

Advertisements

Copyright Yellow-Bricks.com © 2023 · Log in