View Only
  • 1.  How to automate ESXi CLI command?

    Posted May 12, 2023 09:10 AM


    I would like to ask you, how I can automate CLI command on ESXi host?
    Command: "esxcli storage core adapter rescan -A vmhba64"
    Right now, I must writing this command three minutes after every ESXi host boot up.
    It would be great if it can be done without my ingerention.
    Thank you so much for help.


  • 2.  RE: How to automate ESXi CLI command?

    Broadcom Employee
    Posted May 12, 2023 11:20 AM

    Have you identified _why_ you need to perform the rescan on every boot up? Is this to discover RDM devices ... If so, the solution would be to apply the perennially reserve flag as outlined in this KB If not, it would be good to understand the why and whether you've engaged VMware Support. While runining the command on bootup can certainly be done, it seems not ideal as you're trying to workaround an actual issue as this shouldn't be required on properly configured setup

  • 3.  RE: How to automate ESXi CLI command?

    Posted May 12, 2023 12:53 PM

    Thank you for answer lamw.

    To be honest I know that automate command isn't the best solution, but I need it at present time.

    I have got configure that in the short term. In the future I will be looking for better solution.

    I don't know what it is certainly RDM, but from what I read now about this technology, I don't use that (probably).

    So, could you tell me please how to automate ESXi commands? Is it powerCLI, good way?