A free course in the installation and use of the free VMware vsphere Hypervisor (ESXi)
John Borhek, VCP3, VCP4, VSP, VTSP VMsources Virtualization www.vmsources.com 1-866-644-7764
Introduction
1. Introduction / Terms and Concepts 2. Installing the VMware Hypervisor (ESXi) 3. Configure ESXi 4. Building Virtual Machines & Installing VMware Tools 5. P2V Migration with the VMware Converter 6. Creating a Virtual Router with PfSense
2010 Virtualization Centralized operations 1965 Mainframe Era Centralized operations 1995 The X86 PC revolution Server Proliferation 1980 Micro/Mini Computer
ESXi, VMware Hypervisor The basic package which is installed on hardware and makes possible virtualization. Host VMware uses this term interchangeably with ESX or ESXi Virtual Machine A container which is capable of installing and/or running an operating system Guest An operating system running on a hypervisor within a Virtual Machine container COS Console Operating System which is responsible for providing a user interface on the server itself
General Purpose (vestigial) Operating System Programs and data that provide common services for efficient execution of various application software not specific to a hypervisor. Bootstrapping A technique by which a simple computer program is required to activate a more complicated system of programs. Boot Loader A program required to bootstrap an operating system: GRUB for Linux, ntldr.exe for Windows ISO Image A disc image of an optical disc. ISO images can be created from optical discs, or can be used to recreate optical discs using software from a file.
A software layer or operating system which presents hardware to the guest operating systems. Multiple instances of a variety of operating systems may share the hardware resources of a single host. Traditional Architecture Virtual Architecture
VMware invented virtualization for the x86 platform First product VMware Workstation released in 1999 GSX (Now VMware Server) and ESX Server first released in 2001
Virtual Machine X86 hypervisor Application Host OS (Linux/Windows) Application Virtual Machine X86_64 hypervisor Management Operating System Type 2 hosted Type 1 Bare Metal
Type 2 hosted Virtualization Hypervisor runs as an application service on top of a full, traditional operating system All Virtual Machine hardware is presented by the host operating system (Windows/Linux) Type 1 Bare Metal Virtualization Hypervisor runs in conjunction or in place of a traditional operating system Actual hardware resources from host server are apportioned to Virtual Machines
In the beginning, hypervisors ran in conjunction with a traditional vestigial operating system like Windows or Linux Operating system was installed directly on hardware and was required to bootstrap hypervisor (virtualization)
Hypervisor starts first No traditional / vestigial OS Management resources (if any) run separately as a VM or application framework vsphere Management Virtual Machine Appliance (vma) X86_64 hypervisor Type 1 Bare Metal
ESXi is just the VMware Hypervisor Onboard management limited to configuration of management network IP ESX is the VMware Hypervisor and a Linux Virtual Machine called the Service Console Full command-line COS on each ESX Server Configure hypervisor Configure storage Configure networking Configure/manage Virtual Machines
Using the vsphere Client, you can: Create and run Virtual Machines Up to 4 vcpu per VM Connect to SAN (iscsi or Fibre Channel) Use NFS shares Create and manage VMware Standard vswitches May be licensed for additional VMware services at any time by purchasing a different key
Standalone use only, no vcenter server precludes the use of many VMware Services: vmotion HA DRS Fault Tolerance Clones Templates Customization Specification (sysprep) Much More..
Command line management with the vcli or vma limited to queries (read-only) Up to 256 GB RAM per Server Symmetric Multiprocessing (vsmp) limited to 4 CPU s
Use the VMware Compatibility Guide: http://www.vmware.com/resources/compatibility/s earch.php
Many resources available online Must be true 64-bit capable hardware Will need supported NIC Intel Pro 1000 Broadcom Gigabit SCSI or supported SATA controller
Set BIOS time & date Update Firmware Enable hardware-assisted virtualization Intel VT AMD-V Configure directly-attached storage RAID 1 recommended for supported SCSI Delete pre-existing partitions (recommended)
Installing the VMware Hypervisor (ESXi)
Download the free VMware Hypervisor (ESXi) and license key Burn ISO image to CD Place CD in optical drive Power-on server and install ESXi
www.vmware.com
Burn the ISO to a blank disk. Do not extract the ISO and place the files on a disk!
Use the default option.
Hypervisor loads first
Press (Enter) to Install
Be sure to read and accept the VMware EULA
Install ESXi to a Local storage device
Press F11 to install
Installation takes just a couple of minutes!
Remove CD and press (Enter)
Server will reboot
Downloaded the free VMware Hypervisor (ESXi) and license key Burnt the ISO image to CD Placed CD in optical drive Powered-on server and installed ESXi
Configuring the free VMware Hypervisor
Set Password Configure Management Network Download and install the vsphere Client Connect to ESX Server Apply License to ESXi Configure NTP
Choose a secure password
The Management Network will be used to connect to ESXi with the vsphere Client.
Choose IP Configuration
Set an IP address which is part of your Management Network
Set DNS for your Management Network
Choose a hostname for your ESXi
Browse to the IP address of the ESXi Download the vsphere Client Download comes from vmware.com
Connect as: root with the password you set
Place a check mark to Install this certificate, then choose Ignore
Select: Configuration > Licensed Features > Edit
Choose: Assign a new license key to this host
Choose Enter Key Enter the license key which was provided when the VMware Hypervisor was downloaded When key is entered, allowed usage will be shown
Set ESX Server to Stratum 1 NTP time source Individual server example time.nist.gov Pool example (preferred) 0.north-america.pool.ntp.org 1.north-america.pool.ntp.org 2.north-america.pool.ntp.org Use VMware Tools to set VM time to ESX time Ensure accurate logging Prevent VM time drift
Select: Configuration > Time Configuration > Properties
Set the time manually to the correct time Choose: Options
Choose: NTP Settings > Add
Specify a NTP Server or Pool of NTP Servers
Password is set Management Network has been configured vsphere Client downloaded and installed Connected to ESX Server Configured licensing Configured NTP
Building Virtual Machines & Installing VMware Tools
What is a Virtual Machine? Create a new Virtual Machine Install the Operating System Install VMware Tools Use VMware Tools to set Virtual Machine Time
A Virtual Machine is a container which has been compared to: an efficient, isolated equivalent of a physical computer. Virtual Machines have: Hardware (CPU s, NIC s, RAM, Disk) Bios (Phoenix)
It is important to relate the operation of a Virtual Machine to its physical counterpart Do not begin to diagnose problems differently because a computer is a Virtual Machine
Right-click on the ESXi and choose: New Virtual Machine
Choose Custom configuration
Choose a name which is representative of the VM.
Choose Version 7
Choose the correct Operating System
Choosing fewer CPU s is often better than choosing too many CPU s and wasting resources.
Choose an appropriate amount of memory for your requirements ESXi uses many techniques to reclaim memory which is not actively in use. ESXi is capable of efficiently over committing memory resources
Use the adapter suggested by the New Virtual Machine Wizard, it will most likely be compatible with your OS choice. E1000 for Windows 7, Server 2008 and Linux Flexible for XP and legacy.
Use the SCSI Contriller suggested by the New Virtual Machine Wizard, it will most likely be compatible with your OS choice. LSI Logic SAS for Windows 7 / Server 2008 LSI Logic Parallel for XP / Server 2003
Choose: Create a new virtual disk
Select disk size Thin provisioned disks will only utilize allocated space on a datastore but can perform poorly No need to support clustering features with free VMware Hypervisor
Is used for Management and OS installation ONLY Not used for user/desktop connections Not encrypted should be run on secure networks only Power Off Power ON Create Snapshot Connect Floppy Connect CD/DVD/ISO Snapshot Manager
Virtual Machine must power-on before connection can be made to CD/ISO Until the VMware Tools are installed, mouse and keyboard are either IN or OUT of the console Use Ctrl + Alt to release mouse and keyboard
You can connect to: The CD/DVD on your workstation An ISO image on your workstation The CD/DVD of the ESXi An ISO image which has been uploaded to the ESXi
Choose: VM > Guest > Send Ctrl + Alt + del You can also use the key combination Ctrl + Alt + Ins
The VMware Tools are essential to efficient Virtual Machine operation and interaction Mouse and Keyboard Display improvement Memory management Time Storage Drivers much more.
Choose: VM > Guest Install/Upgrade VMware Tools
The VMware Tools packages are stored by default on each ESX and ESXi as ISO images ESXi may not have as many varieties of VMware Tools as ESX Previously connected CD/DVD/ISO is disconnected automatically
May be a good time to change computer (DNS) name or join domain before restart.
Locate VMware Tools in the System Tray
Place a check mark in Time synchronization between virtual machine and the ESX Server
Virtual Machines defined Created a new Virtual Machine Installed the Operating System Installed VMware Tools Used VMware Tools to set Virtual Machine Time
Physical to Virtual (P2V) Migrations with the VMware Converter
Download and Install the VMware Converter on a physical PC Convert the physical PC to a VM Edit the properties of the VM
Install on source PC In this case, an older XP box
Next Next
Choose I accept the terms in the License Agreement > Next Select a destination folder and choose: Next
VMware Converter Standalone can convert both local and remote PC s. To install all components choose: Local Installation
Finish and Run Client
Choose: Convert Machine
Choose Powered on machine Specify a machine This local machine
Destination type VMware Infrastructure Virtual Machine Specify Server IP User Name Password
Set Virtual Machine name
Choose datastore Set Virtual Machine to Version 7
Options Edit Networks If physical machine converts and NIC is connected, a hostname and/or IP address conflict will result!
Un-check Connect at power-on
Check Install VMware Tools on the destination Virtual Machine
Choose Finish
Fast (gigabit) networks help!
11 Minutes for 20 GB!
Before powering-on any converted Virtual Machine, it is important to remove unnecessary and/or obsolete hardware. Parallel ports Serial ports Floppy drive more
Converted physical PC s or Servers often contain lots of unneeded hardware Serial Ports Floppy Disk Parallel Ports Extra CD/DVD Unneeded hardware consumes resources on both ESXi and VM
Either turn off source physical PC or- edit the hostname and IP of this VM before connecting networking Choose: OK
The VMware Tools installation will cause new hardware to be found.
Disable unnecessary services screensaver display drivers sound CD/DVD Writer etc.
VMware Converter downloaded and installed on a physical PC Converted the physical PC to a VM Edited the properties of the VM and removed unnecessary hardware Powered on converted Virtual Machine
Building a Virtual Router for an all-in-one ESXi
Why use a virtual router Download pfsense Create a Virtual Machine use as a router Configure networking for ESXi Install pfsense router Configure pfsense
Reduce physical hardware required Improve firewall/router services Firewall Rules Port Forwarding Traffic Monitoring Captive Portal
www.pfsense.org We recommend doing a new install instead of using the VMware Appliance
Pick a mirror, then download the installer: pfsense-x.x.x-release-livecd-installer.iso.gz
The file is gzipped (*.gz) so Windows native will not un-zip it. We use: 7-ZIP
Select: Configuration > Networking > Add Networking
This will be a Virtual Machine Connection Type
You will know which adapter is unclaimed because its speed will be listed as down
Label the new network WAN
Finish
The new vswitch appears right below the existing vswitch
Right-click on the ESXi and choose: New Virtual Machine
Choose Custom configuration
Choose a name that describes the Virtual Machine
Choose a datastore
Virtual Machine Version 7
Choose: Other > FreeBSD
1 CPU
1GB RAM is more than sufficient for pfsense
Connect 2 NIC s to the Virtual Machine Place 1 in the LAN (VM Network) Place 1 in WAN
LSI Logic Parallel
New Disk
4 GB Disk will do
SCSI Disk please
Ready to complete
Router is now included in both networks
Open Console Power-on and allow to boot to PXE on no OS found
Virtual Machine must power-on before connection can be made to pfsense ISO Until the VMware Tools are installed, mouse and keyboard are either IN or OUT of the console Use Ctrl + Alt to release mouse and keyboard
You can connect to: The CD/DVD on your workstation An ISO image on your workstation The CD/DVD of the ESXi An ISO image which has been uploaded to the ESXi
Locate pfsense ISO connect to ISO image on local disk..
Choose: VM > Guest > Send Ctrl + Alt + del You can also use the key combination Ctrl + Alt + Ins
Allow pfsense to boot or choose option 1
Until you install it, pfsense runs as a live operating system from the ISO
Do not set up VLAN s at this point (even if you use them)
Generally the adapters will appear in the order which they are added to the VM
Choose option 99
Accept
Quick/Easy Install (you can always change it later)
Yes, you are sure!
It s not like boiling water, it goes pretty quickly
Uniprocessor
Reboot
The Virtual Machine, not ESXi
Disconnect any existing router from LAN, turn off any DHCP service on LAN Plug the unused NIC on ESXi into a WAN port pfsense is now your gateway If pfsense is not on the correct network, change the LAN IP
If your provider requires static IP, configure it from the web interface later
From a LAN attached PC, do the following: Start > Run > cmd ipconfig /release ipconfig /renew Should see an IP supplied by pfsense!
Browse to the IP address of pfsense (gateway) username: admin password: pfsense
Logging in will automatically start the wizard
Set hostname and DNS
Any NTP server, the default included, will do
If pfsense is not configured for your network you can change it now
Reload should take considerably less than 120 seconds, try clicking the icon after 30
Log in with your password
Browse to: System > Packages
Click the + symbol to the right of Open-VM- Tools
Takes about 5 minutes, screen reloads several times
Downloaded pfsense Created a Virtual Machine for use as a router Configured networking for ESXi Installed pfsense router Configured pfsense
Call VMsources 1-866-644-7764
VMware, VMware vsphere, ESX, ESXi, VMware vsphere Hypervisor, VMware vcenter, VMware vcenter Converter, VMware Workstation, DRS, HA, Fault Tolerance, and VMotion are registered trademarks of VMware, Inc. This document was created using the official VMware icon and diagram library. Copyright 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware does not endorse or make any representations about third party information included in this document, nor does the inclusion of any VMware icon or diagram in this document imply such an endorsement.