PowerCLI

 View Only
  • 1.  Enable ESXi shell remotely

    Posted Apr 06, 2020 03:26 PM

    Team,

    I know by default ESXi shell / SSH disabled, but is there any way to enable it remotely? I would like to automate few things (Setting VLAN and IP on hosts without login to IDRAC Console)

    Note - ESXi are factory installed without IP

    1. Access Dell IDRAC via putty

    2. run "racadm gethostnetworkinterfaces" to get Dell USBNIC IP

    3. SSH to host using this IP

    4. run few ESXi commands



  • 2.  RE: Enable ESXi shell remotely

    Posted Apr 06, 2020 03:52 PM

    Hi,

    these are the ways. Clearly for safety reasons there are none others.

    Enable ESXi Shell and SSH Access with the Direct Console User Interface

    Enable SSH on VMware ESXi 6.x - VirtuBytes

    ARomeo



  • 3.  RE: Enable ESXi shell remotely

    Posted Apr 06, 2020 04:26 PM

    You can start the SSH service on an ESXi node  with

    Get-VMHost |

    Foreach {

        Start-VMHostService -HostService ($_ | Get-VMHostService | Where { $_.Key -eq “TSM-SSH”} )

    }

    Note that you don't need to use PuTTY anymore, there is now the Posh-SSH module.

    See my Use Posh-SSH instead of PuTTY dive.



  • 4.  RE: Enable ESXi shell remotely

    Posted Apr 06, 2020 05:20 PM

    Thanks LucD.

    But the ESXi hosts doesnt have IP address. So i cannot connect with PowerCLI.

    Let me explain once again

    1. I have  afew Dell PowerEdge servers with ESXi installed ( without IP)

    My plan is

    1. Connect to IDRAC of that hosts via putty

    2. run command "racadm gethostnetworkinterfaces" to get USBNIC IP

    This NIC will be used to communicate with host OS (Solved: Server 2012 R2 iDRAC Virtual NIC USB Device - Dell Community )

    3. SSH to host OS (it will have some random DHCP address)

    4. Run required ESXi level command to set IP and VLAN



  • 5.  RE: Enable ESXi shell remotely

    Posted Apr 06, 2020 05:36 PM

    Ok, then I think you will have to have a look at Ravi's DellPWESMANTools module.https://github.com/dell/DellPEWSMANTools