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:
- Log into your ESXi server, and you should be greeted with the dashboard.
- Click on "Storage," select your datastore name, and then click on "Datastore browser."
- Create a new directory for your ISO files by selecting "Create directory."
- Name your folder and click "CREATE DIRECTORY."
- After creating the directory, click on it, then click "Upload." Navigate to your downloaded ISO file and select it for upload.
- Monitor the upload progress in the "Recent Tasks" section of your ESXi dashboard.
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.
- Click on "Networking," then go to the "Virtual Networks" tab, and click "Add standard virtual switch."
- Name your virtual switch and click the "ADD" button. I’ve named mine "Pen Test Network Switch."
- Note that the switch will have no uplink—this is intentional for isolation.
Next, you’ll create and assign a port group:
- Click on the "Port groups" tab, then click "Add port group."
- Name your port group, assign it to your new virtual switch, and ensure it has a unique VLAN ID.
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:
- Click on "Virtual Machines" in the left pane, then select "Create / Register VM."
- Choose "Create a new virtual machine," and click "NEXT."
- Provide a name for your virtual machine. This name is internal to VMware, not the hostname.
- Select the Guest OS family and version, then click "NEXT."
- Choose the datastore for your virtual machine. I have one called "datastore1," which I will select and click "NEXT."
- Decide on the number of vCPUs, RAM, and hard disk size for your VM, then select the network.
- Scroll down to "CD/DVD Media" and select "Datastore ISO file."
- Choose the folder containing your uploaded ISO files, select the desired ISO, and click "NEXT."
- After ensuring your ISO is ready in the virtual CD/DVD drive, click "NEXT."
- Review your configurations and click "FINISH."
- Your newly created VM should now appear in the Virtual Machines dashboard.
- Select your VM to view its dashboard and click the play button to start it.
- Once the VM boots, the OS installation menu will appear. In this example, I am installing Ubuntu. Follow the prompts to complete the installation.
- 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.
- Click "SAVE" to finalize your 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.