VMware ESXi (formerly ESX) is an enterprise-class, type-1 hypervisor developed by VMware for deploying and serving virtual computers.
- ESXi
Important
We recommend acquiring a free VMware vSphere Hypervisor 6 License to use with ESXi 6.7, but as of the time of writing, the free license is only available for ESXi 7.0 and 8.0.
This details how to acquire a free license from VMware for ESXi.
-
Visit the Customer Connect Login page.
-
Click the Sign up now link under the SIGN IN button.
-
In the Register page, fill in the required details appropriately, and agree to the terms and conditions.
-
Click the Register button.
-
Receive the Account Activation email and take note of the 6 digit Authentication Code.
-
Back in your browser, you should be redirected to the Activate your profile page. Type in your Authentication Code in the Activation Code field.
-
Click the VERIFY CODE button.
-
You will be taken to the Profile Activated page after a successful activation, then sent back to the Customer Connect Login page.
-
Enter your account credentials and click the SIGN IN button.
-
Go to the Product Evaluation Center for VMware vSphere Hypervisor 8 page.
-
Navigate to the License & Download tab.
-
Click the Register button.
-
Fill up the Accept End-User License Agreement form appropriately, and agree to the terms and conditions.
-
Click the START FREE TRIAL button.
-
You will be redirected to the Product Evaluation Center for VMware vSphere Hypervisor 8 page.
-
Under License Information in the License & Download tab, copy the License Key for VMware vSphere Hypervisor 8 License.
-
Repeat steps 10 to 16 for the VMware vSphere Hypervisor 7 License license.
Note
This is only required if you require additional drivers for your hardware, which would be the case for the recommended Hardware Specification.
Note
This part of the guide requires using a Windows machine, or a Linux machine with PowerShell installed.
Important
We recommend doing this with the ESXi 6.7 ISO, but as of the time of writing, the free license for ESXi 6 is no longer obtainable.
This details how to create a custom ESXi ISO with additional drivers.
-
Download the VMware vSphere Hypervisor (ESXi) Offline Bundle for VMware vSphere Hypervisor (ESXi) 6.7U3.
-
Download any required drivers you would need from the V-Front Online Depot for VMware ESXi website.
In this example, we will be downloading and adding the following drivers:
-
Get into a PowerShell session using your system Terminal application as an Administrator.
-
Move the VMware vSphere Hypervisor (ESXi) Offline Bundle 6.7U3, and drivers; i.e. sata-xahci and Net55-r8168 to the working directory.
-
Install
PowerCli
:Install-Module -Name VMware.PowerCLI -AllowClobber Set-PowerCLIConfiguration -InvalidCertificateAction Ignore
Verify that
PowerCli
is installed:Get-PowerCLIVersion
-
Add the VMware vSphere Hypervisor (ESXi) Offline Bundle 6.7U3 to the
EsxSoftwareDepot
:Add-EsxSoftwareDepot .\update-from-esxi6.7-6.7_update03.zip
Replace
.\update-from-esxi6.7-6.7_update03.zip
with the actual path to the VMware vSphere Hypervisor (ESXi) Offline Bundle 6.7U3 file. -
Add the drivers to the
EsxSoftwareDepot
:Add-EsxSoftwareDepot .\net55-r8168-8.045a-napi-offline_bundle.zip, .\sata-xahci-1.42-1-offline_bundle.zip
[!TIP]
Multiple files can be added at once by separating them with a comma.Replace the paths with the actual paths to each driver file(s).
-
List the name of available image profiles:
Get-EsxImageProfile | ft Name
-
Clone the standard ESXi image profile (i.e.
ESXi-6.7.0-20190802001-standard
) to a new custom image profile i.e.ESXi-6.7.0-20190802001-custom
we'll be customising:New-EsxImageProfile -CloneProfile "ESXi-6.7.0-20190802001-standard" -Name "ESXi-6.7.0-20190802001-custom" -Vendor "MyName"
Replace
ESXi-6.7.0-20190802001-standard
with the name of the standard image profile.Replace
ESXi-6.7.0-20190802001-custom
with the name of the custom image profile.Replace
MyName
with the name of the vendor (i.e. your name). -
Get the name of the driver packages:
Get-EsxSoftwarePackage | Where {$_.Vendor -eq "VendorName"} | ft Name
Replace
VendorName
with the name of the vendor (i.e.Realtek
orVFrontDe
). -
Add each driver package to the custom image profile:
Add-EsxSoftwarePackage -ImageProfile "ESXi-6.7.0-20190802001-custom" -SoftwarePackage "net55-r8168", "sata-xahci"
Replace
ESXi-6.7.0-20190802001-custom
with the name of the custom image profile.Replace
net55-r8168
andsata-xahci
with the name of the driver packages. -
Set the acceptance level of the custom image profile to
CommunitySupported
:Set-EsxImageProfile -ImageProfile "ESXi-6.7.0-20190802001-custom" -AcceptanceLevel CommunitySupported
Replace
ESXi-6.7.0-20190802001-custom
with the name of the custom image profile. -
Export the custom image profile to an ISO file:
Export-EsxImageProfile -ImageProfile "ESXi-6.7.0-20190802001-custom" -ExportToIso -FilePath ".\ESXi-6.7.0-20190802001-custom.iso"
Replace
ESXi-6.7.0-20190802001-custom
with the name of the custom image profile.Replace
.\ESXi-6.7.0-20190802001-custom.iso
with the path to the new custom ISO file.
Note
Correctly configure the Motherboard BIOS prior to installation. Refer to the Motherboard BIOS section for more details.
Note
It is highly recommended that you are using an SSD for the ESXi installation.
This details how to install and setup ESXi on a server.
- VMware ESXi Installation and configuration for AMD Ryzen Part 1
- Home VMware ESXi Installation and configuration Part 2
Follow the steps detailed in the two videos referenced above.
- Use the custom ESXi installer ISO created in the Custom ISO section if you are using the recommended Hardware Specification.
Important
The cron job will (sometimes) disappear after a reboot. In this case, you will need to re-add the cron job.
This details how to setup periodic configuration backups for ESXi.
-
Get into VMware ESXi web interface by navigating to the IP address of the ESXi server in your browser.
-
In the Host page, locate and click the Actions button with the gear cog icon.
-
Hover over the Services menu item, and click the Enable Secure Shell (SSH) option.
-
Launch a Terminal application on your local machine, and remote into the server using the following command:
ssh root@<ip-address>
Replace
<ip-address>
with the actual IP address of the ESXi server. -
Enter the password for the
root
user when prompted. -
Once logged in, sync configuration files to the datastore using the following command:
vim-cmd hostsvc/firmware/sync_config
-
Perform a backup of the configuration files using the following command:
vim-cmd hostsvc/firmware/backup_config
This command should return a link to download a bundle of the configuration backup.
-
To automate the backup process, create an
esxi-backup
folder to the default datastore (i.e.datastore1
), and abackups
folder within it for storing the backups:mkdir -p /vmfs/volumes/datastore1/esxi-backup/backups
-
Create an
esxi-backup.sh
script inside theesxi-backup
folder for use to perform the backup:vi /vmfs/volumes/datastore1/esxi-backup/esxi-backup.sh
Content of the script:
#!/bin/sh vim-cmd hostsvc/firmware/sync_config vim-cmd hostsvc/firmware/backup_config find /scratch/downloads/ -name \*.tgz -exec cp {} /vmfs/volumes/datastore1/esxi-backup/backups/MyEsxiServer_config_backup_$(date +'%Y%m%d_%H%M%S').tgz \;
[!TIP] Replace
MyEsxiServer
with the name of your ESXi server (without whitespaces). -
Make the script executable:
chmod +x /vmfs/volumes/datastore1/esxi-backup/esxi-backup.sh
-
Test the backup script by running it:
/vmfs/volumes/datastore1/esxi-backup/esxi-backup.sh
Verify that the backup file is created and stored in the
backups
folder.ls -la /vmfs/volumes/datastore1/esxi-backup/backups
-
Create a cron job to run the backup script periodically:
vi /var/spool/cron/crontabs/root
Add the following line to the end of the file:
0 0 * * * /vmfs/volumes/datastore1/esxi-backup/esxi-backup.sh
[!TIP] This will run the backup script every day at midnight (according to the ESXi server's time).
Save and exit the file using the following options:
:wq!
-
Head back to the ESXi web interface, and disable SSH by clicking the Actions button with the gear cog icon, hovering over the Services menu item, and clicking the Disable Secure Shell (SSH) option.
This details matters pertaining to virtual machines on ESXi.
This details how to create a virtual machine to be used as a template or base for other virtual machines.
-
Get into VMware ESXi web interface by navigating to the IP address of the ESXi server in your browser.
-
In the Virtual Machines page, locate and click the Create/Register VM button.
-
In the Select creation type page, select the Create a new virtual machine option and click Next.
-
In the Select a name and guest OS page:
- Enter a name for the virtual machine to the Name field i.e.
ubuntu-server.example.com
. - Select
ESXi {VERSION_NUMBER} virtual machine
for Compatibility. - Select the appropriate OS family for the VM Guest OS Family i.e.
Linux
. - Select the appropriate OS version for the VM Guest OS Version i.e.
Ubuntu Linux (64-bit)
. - Click the Next button.
- Enter a name for the virtual machine to the Name field i.e.
-
In the Select storage page, select the datastore to be used i.e.
datastore1
and click Next.[!TIP]
The datastore will be used for the VM's configuration files and virtual OS disk. -
In the Customize settings page, configure the virtual hardware as minimally as possible (according to the OS requirements):
- CPU:
1
- Memory:
1024 MB
- Hard Disk 1:
10 GB
- SCSI Controller 0:
LSI Logic Parallel
(change appropriately if needed) - USB controller 1:
USB 2.0
- Network Adapter 1:
VM Network
(change appropriately if needed) - CD/DVD Drive 1:
Datastore ISO File
, Connect:Enabled
- Status:
Connect at power on
- CD/DVD Media:
ISO/ubuntu-20.04.6-live-server-amd64.iso
(select the actual ISO file stored in any of your datastores) - Controller location:
SATA controller 0
,SATA (0:0)
- Video Card:
Default settings
(change appropriately if needed)
- CPU:
-
Click the Next button.
-
In the Ready to complete page, review the configuration and click the Finish button.
-
In the Virtual Machines page, locate and click the newly created virtual machine.
-
In the VM's page, click the Power on button.
-
Click the "screen" on the VM's page to open a browser console to the VM.
-
Go through the OS installation process. Refer to the Linux installation topic for more installation details for Linux based VMs.
-
After the installation has completed, restart the VM, and in the VM's page, click the Edit button.
-
In the VM's Edit Settings page, navigate to the CD/DVD Drive 1 section, and disable the Connect at power on option.
-
Click the Save button.
-
Back in the VM (through the browser console), press the Enter key to reboot into the OS (instead of the installer media).
-
On your personal machine, copy over your public SSH key to the VM.
-
Log into the VM with your provided credentials.
-
Perform any additional configuration steps required for the VM. Generally, recommended configuration options include:
- Perform a system update on the VM
- Install the
open-vm-tools
package on the VM to allow useful VMware VM management features - Enable SSH on the VM
- (Optional) Change the default SSH port on the VM
- (Optional) Disable root login for SSH on the VM
- (Optional) Disable password authentication for SSH on the VM
- (Optional) Set up a firewall on the VM (allow traffic to the new SSH port if it's been updated)
For more detailed instructions on configuring a Linux based virtual machine, please refer to the Linux configuration topic according to the guest OS.
-
Once you are done with all of the configurations that will be inherited by future VMs, shut down the VM.
-
In the VM's page, click the Actions button with the gear cog icon.
-
Click the Unregister option, and click the Yes button to confirm.
-
In the left panel of the VMware ESXi web interface, click the Storage menu item.
-
In the Storage page, click the Datastores tab.
-
Click the datastore where the VM's configuration files and virtual OS disk are stored i.e.
datastore1
. -
Click the Datastore browser button.
-
Click the Create directory button.
-
Fill in the Directory name field with an appropriate name indicating that is a template for a VM of a particular OS i.e.
ubuntu-server-template
. -
Click the Create directory button.
-
Locate the VM's folder which should be named after the VM's name i.e.
ubuntu-server.example.com
. -
Select the
.vmx
file found in the VM's folder, and click the Copy button. -
In the newly opened Select destination window, select the newly created directory i.e.
ubuntu-server-template
, and click the Copy button. -
Repeat the last two steps but for the
.vmdk
file found in the VM's folder.[!TIP]
This might take a little longer depending on the size of the virtual disk (.vmkd
file). -
Once you have copied over both the
.vmx
and.vmdk
files, you may delete the VM's folder by selecting it and clicking the Delete button in the Datastore browser. -
Click the Close button.
This details how to create a virtual machine from a template or base virtual machine.
-
Get into VMware ESXi web interface by navigating to the IP address of the ESXi server in your browser.
-
In the left panel of the VMware ESXi web interface, click the Storage menu item.
-
In the Storage page, click the Datastores tab.
-
Click the datastore where you wish to install the VM to i.e.
datastore1
. -
Click the Datastore browser button.
-
Click the Create directory button.
-
Fill in the Directory name field with the name you wish to provide for the new VM i.e.
ubuntu-0.example.com
. -
Click the Create directory button.
-
In the Datastore browser, locate the template VM's folder in the datastore it was stored to.
-
Select the template VM's folder, and select the
.vmx
file found inside it. -
Click the Copy button.
-
In the newly opened Select destination window, select the newly created directory i.e.
ubuntu-0.example.com
, and click the Copy button. -
Repeat the last three steps but for the
.vmdk
file found in the template VM's folder.[!TIP]
This might take a little longer depending on the size of the virtual disk (.vmkd
file). -
Once you have copied over both the
.vmx
and.vmdk
files to the new VM's folder, close the Datastore browser. -
In the Datastores tab of the Storage page, click the Register a VM button.
-
In the newly opened Register VM window, select the right datastore, and select the new VM's folder.
-
Select the
.vmx
file found in the new VM's folder, and click the Register button. -
In the Virtual Machines page, locate and click the newly created virtual machine.
[!TIP]
At this moment, the VM's name will still be the same as the template VM's name. -
In the new VM's page, click the Edit button.
-
In the VM's Edit Settings page, navigate to the VM Options section, and edit the VM Name field to the name you wish to provide for the new VM i.e.
ubuntu-0.example.com
. -
Make any other changes to the VM's hardware and options as needed, then click the Save button.
-
In the VM's page, click the Power on button.
-
When prompted with a question asking if you have copied or moved the VM, select the I Copied It option, and click the Answer button.
-
Click the "screen" to open a browser console to the VM.
-
Log into the VM with your provided credentials.
-
Perform any additional configuration steps required for the VM. Generally, recommended configuration options include:
- Perform a system update on the VM
- Set a static IP address and update the DNS server for the VM
- Update the system hostname
For more detailed instructions on configuring a Linux based virtual machine, please refer to the Linux configuration topic according to the guest OS.
This details how to edit an existing virtual machine.
-
Get into VMware ESXi web interface by navigating to the IP address of the ESXi server in your browser.
-
Click the Virtual Machines menu item from the left panel.
-
In the Virtual Machines page, locate and click the virtual machine you wish to edit.
-
In the VM's page, click the Edit button.
-
In the Edit Settings page, make any changes to the VM's Virtual Hardware and VM Options as needed.
-
Click the Save button to apply the changes.
This details how to add an additional virtual disk to a virtual machine.
TODO
This details how to expand the size of an existing disk or add an additional virtual disk to a virtual machine.
-
Edit the virtual machine you wish to expand the disk for:
- In the Edit Settings page, configure the VM's Virtual Hardware.
- Locate the section for the virtual disk you wish to expand i.e. Hard Disk 1.
- In the provided size field, enter the new size for the virtual disk i.e.
20 GB
. - Click the Save button to apply the changes.
-
Expand the partition on the virtual disk. There are different ways to do this depending on the OS and the partitioning scheme used. To determine the method of doing this on Linux, please refer to the Linux topic.
This details how to add and set up an additional network card to the ESXi server.
-
Connect the physical network interface card to the ESXi server by way of the onboard PCIe slot.
-
In the VMware ESXi web interface, navigate to the Networking menu item from the left panel.
-
In the Networking page, click the Physical NICs tab.
-
From the list of physical network interface cards, take note of the Name of the new network interface card i.e.
vmnic1
. -
Navigate to the Virtual switches tab.
-
Click the Add standard virtual switch button.
-
In the Add standard virtual switch window:
- vSwitch Name: Fill in with an appropriate name for the new virtual switch i.e.
vSwitch1
. - MTU: Leave as default i.e.
1500
. - Uplink 1: Expand the dropdown and select the new network interface card from the available list i.e.
vmnic1
. - Click the Add button.
- vSwitch Name: Fill in with an appropriate name for the new virtual switch i.e.
-
Optionally, you may also add an uplink redundancy to the newly created virtual switch:
- In the Virtual switches tab, select the newly created virtual switch i.e.
vSwitch1
. - Click the Add uplink button.
- In the Edit standard virtual switch window, locate the newly added Uplink 2 section, expand the dropdown, and select any available network interface card (port) from the available list i.e.
vmnic2
. - Click the Save button.
- In the Virtual switches tab, select the newly created virtual switch i.e.
-
Navigate to the Port groups tab.
-
Click the Add port group button.
-
In the Add port group window:
- Name: Fill in with an appropriate name for the new port group i.e.
vSwitch1 Network
. - VLAN ID: Leave as default i.e.
0
. - Virtual switch: Expand the dropdown and select the newly created virtual switch i.e.
vSwitch1
. - Click the Add button.
- Name: Fill in with an appropriate name for the new port group i.e.
This details how to add and set up additional storage to the ESXi server including pass-through of physical storage devices.
- Create a new Datastore in ESXi 6.7 (virtual environment)
- ESXi - How to Enable Passthrough mode (VMDirectPath) in #VMware #vSphere #ESXi 6.7
-
Connect the physical storage device to the ESXi server by way of the onboard SATA ports or PCIe M.2 slot.
-
In the VMware ESXi web interface, navigate to the Storage menu item from the left panel.
-
In the Storage page, click the Datastores tab.
-
Click the New datastore button.
-
In the Select creation type page of the New datastore window, select the Create new VMFS datastore option, and click the Next button.
-
In the Select device page:
- Fill in the Name field with an appropriate name for the new datastore i.e.
SSD
. - Select the physical storage device you connected to the ESXi server from the available list.
- Click the Next button.
- Fill in the Name field with an appropriate name for the new datastore i.e.
-
In the Select partitioning options page:
- Select the Use full disk option.
- Select the VMFS 6 version.
- Click the Next button.
-
In the Ready to complete page, review the configuration, and click the Finish button.
-
Connect the physical SATA adapter/card to the ESXi server by way of the onboard PCIe slot.
-
In the VMware ESXi web interface, expand the Host section on the left panel, and select the Manage menu item.
-
In the Manage page, click the Hardware tab.
-
Click the PCI Devices section.
-
From the list of PCI devices, select the corresponding checkbox to the SATA adapter/card you have installed to the ESXi server (i.e.
JMicron Technology Corp. SATA controller
). -
Click the Toggle passthrough button to update the device's Passthrough status from
Disabled
toEnabled
. -
Click the Reboot host button to reboot the ESXi server for the changes to apply.
-
After the ESXi server has rebooted, navigate back to the same PCI Devices section, and verify that the SATA adapter/card's Passthrough status is
Active
. -
To pass-through the physical storage device to a VM, configure the VM's Virtual Hardware:
-
In the Virtual Hardware tab, click the Add other device button.
-
Click the PCI Device option.
-
In the newly added New PCI Device section, expand the dropdown, and select the SATA adapter/card we had enabled for passthrough.
[!WARNING]
You MAY also need to update the SCSI Controller 0 selection toLSI Logic SAS
. ONLY do this if it turns out that this is actually required. -
Click the Save button.
-