Tuesday 3 April 2012

How to Install ESXi 5 – The Free VMware vSphere Hypervisor


How to Install ESXi 5 – The Free VMware vSphere Hypervisor


Introduction to ESXi 5

VMware continues to be the world's leading vendor of virtualization solutions with their vSphere suite of products, based on their ESXi hypervisor. Now in its fifth major version, what is even more remarkable is that VMware gives this enterprise level product away free, without any significant restrictions. To get it all you have to do is visit the VMware website, create an account for yourself to receive your license key, and then download the ISO image. Follow the instructions below and in less than an hour you can be ready to deploy your first virtual machine.

What's new in ESXi5?

Take a look at the news pages and you will see a long list of new features and upgrades for ESXi 5, however many of these are only relevant to users of vSphere, the paid multi-server virtual infrastructure solution. The significant changes for users of the free ESXi version are as follows:
  • No more service console -  technically not a change for free version users, as you could only get the service console-less ESXi version of release 4 too but with version 5 VMware has made it the only option for everyone.
  • VMFS 5 file system - it's GPT rather than MBR based, so the size limit for datastores goes up from 2TB to 64TB, and you no longer have to specify the block size which could limit the maximum size of your virtual disks before.
  • Improved hardware support - ESXi5 now supports a wider range of SATA controllers making it easier to install on cheaper hardware. Support for USB devices is also more flexible, allowing you to permanently attach them to your VM or dynamically attach/detach whilst using the vSphere Client console.
  • UEFI and 3D graphics - virtual machines can boot from a UEFI BIOS, and software 3D graphics acceleration is now available to support GUIs like Windows Aero.

Should You Install ESXi5?

Virtualization has been a popular topic for a few years now but if this is the first time you have considered using it then its worth taking a few moments to consider whether it is the right option for you. The main things to consider are:
  1. What hardware do you intend to install ESXi on?
  2. What OS's do you intend to run on ESXi?

What Hardware

First lets look at (a), your ESXi server hardware; whether you have an existing system you plan to re-purpose or are planning on buying a new one there are several factors to take into account. The fundamental one is hardware compatibility, for a start you need a 64bit CPU and preferably one that supports "Virtualization Technology", and the other components should be listed on the VMware Hardware Compatibility List so that ESXi has suitable drivers for them. Beyond those basics you should also think about your performance requirements - if you want to have several virtual machines running simultaneously then its important to ensure your system has sufficient resources available. A detailed discussion of this would require a separate article but as a rough rule of thumb for smaller setups its best to avoid over allocating resources if possible, so ensure your system has enough CPU cores and memory for all your VMs. Don't forget about the storage too, its not just a question of capacity but also performance as an inadequate disk array can slow the entire system down to a crawl. Again its too vast a topic to go into detail here, but as a start you should have at least one physical disk per VM and preferably a good RAID controller, ideally with write cache enabled.

What Operating System

Second is (b), what OS's do you want to run on your ESXi host? Some things are more suited to virtualization than others, and some won't work at all. First of all consider that there is no local user interface with ESXi - you can only use the Virtual Machines running on it from another PC, so if you're thinking of it being the only system in your office then forget about it. That also tends to rule out its usage for any intensive graphics based activities, although ESXi now has 3D support it is basic so you won't be playing many games on it. All the same if you are looking at typical office applications then "virtual desktops" are still an option, in fact VMware's VMview product is aimed at precisely that, you can do the same thing on a smaller scale with ESXi Free. One thing you can forget about though is running any Apple software (unless you install ESXi5 on Apple hardware), as they deliberately block it. For most people the best usage of ESXi is enabling you to run several servers on one box, or as a development/testing environment where you can deploy and destroy VMs with a few clicks. Alternatively in some scenarios, for example if you only have a single powerful workstation PC, then you may be better off with a virtualization solution that runs within your existing OS such as VMware Workstation or the free VirtualBox application.

Installing ESXi 5

So by now you should have established that you do really want to deploy ESXi5, you have a suitable system to install it on and you have registered for a license key and downloaded the ISO image. Next you need to decide how you are going to install it, as in fact there are potentially four different deployment methods, but we only need to consider two of them (the other two are targeted at multiple server setups). The choice is whether to install ESXi onto the hard disks, or to use a dedicated internal SDcard or USB thumb drive. I recommend the latter option as it can make maintenance and upgrading much simpler in future, but make sure you purchase a quality branded model as you may want it to last a few years. One thing to bear in mind for the installation process is that these storage devices usually come pre-formatted, which isnt a problem except that the ESXi installer will give you an alarming warning about data already being on the drive - you can safely ignore that and continue with the installation.
Once you have completed the installation you should be able to remove the media and the server will boot straight into ESXi, which turns out to be a rather unexciting text based console. Ignore the dull interface, you should only need to use it this one time to set a management IP address, after which you will do everything else with the much more user friendly vSphere Client. In fact once you have completed this initial setup you can remove the monitor and keyboard from your ESXi host and use them elsewhere, as you are unlikely to need them again.

Setting the Management IP address

From the ESXi console screen press the F2 key to enter the "System Customization" menu, which will look like this:
Installing ESXi 5
Use your keyboard's cursor keys to highlight the "configure management network" option, as above, and press enter to select it.
Installing ESXi 5
By default ESXi will allocate the first network adaptor (NIC) on your system to the "management network", and usually if you have connected all the NICs to your network it shouldn't make any difference. However if you have a particular requirement to use a different NIC, or assign it to a VLAN, then you can do this through the relevant options on the menu. You will find though that ESXi only refers to NICs by their MAC (hardware) address, so you may have to resort to some trial and error to establish the correct one.
Assuming you do have the Management NIC connected then all you have to do is enter the IP Configuration menu:
Installing ESXi 5
The options here are self explanatory, your first decision is whether to use DHCP or a static IP address assignment, I would normally recommend the latter so you can be sure that you will always be able to connect to it.
Select the "Set static IP address...." option and then enter a suitable address and the subnet mask in the appropriate areas below. Getting the gateway correct is not so essential, ESXi does not need Internet access to function, so if for example you decide to use a different subnet for your "management network" you can enter a dummy address for the default gateway.
When you have set the IP address details press Enter to confirm and return to the previous menu. The only other option you may wish to configure here is the DNS configuration, where you can set your primary and secondary DNS servers, along with the full domain name of your new ESXi server. In previous versions of ESXi getting the DNS configuration correct has always been especially important if you are using a vCenter Server to manage your virtual infrastructure, but vSphere5 is less dependant on it. For a standalone ESXi5 installation therefore a correct DNS configuration is not essential so dont worry too much if you are not sure what to put here. One thing to bear in mind too if you have Windows DNS servers is that by default they do not accept DNS registrations from unauthenticated hosts (i.e. non Windows domain members), so you will have to create an A record for your ESXi server manually.

After you have completed entering the settings then press Esc to exit the Management Network configuration, you will then be prompted to restart the management agents to apply your changes - agree to that and it shouldnt take long to complete. Now you will be back at the main menu, if you feel its necessary you can use the "Test Management Network" option to confirm that you have network connectivity from your ESXi server, otherwise press Esc once more to log out. The ESXi console screen should now show you the instruction "To manage this server connect to https://xxx.xxx.xxx.xxx" with the IP address you specified, so transfer to another Windows computer on your network and enter that in its browser. Accept any security certificate warnings and you should be presented with an ESXi webpage including the option to download the vSphere Client, like this:
Getting Started with ESXi 5
Click the link to save the vSphere Client installer, and then run it. Following on from that the procedures to manage your ESXi host and create your first virtual machine are virtually unchanged from version 4, as detailed in my article "Using the vSphere Client to manage ESXi".

 Conclusions

By this point you should have ESXi5 up and running and are installing your first virtual machine with it. Although a full vSphere setup and enterprise virtual infrastructure can be very complicated, deploying a single ESXi host server is in fact a fairly simple task and since the software is free it makes virtualisation available to everyone. 

No comments:

Post a Comment