Streamline Your ESXi Deployments with Automation

Automating ESXi Deployments with PowerCLI and PXE

In this article, we will explore how to automate ESXi deployments using a combination of PowerCLI and PXE-based installation. We will also discuss the requirements and limitations of this approach, as well as some of the unique challenges that come with deploying ESXi on vessels at sea.

Background

———-

Automating ESXi installations was made much easier after the release of vSphere 4.1, which introduced the Scripted Install feature. However, this feature requires that you have vCenter and Host Profiles in your environment, which in turn requires Enterprise Plus licenses. This can be a barrier for some organizations, especially those with limited budgets or remote offices/branch offices (ROBOs).

Another approach to automating ESXi deployments is to use VMware Auto Deploy from VMware Labs. This feature allows you to automate the installation and configuration of ESXi hosts using a combination of PowerCLI and a deployment VM. However, this approach also requires vCenter and Host Profiles, which can be a limitation for some organizations.

Solution Overview

—————–

Our solution uses a combination of PowerCLI and PXE-based installation to automate ESXi deployments without the need for vCenter or Host Profiles. The basic setup consists of a deployment VM, PowerCLI scripts, and a custom ks.cfg file.

The deployment VM is a custom Windows Server 2008 R2 with IIS installed. We use Tftpd32, a free and open-source application, to provide DHCP and PXE services for deployment. The basic ks.cfg script sets the root password, automatically deletes all partitions, sets up a new vmfs, and tells the installer to find the installation files via HTTP on the server.

The PowerCLI scripts configure the ESXi host post-installation and copy your initial VMs to the new host. Our current process looks like this:

1. Connect physical host to deployment laptop via ethernet

2. Start deployment VM on deployment laptop

3. When deployment VM is finished booting, start physical host

4. Physical host boots of network and PXE and installs ESXi

5. When ESXi installation finishes, run PowerCLI script against host

6. Disconnect deployment laptop and physical host, and connect physical host to vessel network

7. Connect vSphere Client to ESXi install and start server VM

Requirements and Limitations

—————————

The following are the requirements and limitations of this approach:

### Requirements:

* A deployment VM with Tftpd32 installed

* PowerCLI installed on the deployment laptop

* ESXi free version, which only allows PowerCLI in read-only mode

* vSphere Client to connect to the ESXi install

### Limitations:

* The free version of ESXi only allows PowerCLI in read-only mode, so you will need either licenses or trial licenses.

* This approach requires a mobile deployment model, as the locations where the deployments are taking place are not static and are actually floating on large oceans.

Challenges with Deploying ESXi on Vessels

——————————————

Deploying ESXi on vessels at sea presents some unique challenges:

### Physical Environment

The physical environment on vessels at sea can be harsh and unpredictable, with constant motion, vibration, and temperature fluctuations. This can affect the reliability and stability of the deployment process.

### Network Connectivity

Network connectivity is limited or non-existent on vessels at sea, making it difficult to manage and monitor the ESXi hosts remotely.

### Power and Cooling

Power and cooling are also limited on vessels at sea, so you need to carefully plan and manage your power and cooling resources.

Conclusion

———-

In this article, we have explored how to automate ESXi deployments using a combination of PowerCLI and PXE-based installation. We have also discussed the requirements and limitations of this approach, as well as some of the unique challenges that come with deploying ESXi on vessels at sea. This solution can be a good fit for organizations with limited budgets or ROBOs, as it eliminates the need for vCenter and Host Profiles. However, it requires careful planning and execution to ensure success in this unique environment.