Thursday, October 19, 2017

[How-to] Installing ESXi in VMware Workstation

So, maybe you are studying for an exam, or maybe you want more practice installing ESXi - The Hands-on Labs from VMware are great for playing, but not so good on core builds, maybe you are luckily enough to have a dev or lab at either home or work, for everyone else there is installing ESXi into Workstation/Fusion, this guide will cover how you put a base ESXi install into VMware Workstation.

Before we get started

This post is based off VMware Workstation 14 Pro  and ESXi 6.5u1 - but the concepts should be pretty similar across other versions.

This guide assumes basic understanding of VMware ESXi, Unix, networking services, and the like, and as usual these instructions are provided as-is, no support or warranty is provided or implied. Consider thyself warned.

What do I need?

To begin you will need the following:
  1. VMware Workstation (ver. 8+) fully installed.
    This will also work with Fusion (ver. 4+) for you MacOS fans.
  2. ESXi iso (download from
  3. Enough Resources - an empty ESXi 6.5u1 shell will require:
    • 1 CPU / 1 Core (2/1 recommended)
    • 4gb of RAM
    • Up to 40gb Disk (a fresh install takes up ~4.5gb of disk running and ~450mb when powered off)

Create your new ESXi Virtual Machine

1. From the VMware Workstation toolbar, click File > New Virtual machine (or CTRL-N).

2. Click Custom (advanced), then click Next.
3. Select the hardware compatibility for the virtual machine (latest for your Workstation should be fine, if you plan on migrating this into an ESX host at some point you could select the ESXi 6.5 compatibility option), then click Next.
4. Click Installer disk Image file (iso), and browse and open the ESXi iso file you downloaded,  click Next.
5. Enter a name for your virtual machine and choose where to save it, then click Next.
6. By default ESXi would like 2 Processors, as this is a Workstation test we can lower to 1 CPU/1Core with a little install hack (steps #16-18) if you don't have resource concerns, go ahead and leave this 2/1, click Next.
7. Memory is not so easy to change (and unlike 5.x appears to be a hard minimum now, even changing after the install), just leave this 4096 as the pain of trying to lower is more than we'll be covering for this post, click Next.
8. Setup network as you desire, for my test case this will be an isolated "lab" type network so I set it at Use host-only networking, but you can use bridged or NAT as well, click Next.
9. Paravirtualized SCSI is the default, I'd just leave it there unless you have a good reason to change, click Next.
10. Default Disk Type is SCSI, for my use case I have an NVMe, so I selected NVMe for performance (and I wanted to use this to test the performance of new NVMe in Workstation 14 Pro from the last time I built a ESXi in Workstation), click Next.
11. Create a new virtual disk, click Next.
12. Again, I wouldn't recommend lowering the disk size value here, but feel free to adjust as you see fit, click Next.
13. Leave the default disk file name, or change it as you'd like, click Next.
14. Leave Power on... checked, click Finish.

Complete your ESXi Install 

15. After your new ESXi server boots you will be presented with the following screen - to get our lower than 2 CPU core trick to work, you need to press ALT-F1 to get to the login console, if you used 2/1 for the CPU you can skip to step #19
16. At the ESXi console login with root and no password, then type the following commands:

cd /usr/lib/vmware/weasel/util
mv upgrade_precheck,py
chmod 666

17. In vi, search for CPU_MIN_CORE

/s CPU_MIN_CORE (Enter)
change from 2 to 1 - i to insert, change value (Esc)
save file - :wq (Enter)

18. run the following commands to "restart" the install, first get the PID of, next restart it.

ps -c | grep weasel
kill -9 [pid]

19. This will restart the install (this time without a fatal CPU error mid install), press (Enter).
20. Press F11 to Accept the EULA
21. The Default settings on Disk should be fine, press (Enter).
22. Set your keyboard layout, press (Enter).
23. Type a super secure password for Root, verify by doing it again, press (Enter).
24. Confirm the Install by pressing F11.
25. At the final install screen press (Enter) to reboot.

That's it, you now have a "fully functional" ESXi Host in VMware Workstation - I use the term very loosely, it's still running in Workstation - you get out of it what resources you have to give.

No comments:

Post a Comment