Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / Virtualization / VMware / How to Create a Virtual Machine on VMWare ESXi

March 12, 2024 PowerShellVMware

How to Create a Virtual Machine on VMWare ESXi

This article shows how to create a new virtual machine on a VMware ESXi host and install a guest operating system from an ISO image. Let’s see how to create a virtual machine from the vSphere Client web interface or by using PowerShell commands.

Contents:
  • Create a Virtual Machine with VMware Web Client
  • Creating Virtual Machines on VMware ESXi Using PowerShell

Create a Virtual Machine with VMware Web Client

Suppose you’ve already installed a new ESXi host, the free VMware Hypervisor, or deployed a full-featured vCenter solution, and now you need to create virtual machines on it. To install a guest operating system in a virtual machine on your ESXi host, you must upload an ISO file that contains the installation image of the required OS version.

  1. Open the ESXi host web interface (Host Client or vSphere Client) or the vCenter console;
  2. Go to the Storage section and select a datastore to upload an ISO file to. Click Browse Files;
  3. You will see a list of files and folders on the datastore;
  4. Create a new folder called ISO, open it, click Upload Files, and select an ISO image file from your computer that you want to upload; Upload ISO file to VMware datastore

Then you can create a new virtual machine:

  1. Select New Virtual Machine (or Create/Register VM depending on your ESXi/vCenter version); Create New Virtual Machine on VMware ESXi host
  2. Specify a VM name;
  3. Select the datastore where you want to create virtual machine files;
  4. Choose an ESXi Virtual Machine hardware version. If there are no specific compatibility requirements, always use the highest virtual hardware version available; Select VM hardware version
  5. Then specify the guest operating system family and version. This determines which image will be mounted during the installation of VMware Tools and some of the additional features of the VM. If the OS version you want to install on a VM is not listed, select the closest one; Set VM guest OS family
  6. The next step is to allocate the virtual machine’s available computing resources. Specify the number of cores (vCPU) and RAM to allocate to your virtual machine. Specify the size of your virtual machine’s hard drive (you can increase or reduce the size of your VMware VM’s virtual hard disk later) and the virtual disk controller type (LSI Logic SAS is used by default), select the type of a virtual network adapter (in most cases it is better to use the default E1000 adapter) and a virtual network to place the VM’s network adapter in;
  7. In the virtual hard disk settings, you can specify how you want to allocate space for hard disk files on the storage (Disk provisioning). You can use either Thick disks (all disk space is allocated when creating) or Thin disks (a virtual disk file has a minimum size and grows as it fills with data in the guest OS); VMware disk provisionong
  8. If you want to add additional virtual devices (network adapters, disks, controllers, a virtual USB controller, a TPM module, COM ports, RDM disks, pass through a physical USB device, etc.), click Add new device and specify its settings. The default virtual hardware set is typically sufficient to run a virtual machine in the basic configuration. Configure VMware VM virtual hardware settings
  9. Click Finish to create a new VM.

Your virtual machine will appear in the list of registered VMs. You must mount the ISO file to start installing the guest OS in the VM:

  1. Click the VM and select Edit Settings; Edit VM setings
  2. Find a CD/DVD drive in the list of hardware. Select Datastore ISO File instead of Client Device;
  3. Click Browse and specify the path to your ISO file containing the OS installation image;
  4. Check the Connect at power on option to mount the ISO when the VM starts. Save the changes. Connect ISO image to VM

Then start your virtual machine: Power -> Power on (or click on the green Play button). Power on VM

To connect to a virtual machine console and start an OS installation, select Open Remote Console (Launch Web Console). The virtual machine console will appear, where you can continue with the guest OS installation.

Open VM console

Learn more about installing Windows 11 as a guest OS on VMware with or without a TPM and Secure Boot.

If you want to open the BIOS/UEFI settings at VM boot (for example, to change the boot order), open the VM options, go to VM Options -> Boot options, and enable Force EFI Setup (During the next boot, force entry into the EFI setup screen) or configure Boot Delay. Here you can switch between the EFI and BIOS firmware modes or enable the Secure Boot.

VM: enter EFI/BIOS settings

After installing the guest OS, it is recommended to install VMware Tools in it (it is a set of drivers and services for VMware virtual machine): Actions -> Guest OS -> Install VMware Tools.

Install VMware tools

Creating Virtual Machines on VMware ESXi Using PowerShell

You can use VPowerShell to create a virtual machine on VMware ESXi hosts. Install the PowerCLI PowerShell module on your computer:
Install-Module -Name VMware.PowerCLI

Connect to your ESXi or vCenter host:

Set-PowerCLIConfiguration -Scope AllUsers -InvalidCertificateAction Warn
Connect-VIServer <vCenter_FQDN_or_ESXi_hostname_or_IP>

The New-VM cmdlet is used to create a virtual machine.

New-VM -Name TestVM1 –VMHost esxi01.woshub.com -Datastore ISCSI_DC01 -DiskGB 40 -DiskStorageFormat Thin -MemoryGB 8 -NumCpu 2 -NetworkName 'VM Network'

If you want to add a virtual floppy or CD drive, add the following options:

-Floppy -CD

You can specify the guest OS version with the option:

-GuestId rhel4_64Guest

If you want to create a new virtual machine from a template and customize the OS following the configured scenario, add these options:

-Template WS2022_Template -OSCustomizationSpec Cust_WS2022

Remember to close the PowerCLI session when you are finished:

Disconnect-VIServer -Server $ESXIHost -Confirm:$false

You can also use Ansible to deploy virtual machines on VMware hosts (read the following post to learn how to manage VMware infrastructure from Ansible).
0 comment
2
Facebook Twitter Google + Pinterest
previous post
Cannot Install Language Pack on Windows 10 or 11
next post
List and Remove Calendar Events from Exchange Mailbox with PowerShell

Related Reading

View Windows Update History with PowerShell (CMD)

April 30, 2025

Uninstalling Windows Updates via CMD/PowerShell

April 18, 2025

Allowing Ping (ICMP Echo) Responses in Windows Firewall

April 15, 2025

How to Pause (Delay) Update Installation on Windows...

April 11, 2025

How to Write Logs to the Windows Event...

March 3, 2025

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMware
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025
  • How to Write Logs to the Windows Event Viewer from PowerShell/CMD

    March 3, 2025
  • How to Hide (Block) a Specific Windows Update

    February 25, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Delete Old User Profiles in Windows
  • Fix: Remote Desktop Licensing Mode is not Configured
  • How to Install Remote Server Administration Tools (RSAT) on Windows
  • How to Create UEFI Bootable USB Drive to Install Windows
  • Configuring User Profile Disks (UPD) on Windows Server RDS
  • Wi-Fi (Internet) Disconnects After Sleep or Hibernation on Windows 10/11
  • How to Allow Non-Admin User to Start/Stop Service in Windows
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top