hmrtexas.com

Creating Your First Virtual Machine in VMware ESXi

Written on

Chapter 1: Introduction to VMware ESXi

In this guide, we will explore the process of setting up a virtual machine using VMware ESXi. If you haven't yet installed VMware ESXi in your home IT lab, you might find the following article useful:

Install VMware ESXi in Your HomeLab | by Jonathan Ingram | Jan, 2024 | IT Homelabs

Chapter 2: Uploading ISO Files

Before we can proceed with creating virtual machines, we first need to upload the necessary ISO files. For guidance on where to locate ISO files for your home lab, refer to my article:

Where to Download the Tools Needed for An IT Homelab | by Jonathan Ingram | IT Homelabs

Once you've gathered your ISO files, follow these steps to upload them to your server:

  1. Log into your ESXi server, and you should be greeted with the dashboard.
ESXi Dashboard View
  1. Click on "Storage," select your datastore name, and then click on "Datastore browser."
Datastore Browser
  1. Create a new directory for your ISO files by selecting "Create directory."
Create Directory Option
  1. Name your folder and click "CREATE DIRECTORY."
Naming the Directory
  1. After creating the directory, click on it, then click "Upload." Navigate to your downloaded ISO file and select it for upload.
Uploading ISO File
  1. Monitor the upload progress in the "Recent Tasks" section of your ESXi dashboard.
Recent Tasks Monitoring

Now that your ISO files are uploaded, you're ready to create your virtual machine!

Chapter 3: Networking Considerations

Before we dive into the virtual machine creation process, let’s discuss some networking essentials.

Within your ESXi server, you can set up multiple virtual networks. If you need an isolated network that doesn’t connect to the internet or other machines, you might want to consider creating one. This can be particularly useful for scenarios like malware analysis or penetration testing.

Quick Tip: If you prefer not to manually configure network settings on your VMs within an isolated network, think about setting up a VM that acts as a DHCP server. A lightweight VM running Pi-hole can manage IP addresses effectively. I will cover how to set up Pi-hole in a future article.

Creating a Network: To create a functional lab network, you need to establish a virtual switch and a port group to associate with that switch.

  1. Click on "Networking," then go to the "Virtual Networks" tab, and click "Add standard virtual switch."
Adding a Virtual Switch
  1. Name your virtual switch and click the "ADD" button. I’ve named mine "Pen Test Network Switch."
Naming the Virtual Switch
  1. Note that the switch will have no uplink—this is intentional for isolation.
Virtual Switch Overview

Next, you’ll create and assign a port group:

  1. Click on the "Port groups" tab, then click "Add port group."
Adding a Port Group
  1. Name your port group, assign it to your new virtual switch, and ensure it has a unique VLAN ID.
Configuring Port Group

Your virtual network is now set up and ready for use!

Chapter 4: Creating Your Virtual Machine

To create a virtual machine in VMware ESXi, follow these steps:

  1. Click on "Virtual Machines" in the left pane, then select "Create / Register VM."
Virtual Machines Menu
  1. Choose "Create a new virtual machine," and click "NEXT."
New VM Creation
  1. Provide a name for your virtual machine. This name is internal to VMware, not the hostname.
  2. Select the Guest OS family and version, then click "NEXT."
Selecting Guest OS
  1. Choose the datastore for your virtual machine. I have one called "datastore1," which I will select and click "NEXT."
Selecting Datastore
  1. Decide on the number of vCPUs, RAM, and hard disk size for your VM, then select the network.
Allocating Resources
  1. Scroll down to "CD/DVD Media" and select "Datastore ISO file."
Configuring CD/DVD Media
  1. Choose the folder containing your uploaded ISO files, select the desired ISO, and click "NEXT."
Selecting ISO File
  1. After ensuring your ISO is ready in the virtual CD/DVD drive, click "NEXT."
Confirming ISO Setup
  1. Review your configurations and click "FINISH."
Final Review
  1. Your newly created VM should now appear in the Virtual Machines dashboard.
Virtual Machine Dashboard
  1. Select your VM to view its dashboard and click the play button to start it.
Starting the Virtual Machine
  1. Once the VM boots, the OS installation menu will appear. In this example, I am installing Ubuntu. Follow the prompts to complete the installation.
OS Installation Menu
  1. When the ISO is no longer required, navigate to the VM’s dashboard, click "Edit" at the top, and uncheck both the "Connected" and "Connect at power on" options for your CD/DVD drive.
Editing VM Settings
  1. Click "SAVE" to finalize your settings.
Saving VM Settings

Congratulations! You have successfully created your first virtual machine in VMware ESXi. In an upcoming article, we will set up a VMware vSphere server to manage your ESXi host more effectively.

Chapter 5: Additional Resources

This video titled "vSphere 7 - How To Create Virtual Machines With VMware ESXi GUI and PowerCLI" offers a detailed walkthrough of creating virtual machines using both the GUI and PowerCLI.

Check out the video "Installing Virtual Machines on VMWare ESXi 7" for a practical demonstration of the installation process for virtual machines on VMware ESXi 7.