Automation

 View Only
  • 1.  rescanallhba for FibreChannel SAN

    Posted Apr 18, 2012 06:03 AM

    Hello,

    We have a dev ESX 4.1 box connected to a SAN via Fibre Channel connection. At random times, our LUN link to the SAN keep dropping 'dead' and we have to go to "Configuration" -> "Storage Adapters" -> Controller" click "Rescan all..." manually. I am trying to run this automatically using vSpehere PowerCLI command and keep getting "HostStorageSystem-StorageSystem = False" as attached.

    My command was Get-VMhost $MyVMHost | Get-VMHostStorage -RescanAllHba

    Can anyone assist?

    Thank you in advanced.



  • 2.  RE: rescanallhba for FibreChannel SAN

    Posted Apr 18, 2012 06:37 AM

    Which PowerCLI version are you using ?

    Get-PowerCLIVersion


  • 3.  RE: rescanallhba for FibreChannel SAN

    Posted Apr 18, 2012 06:39 AM

    Version 5.0.1 build 581491



  • 4.  RE: rescanallhba for FibreChannel SAN
    Best Answer

    Posted Apr 18, 2012 06:58 AM

    Then that is the normal output of the Get-VMHostStorage cmdlet.

    Did you check with the vSphere Client if the rescan was done ?



  • 5.  RE: rescanallhba for FibreChannel SAN

    Posted Apr 18, 2012 07:17 AM

    Yes I did, it does not seem to register the CLI command.

    The bottom two was triggered manually. Then I run the following commands on the PowerCLI:

    - Connect-VIServer -server <IP_ADD_Here>

    - then manually type in user/pass

    - $MyVMHost = Get-VMHost -server <IP_ADD_Here>

    - Get-VMHostStorage $MyVMHost -RescanAllHba

    and then i screen capture the picture above.



  • 6.  RE: rescanallhba for FibreChannel SAN

    Posted Apr 18, 2012 01:17 PM

    Do you connect to a vCenter server or an ESX(i) server ?



  • 7.  RE: rescanallhba for FibreChannel SAN

    Posted Apr 19, 2012 05:30 AM

    Hi LucD,


    Thank you very much for pointing that I'm looking at the wrong area. I did initially connect using vSphere Client to a vCenter server rather than the esx server itself... that's why i didn't see the message saying the server has done the rescan of the hba.

    But now all good.

    Thank you.