Tuesday, August 2, 2011

How to – ESXi installation


How to – ESXi installation


Summary Checklist
  • Check Virtualisation Technology is enabled in the BIOS
  • Download and install latest version of ESXi
  • Patch
  • Configure (static IP, DNS, NTP, vSwitch, root password and license)
  • Install VMA
  • Configure Hardware Health Monitoring
Step 1: Installation:
  • Check that “virtualization technology” is enabled in the BIOS
  • If you need to store files greater than 256GB then I would recommend creating 2 virtual disks in the RAID controller BIOS. One for the OS and one to use as a data store. Note that by default the installation of ESXi will format the virtual disk with a 1MB block size.
  • Remember to check that virtualisation support is enable in the BIOS.
Where possible download the vendors version of ESXi. For example Dell provide their own customized ISO that contains Dell specific settings for SNMP etc.
(Alternatively you can use the Dell Uniform Server Configurator – you will still need the Dell ESXi ISO however.
After downloading the ISO from the Dell Website I have booted the server off it and installed ESXi.
After reboot you will get a screen similar to the below showing the current IP address of the ESXi box. In this case it has picked up an IP address from DHCP.

Step 2 – Patching

I recommend running the VMware vSphere Host Update utility to install the latest patches.

Step 3 – Configure

If you haven’t got the Vmware VI client installed on your PC already you will then want to download the VI client to enable you to manage this server. You can get this by opening a web browser and entering in the IP of the ESXi server (as shown in the diagram above).
Click on the link highlighted above and install the VI client. Note that this downloads the client from the web and not from this server. It may take a few minutes.
Once installed open the vi client and connect to the ESXi server IP as shown below. Note the default username is root with no password.
You may now want to customise your install.

Set static IP:

Note that if the static IP is different you will need to re-launch the vi client and connect to the new IP.

Configure DNS:

Add other NICs to vSwitch:

This will improve performance and add a degree of fault tolerance with the network cards.

Setup NTP:

Note that VMs will likely pickup the time from the ESXi server so it is important the time is correct

Change Root Password:

License VMware:

You will need to Registerwith Vmware and they will email you a license. Once you have this you can enter this on the below screen.

Step 4 – Post Installation

I recommend installing the vMA and setting up hardware monitoring. Please click on the hyperlinks for more information.
Please Click any of the following link

Monitoring Standalone ESX\ESXi Server hardware with the VMA


Monitoring Standalone ESX\ESXi Server hardware with the VMA



The below article explains how to setup a perl script to generate a daily email showing the hardware status of your VMware ESX/ESXi servers. In the below example we are using a VMA to run the perl scripts but you could also do this as a scheduled task on a windows host (with the vmware vsphere client installed)

If you haven’t setup the vMA please see my article on this setup-the-vsphere-management-assistant

Step 1 – Upload the Esx-health.pl script to your VMA server

I currently use the excellent esx-health.pl script originally developed by William Lam with additional modifications from James Pearce.
Cut and paste the code from http://blog.peacon.co.uk/wiki/Esx-health.pl_code into a notepad document and save as Esx-health.pl (Be sure you read and agree to the terms of use.)
Then copy this perl script to your VMA. I use Veeam Backup & FastSCP for this.

Step 2 – Execute code

Connect to the VMA and change to the directory where you copied the Esx-health.pl script
Navigate to the directory where you have copied the perl script and make sure you have execure permissions by entering:
chmod +x Esx-health.pl

Execute the below command:
./Esx-health.pl –server –username root –mailhost –maildomain –mailfrom ESXMonitor@ –mailto
Note – I find issues when pasting hypens (i.e. “-”) if you get an error running this command try deleting and retyping the hypen. Weird but seems to work.
Note that the command is case sensitive
You will be prompted for the password for the ESX server.
You should shortly receive the health check email
If you don’t receive this email then it may be due to the SMTP server not being setup to allow relays from the VMA’s IP

Step 3 – Schedule the script to run

In the below example I am scheduling the perl script to run everyday.
  • Logon to the VMA and enter the command crontab – e
  • Enter the command to run the perl script. The below command will run daily at 08:01
  • 01 08 * * * ./Esx-health.pl –server –username root –password –mailhost –maildomain –mailfrom ESXMonitor@ –mailto
  • Once you have entered this press CTRL + C to exit
  • Then type :wq to save and quit
Note – I haven’t found a way to send to more than 1 email receipient. If you want to send to multiple recipients then I recommend setting up a separate cron job for each
  • You can verify your entry is listed by running crontab –l
Note – To avoid passing the root password in plaintext you can use vifastpass
Please Click any of the following link

Setup the vSphere Management Assistant


Setup the vSphere Management Assistant



The below article describes the initial stpes in setting up a vSpehre Management Asssitant appliance.

Step 1 – Download and Install


  • Go to the Vmware website and download the latest version of the VMA appliance
  • This comes as a .zip file. Extract this file. You should get the files below
  • You can then create the VMA appliance using the .ovf file
  • Once the VMA files have finished uploading to your ESX server you can then power on the newly created VM.
  • Connect to the console of the new VM and run through the various setup options specifying IP addresses etc.

Step 3- Set Time Zone and Keyboard


Use the “date” command to view the current date, time and time zone info. If you need to change these enter the commands

Set Time Zone:
sudo rm /etc/localtime
sudo ln -s /usr/share/zoneinfo/GMT /etc/localtime
(If your timezone is not GMT browse the zoneinfo directory for other timezones)

You can set the time with the below command
Sudo date –set “28 Jan 2010 18:00:00″
(note there is a double hyphen)
Set Keyboard
sudo nano /etc/sysconfig/keyboard
(Choose the appropriate keyboard option – in the below case its “uk”)


Step 3 – Add to Active Directory (optional)


If desired you can add the VMA to your Active Directory Domain. Enter the below on the VMA console
sudo domainjoin-cli join
You will need to reboot

Step 4 – Enable the vi-user account


By default the vi-user account cannot be used until you have specified a password.
sudo passwd vi-user

Step 5 – Add standalone ESX\ESXi server


You can add target servers running virtual centre 4.0 + and ESX\ESXi3.5+
To add a standalone ESX\ESXi server run the below command
vifp addserver
You will be prompted for the root username and password. You can verify the target servers in use with the command
Vifp listservers
Please Click any of the following links

Migration from SBS 2003 to SBS 2008 – part 3


Migration from SBS 2003 to SBS 2008 – part 3


Once you have finished the setup of SBS 2008 you will need to migrate data and settings over to the new SBS 2008 server. In the SBS 2008 Console there is a “Migrate to Windows SBS” wizard.
Work your way through these wizards and following the instructions. Note that migrating data and mailboxes will effect users so think carefully about when you run these.
These options are discussed further below.
  1. Change where to store data on the destination server

Use this to change where the users redirected folders are stored
  1. Configure the network

Use this to setup TCP/IP info
  1. Configure the Internet Address

This launches the “Setup Your Internet Address” wizard
  • In virtually all cases you will already have a domain name and be managing it externally
  • if you are using a different hostname than “remote” for OWA then you will need to specify this in the “advanced” settings
  1. Migrate network settings


  1. Migrate Exchange mailbox and settings

The Migrate Exchange Server mailboxes/settings will explain how to use the native exchange tools to migrate to SBS 2008. Moving mailboxes may take quite a while depending on how much data is held. If the servers are not connected via Gb connections then you may want to consider using a small gigabit switch to connect the servers to just for the data copy.
  • If desired move the Exchange database to another physical drive (there is a section in the migration wizard that does this)
  • Install the latest service pack – currently exchange 2007 sp3.
  • Enable anonymous connection on the exchange receive connector
  • If you need other systems to relay through this server (which in my experience happens most of the time) create an “allowed relays” receive connector for any smart hosts. Seehere for further info.
  • Check the recipient policy – make sure this matches the policy on the original SBS 2003 server.

  • If you don’t want your iphone users to be forced to create a passcode on their phone disable this options.
  • Move mailboxes
    • I recommend using the “sbs migration” account for this.
    • If you get errors try running the Exchange 2007 BPA permissions test.
  • I recommend backing up the public folders to a pst just in case. Use the export function in outlook for this.
  • Change the exchange server and DC used for recipient update to the new SBS server
  • Change the server that generates the offline address book to the new SBS server
Note – there is a section on decommissioning Exchange in part 4 of this guide.I believe this is best left to the end of the migration

  1. Remove Legacy Group Policy and logon settings

The below group policys are created by SBS2003 and should be removed – they may not all exist in your environment. I recommend just removing the links to them in Active Directory rather than deleting the policies completely. This means you can go back and recover the settings if needed.
  • Small Business Server Auditing Policy
  • Small Business Server Client Computer
  • Small Business Server Domain Password Policy
  • Small Business Server Internet Connection Firewall
  • Small Business Server Lockout Policy
  • Small Business Server Remote Assistance Policy
  • Small Business Server Windows Firewall
  • Small Business Server Windows Vista Policy
  • Small Business Server Update services Client Computer Policy
  • Small Business Server Update Services Common Settings Policy
  • Small Business Server Update Services Server Computer Policy
  1. Migrating Users Shared Data

You may want to switch off the reports if you don’t want your end users getting them.

For the group policies to apply to users and computers…
  • Please ensure all user accounts are found in the Active Directory OU MyBusiness – Users – SBSUsers
  • Likewise all computer accounts should be in MyBusiness – Computers – SBSComputers
Note – you need to run the role wizard for the user accounts to show up in the SBS console
  • Note that this is likely to change group membership. Make sure you make a note of group membership and test this before applying to all users.
  • On the Migrate groups page, click Next.
  • On the Migrate user accounts page, click Run the Change User Role Wizard.
  • Select the desired role and choose “add user permissions or settings”

Select the relevant users or users

  1. Migrate Sharepoint Website

  • Assuming the sharepoint site is in use then please follow the instructions on migrating to the new SBS 2008 server.
  • You can find further info here
    • Move the internal Web site for Windows SBS 2008 migration
    • Steps performed on the Source Server for Windows SBS 2008 migration
    • Steps performed on the Destination Server for Windows SBS 2008 migration

General – Migrating Shared Files and Folders

  • As with moving the mailboxes this may take a while. If the servers are not connected via gigabit connections it might be worth connecting the servers to a small gigabit switch just for the data copy.
  • You will need to copy over any file shares from the old SBS server to the new SBS server.
  • You will need to check the permissions on the new folders
  • To copy the data over I recommend using Richcopy if speed is an issue. This however will not copy file permission so if that is an issue I recommend using robocopy or xcopy (with the /H /E /C /Y /O) flags.
  • Once the shares are copied over you will need to edit any logon scripts or group polices that set mapped drives
  • Also I recommend either making the shares on the old SBS 2003 server read only or remove them completely. This ensures that no-one is editing data on the wrong server.

General – Migrate Printers & Scanners

  • Any printers shared off the old SBS 2003 server will need to be re-setup on the SBS 2008 server.
  • Please see my other article on deploying printers via a GPO.
  • Check for scanners that may have hard references to the old server name or IP
  • Please Click any of the following link