Automating ESXi Deployments with vNinja.net

Automating ESXi Deployments: A Mobile and Remote-Ready Solution

Introduction:

Deploying and managing an ESXi infrastructure can be a daunting task, especially when it comes to remote or mobile environments. However, with the right tools and a bit of creativity, it is possible to automate the process almost entirely. In this article, we will explore how to deploy ESXi hosts on vessels worldwide using a combination of PowerCLI, PXE-based installations, and a custom deployment VM.

Background:

Our environment consists of a fleet of vessels that require an ESXi infrastructure for various applications. However, these vessels are not static and are instead floating around on large oceans. This presents a unique challenge when it comes to deploying and managing the ESXi hosts. Traditional deployment methods, such as using vCenter and Host Profiles, were not feasible due to the lack of a centralized management system and the remote nature of the environment.

Solution:

To address these challenges, we turned to PowerCLI and PXE-based installations. By using a custom deployment VM, we can provide DHCP and PXE services to the physical hosts, allowing us to automate the installation process. Once the ESXi host is installed, we use PowerCLI to configure the host and copy initial VMs to the new host.

Components:

The “complete package” consists of the following components:

1. Deployment VM: This is a custom VM built to provide DHCP and PXE services to do the actual ESXi installation.

2. PowerCLI: We use PowerCLI scripts to configure the ESXi host post-installation and copy your initial VMs to the new host.

3. PXE-based installation: The physical hosts boot off the network using PXE, allowing us to automate the installation process.

Process:

Our current process looks like this:

1. Connect the physical host to the deployment laptop via Ethernet.

2. Start the deployment VM on the deployment laptop.

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

4. The physical host boots off the network and PXE, installing ESXi.

5. Once the ESXi installation finishes, run PowerCLI scripts against the host.

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

7. Connect vSphere Client to the ESXi install and start server VMs.

Scripts:

We use a combination of PowerCLI scripts to automate the setup of the ESXi hosts. These scripts configure the host, copy initial VMs to the new host, and perform other tasks as needed. Here are some examples of the scripts we use:

1. Kickstart script (ks.cfg): This script sets the root password, automatically deletes all partitions, and sets up a new vmfs. It also tells the installer that it will find the installation files via HTTP on the server.

2. PowerCLI script: This script is used to configure the ESXi host post-installation and copy your initial VMs to the new host.

Tips and Tricks:

1. Use a custom deployment VM to provide DHCP and PXE services. This allows you to automate the installation process and provides a centralized management system.

2. Use PowerCLI to configure the ESXi host post-installation and copy your initial VMs to the new host. This allows for a more streamlined and automated deployment process.

3. Consider using vSphere.next, which promises to provide even more features and improvements for remote and mobile environments.

Conclusion:

Automating ESXi deployments can be a challenge, especially in remote or mobile environments. However, by using a combination of PowerCLI, PXE-based installations, and custom deployment VMs, it is possible to create an automated deployment scenario that works well for our unique environment. With this solution, we have been able to streamline our deployment process and provide a more reliable and efficient infrastructure for our vessels worldwide.