Featured, Hypervisors, Virtualization Software, VMware

How to Run VMware vSphere ESXi in Fusion

Want to learn vSphere? Test vSphere? Prepare for your VMware Certified Professional (VCP) certification? Running VMware vSphere inside a local desktop hypervisor such as VMware Fusion or VMware Workstation is the best way to do it. By running vSphere in Fusion, you won’t need an expensive server that takes up space, eats power, and makes noise. Plus, you’ll have great flexibility with a virtualized vSphere virtual machine so that you can clone as many vSphere VMs as you want, build virtual private lab networks, virtual storage, and do it all on your existing desktop or laptop computer. Read this article to learn how to do it, step by step.



When we are done, here’s what it will look like:

Figure 1 – VMware vSphere Running in VMware Fusion

But first, why are we doing this?

5 Reasons You Need a Virtual Lab

If you need additional justification as to why you need a virtual vSphere lab, here’s why:

[I wish we had some cool counting numbers here to make this more visually appealing]

  1. Learn vSphere — to enhance your skill set, which could lead to a new job or a promotion
  2. Get a Cert — to prepare for the VCP-DV (aka the VCP5) certification and prove your vSphere knowledge with the most popular virtualization certification on Earth
  3. Test vSphere — to see how you might implement new changes or features in production to make your company’s infrastructure better
  4. Demo vSphere — consultant, pre-sales engineers, or software developers may all need to demonstrate vSphere (or their application working with vSphere) to potential customers and a virtual lab is the best way to do it
  5. Because it’s Cool — just having an entire virtual datacenter running on your laptop that you can power on at the local Starbuck is just downright cool, let’s face it!

So how do you do it? Let’s find out.

Preparing to Create a vSphere Virtual Lab in Fusion

To virtualize vSphere inside VMware Fusion, let’s first make sure that you’ve met all the requirements so that we know this will be successful, even before we start. Here are the requirements you need to fulfill:

  • Apple Mac laptop or desktop – since this post is about virtualizing vSphere under VMware Fusion and Fusion only runs on a Mac, then we need Apple hardware to do it. Please note that you CAN virtualize vSphere on a Windows OS computer using VMware Workstation (see my other post on how to do that – How to Run VMware vSphere in Workstation). The Mac you use should be relatively recent as it must have a 64 bit CPU with Intel-VT available in the CPU, plus you’ll need as much RAM as you can get. Additionally, you’ll want Mac OS X 10.6.7 or later to run Fusion.
  • RAM – running vSphere/ESXi as a single VM actually can be done with just 2GB allocated to the VM (and maybe 4GB on your system total) however if you want to power on a virtual machine (called a “nested VM”) inside the vSphere VM (that would be a VM running in a VM) then you’ll need as much RAM as you can get. I have a Macbook Pro Retina laptop with 8GB of RAM and I wish I had gotten the 16GB model when I start powering on multiple virtual machines, even if I am not running nested VMs and just want to run two ESXi hosts and a vCenter server VM to create a virtual, virtual infrastructure.
  • Disk Space – you’ll want a decent amount of disk space available as virtual machines can easily take up 40GB or so. However, VMware vSphere, just by itself, takes up very little disk space. It’s the virtual machines that you might want to run inside, a VMware vCenter virtual machine that you would run in Fusion, or a virtual storage appliance that would provide shared storage for vSphere that can take up large amounts of disk space. Not only do you want capacity but you also want throughput. For this reason, I recommend a Mac with a SSD flash disk drive because it offers consistently low-latency performance. In my case, my Macbook Pro Retina has a 256GB SSD. This is great for performance but I have quickly found that 256GB for the host OS, applications, and virtual machines is pushing the capacity limits and I long for more storage.
  • VMware Fusion – available as a free 30 day evaluation, VMware Fusion is type-2 hypervisor that allows us to run virtual machines (with a variety of operating systems) inside. You can run Windows 8, Windows 2012 Server (including Hyper-V), Linux, and many more.
  • VMware vSphere / ESXi – VMware ESXi is the hypervisor installed directly on a server. In many cases that is also called vSphere but, technically, vSphere is the “suite” of features around the hypervisor (such as vMotion, svMotion, HA, DRS, and FT), many of which require vCenter. Thus, just to run ESXi in a virtual machine, you could use the free vSphere Hypervisor indefinitely, at no cost. However (assuming you don’t already own vSphere), the best way to get a feel for the much more feature-rich commercial edition is to use the 60-day evaluation of vSphere which includes ESXi, vCenter, and other components. Alternatively, you could even opt to evaluate the advanced and comprehensive vCloud Suite for 60 days as well.

The official VMware requirements for VMware Fusion can be found here.

Installing VMware vSphere in VMware Fusion

I’m going to assume that you have already or can install VMware Fusion by yourself. Honestly, the installation for Fusion is no different than installing any other Mac OS application. If you need help or some tips, VMware has a nice KB article on installing Fusion that includes a video.

With the requirements met and Fusion installed, we can create what will be our vSphere virtual machine. To do it, open Fusion and press command-N, or go to File -> New. This brings up the new Virtual Machine Assistant.

Figure 2 – VMware Fusion New Virtual Machine Assistant

The New Virtual Machine Assistant first asks us to either insert an operating system disc or continue without a disc. In the case of vSphere, you’ll just click Continue without disc (unless you want to burn ESXi to a DVD and put it in your computer).

Now, select the VMware vSphere ESXi ISO file that you downloaded from VMware as the Operating System / Installation Disc and click Continue.

 Figure 3 – Selecting the VMware vSphere ISO Image

 Thankfully, VMware Fusion 5 and up (which is what this post is based on) supports running vSphere as a virtual machine and there is no painful editing of the virtual machine configuration file (the VMX file) to fool it into working. As you can see from the graphic below, Fusion learns that we are wanting to install VMware ESX from the ISO we provided and defaults to that virtual machine guest operating system type.

 Figure 4 – Specifying VMware ESX as the Guest OS Type

With VMware ESXi 5 selected as the guest OS type, click Continue.

Now you get to review the virtual machine you are about to create. As you can see, it defaults to 2GB of memory, a 40GB virtual disk file, and to use NAT virtual networking.

Figure 5 – Final Review of the New VMware ESXi Virtual Machine

If you plan to run nested virtual machines inside this virtual ESXi VM then I recommend that you use the Customize Settings option to increase the memory of the VM to something like 4GB and the virtual disk size of the VM to somewhere around 100GB (unless you will store the virtual machines on shared storage). When done reviewing, click Finish.

You’ll be prompted to name the virtual machine but you can take the default of VMware ESXi 5 (in this case), and click Save.

Figure 6 – Saving the New Virtual Machine

Upon saving, Fusion will start booting the new virtual machine from the ISO file.

Installing VMware ESXi in VMware Fusion

Now the VMware ESXi installation process begins. You’ll see the following two screens fly by as VMware ESXi goes through its boot process.

Figure 7 – The VMware ESXi Booter

Figure 8 – The VMware ESXi Startup

Once booted, the “Welcome to the VMware ESXi 5.1 Installation”. Press Enter to continue.

Remember – because you don’t have VMware Tools installed on this VM, if you click your mouse on the console your mouse will be “locked”.

Figure 9 – Welcome to the VMware ESXi Installation

To release your mouse from the virtual machine, how  down Control and push Option/Alt (at least on a Macbook Pro keyboard). However, to answer the installation questions, you’ll need to click on the console window and lock in your mouse.

Next, presses the Enter to select the default disk for installatino, which correlates with the 40GB virtual disk we created for this virtual machine in Fusion.

Figure 10 – Selecting an ESXi Installation Disk

Next, select your keyboard layout. In my case that was the default of US English. Press Enter.

Figure 11 -Selecting the Keyboard Layout

Next, enter the root password, making sure that you meet the minimum requirements, and press Enter.

Figure 12 -Entering the Root Password

Finally, confirm that you want to install with these parameters by pressing F11. On a Macbook Pro keyboard you’ll have to press Fn-F11 or else just F11 will turn down the audio volume.

Figure 13 -Confirming the VMware ESXi Installation with F11 

 You should see that the ESXi installation has begun and a progress bar. On my Mac, it took under 2 minutes (maybe even 1 minute) to complete the install. When done, you should see this message – that the installation was successful! Now, press Enter to Reboot the ESXi VM.

Figure 14 -ESXi Installation was Successful, Press Enter to Reboot

 Once the reboot is completed, you should see the VMware ESXi console screen as shown in Figure 1 of this article. To login, press F2, which is Fn-F2 on a Macbook Pro keyboard. From here, you’ll login as root with the password you created when you performed the installation (note that no longer is the root password blank/empty as it was in vSphere 4).

Figure 15 -Logging into VMware ESXi console

 Once logged in, you’ll be in what VMware calls the Direct Console User Interface, or DCUI. It’s in here that you can configure networking, allow SSH login to the console (local or remote), view system logs, or set the ESXi server back to its default configuration.

Figure 16 -The VMware Direct Console User Interface (DCUI)

At this point, you already have a functional VMware ESXi server. This server/VM has, by default, an IP address that is shared with only your Mac running VMware Fusion. In the case of our VM, we can see that the IP address is 172.16.126.128 (shown in Figure 1 and 14). You can connect to this IP address using you local web browser on your Mac, shown below.

Figure 17 -Connecting to the VMware ESXi VM with a Web Browser

However, the VMware vSphere Client that can be downloaded from the web interface in Figure 17 will only run on the Windows OS. Thus, to administer this VMware ESXi server from a Mac you have two options.

  1. Download and install (in another virtual machine) VMware vCenter, using either the Windows based installation (make sure to install the vSphere Web Client Server for web-based access) or the vCenter Server Appliance (which includes web-based access by default). With either of these, you will be able to administer the ESXi host (really an entire virtual infrastructure) from your Mac with the exception of accessing the consoles of the virtual machines (because today that doesn’t work from web-browsers in the Mac OS)
  2. Or, the much easier option is to create a new virtual machine in Fusion running a Windows OS (just about any recent OS will do from Windows 7 and up) and install the VMware vSphere Client for Windows inside, using that to administer the new VMware ESXi server VM.

In my case, I already had a Windows 2012 Server running as a VM in Fusion (configured on the same NAT network). I accessed the web-based interface for the VMware ESXi server we created, then downloaded, and installed the VMware vSphere Client for Windows.

From the vSphere Client for Windows, I connected to the IP address of the VMware ESXi VM, logged in as root, and used the password we created during the installation. You can see what it looked like in Figures 18 and 19.

Figure 18 -Logging into ESXi from the Windows-based vSphere Client

Figure 19 -Managing the VMware ESXi VM from the vSphere Client in Windows

As you can see in Figure 19, I am able to run a 64-bit virtual machine, nested, inside the virtualized VMware ESXi Server (Windows 8 in this case). So what are the next steps? From here, you could:

  • Install a VMware vCenter virtual machine (discussed more above) to use advanced features, which may involve needing two ESXi servers
  • Copy your ESXi server virtual machine so that you have two ESXi VMs, that could be used to test advanced features like vMotion (which would require vCenter)
  • Install virtual machines using ISO media such as a Windows 8 or Windows 2012 ISO that you could download under a free evaluation

You should note that the IP address we are using is only accesible from the Mac you are running ESXi on or a VM running on that Mac (which is what we did). If you want to access the ESXi VM from a server or desktop outside of your Mac, you’ll need to change the networking on the Fusion VM running ESXi to use Bridged networking and Renew the IP Address on the ESXi VM so that it will have a local IP address on your network. From there, you could access it from any machine on your network (maybe you already have a Windows desktop or a management solution you want to connect to it from or even an existing VMware vCenter server).

In summary, running VMware vSphere as a virtual machine is a great idea for testing, learning, and demonstration purposes. It can be done completely free (at least for 30 days while you evaluate Fusion). You can also run Windows 2012 Hyper-V in Fusion, you can run vSphere in Workstation in Windows, or even vSphere inside a VM on an existing VMware vSphere server in your datacenter. Virtualization has created so many options! My goal is to always have an available virtual lab comprised of two VMware vSphere VMs, vCenter, and a shared storage VM, all in a “golden” configuration that I can “spin up” at any time for demonstration or testing (or blogging). In my opinion, every virtualization admin needs a virtual lab!