Skip to main content


Showing posts from January, 2018

Configuring iSCSI on ESXi using PowerCLI

In one of my previous post I stepped through the method of connecting my ESXi host to an iSCSI array using manual steps from creating the Standard vSwitch to port binding. In this post, I will talk about how I used powercli with esxcli to automate the steps so that it can be repeatable and quicker to deploy to your host. This will ensure each host is built with the same consistency and should anything go wrong it will be easier to rectify as all your host are built using a script. I will go through my script to explain each section of how to configure: A new standard vSwitch Assign two physical network adapter to the vSwitch Create 2 VMKernel adapters for iSCSI Bind the 2 VMKernel adapters to create the port binding Create the connection to your iSCSI storage array The full script is available here at github The first bit is to define all the values for our variables that we would use within the script. If we were to run this script against another host you will