Home Lab: Installing VMware ESXi in a Local Environment
Published: 2024-05-18 18:33:19

## Introduction
Virtualization has become an essential skill for IT professionals and enthusiasts. In this tutorial, we'll walk you through setting up a VMware ESXi server in a local environment using VirtualBox on a laptop. By the end of this guide, you'll have a fully functional ESXi server running on your local machine, perfect for testing and development purposes.

![vmware vm](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4blfpos0cypjzyzif9gl.png)

## Prerequisites
Before we begin, ensure you have the following:

### Hardware and Software Requirements
- **Laptop with Virtualization Support:** Ensure your laptop supports hardware virtualization (VT-x or AMD-V).
- **VirtualBox:** Download and install the latest version of [VirtualBox](https://www.virtualbox.org/).
- **VMware ESXi ISO:** Download the ESXi installer ISO from the [VMware website](https://my.vmware.com/web/vmware/evalcenter?p=free-esxi7) or quickly Finding the VMware ESXi ISO like this: **VMware-VMvisor-Installer-201701001-4887370.x86_64**

## Setting Up the Environment
### Enabling Virtualization
1. **Check BIOS/EFI Settings:**
   - Restart your laptop and enter the BIOS/EFI setup.
   - Ensure virtualization is enabled (usually found under CPU configuration).

### Installing VirtualBox
1. **Download and Install:**
   - Go to the [VirtualBox website](https://www.virtualbox.org/) and download the installer for your operating system.
   - Follow the installation prompts to install VirtualBox.

in mac you can use:

```bash
brew install --cask virtualbox
```

## Creating a Virtual Machine for ESXi
### Configuring the VM in VirtualBox
1. **Open VirtualBox and Create a New VM:**
   - Click `New` and enter a name for your VM (e.g., "esxi-server").
   - Set the type to `Linux` and version to `Other Linux (64-bit)`.
   - Set the `iso`.

![virtualbox-step1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aba090b8hzm0whxaai7p.png)

2. **Allocate Resources:**
   - **Memory:** Assign at least 4GB of RAM.
   - **CPU:** Assign at least 2 virtual CPUs.

![virtualbox-step2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ccmx470filj7erk3wwlp.png)

3. **Create a Virtual Hard Disk:**
   - Select `Create a virtual hard disk now`.
   - Set the storage type to `Pre-Allocated Full Size`.
   - Allocate at least 25GB of disk space.

![setting-disk](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jaof7t82yxksuzean3pt.png)

**Setting networking**
![esxi-server-networking](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/643h6zmcua5jwsm5zicv.png)

**Disable USB**
![esxi-server-disable-usb](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fqhimhf3fliw7vrql0td.png)

**Run this command in the terminal**

```bash
VBoxManage modifyvm esxi-server --nested-hw-virt on
```

## Installing VMware ESXi
### Starting the VM and Installing ESXi
1. **Boot the VM:**
   - Start the VM from VirtualBox.
   - The VM should boot from the ESXi ISO.


![boot-step-1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dj2c1u41shal439l4a8b.png)

![boot-step-2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fxtf111dxzfdcp5ek9nf.png)

![boot-step-3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2m4xbzpgakcu5jzuhxv0.png)

![boot-step-4](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ztglnyi8ii841eba7hh5.png)

![boot-step-5](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/le3v094lfob5kv3eidns.png)

![boot-step-6](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/owieom0a94d4xfxdkoth.png)

**Set a root password**
![boot-step-7](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xlmy5rsiji2yz6pen6bd.png)

### Accessing the ESXi Interface
1. **Reboot and Remove ISO:**
   - Remove the ESXi ISO from the virtual drive to prevent booting from it again or press ENTER.

![boot-step-8](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9iwpms4udo6x4hzub38d.png)

![boot-step-9](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mbhklmkkcyhmokjcqdbv.png)

2. **Access ESXi Web Interface:**
   - Note the IP address displayed on the ESXi console screen.
   - Open a web browser and navigate to `https://[ESXi-IP-Address]`.

**View the configuration and IP**
![boot-step-10](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e2mgdh03hx839b0mcbpq.png)

1. **Login to ESXi:**
   - Log in with the root account and password set during installation.

**Access with the IP**
![boot-step-11](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x0xwb6kxiqcl5i1eptvj.png)

## Troubleshooting Common Issues
### Common Problems and Solutions
1. **Compatibility Issues:**
   - Ensure your hardware meets the requirements for virtualization.
   - Check VirtualBox and ESXi documentation for specific compatibility notes.

2. **Installation Errors:**
   - Verify the integrity of the ESXi ISO file.
   - Ensure correct settings in VirtualBox (e.g., nested virtualization enabled).

## Conclusion
Setting up a VMware ESXi server in a local environment using VirtualBox provides a robust platform for testing and development. With this setup, you can experiment with virtualization features and improve your skills.

## Additional Resources
- **VMware Documentation:** [VMware ESXi Documentation](https://docs.vmware.com/en/VMware-vSphere/index.html)
- **VirtualBox Documentation:** [VirtualBox User Manual](https://www.virtualbox.org/manual/UserManual.html)
- **Community Forums:** [VMware Community](https://communities.vmware.com/)

## Comments and Questions
Feel free to leave your comments and questions below. I'm here to help with any issues or further clarifications you may need!