Last night I did an upgrade from vSphere ESXi 4.1 to ESXi 5.0 using the ESXi 5 installation CD. The upgrade process was very easy.. elapsed time: 10 minutes!

^ Current installed OS: VMware ESXi 4.1.0 build 260247
- Mount the vSphere 5.0 cd-rom in the host
- Boot from CD-Rom drive
.
- Choose: ESX-5.0.0 Installer in the menu
Read more…
I’ve created a PowerCLI script that can be used to configure a vSphere 4 host with a custom configuration. And you can select in the menu to configure the host (option 1) + you can select (option 2) to add the host into a cluster on a vCenter Server. I’ll update this post with new configurations/versions, I’m still a PowerCLI beginner so.. please comment if you have any tips or suggestions.
Menu:
1. Configure new vSphere host:
- Connect vSphere host;
- Enter maintenance;
- Set the hostname and domain name;
- Configure DNS settings;
- Configure NTP Server;
- Configure Support User;
- Enable the software iSCSI initiator;
- Delete the default VM Network;
- Configure vSwitch0 – Management / vMotion (incl. failover en load balancing);
- Configure vSwitch1 – Network;
- Configure vSwitch2 – iSCSI (incl.VMkernels + failover en load balancing);
- Configure iSCSI target address;
- Exit Maintenance Mode
2. Configure new vSphere host to vCenter Server
- Connect vCenter server;
- Add vSphere Host to vCenter server;
- Re-Balance Cluster
0. Quit
The script: [updated: 07/07/2011 - v.1.5]
#====================================================================#
# SCRIPT: Configure_new_ESXi_Host_Menu.ps1 #
# FUNCTION: Configure fresh installed host #
# CREATED: 05/07/2011 #
# MODIFIED: 07/07/2011 #
# VERSION: v.1.5 #
#====================================================================#
# CHANGELOG: #
# #
# v.1.5 #
# - Added answer field to configure host; #
# - Added start menu: config host and add to vCenter server #
# - Hide config output, show's only when failure; #
# #
#====================================================================#
# START MENU #
#====================================================================#
do {
Write-Host "Please make your choise:" -foregroundcolor yellow
Write-Host " 1. Configure new vSphere host"
Write-Host " 2. Configure new vSphere host to vCenter Server"
Write-Host " 0. Quit"
Write-Host " "
$response = Read-Host "Select 0-2"
Write-Host " "
switch ($response)
{
1 {
#====================================================================#
# HOST = CUSTOM DEFINITIONS #
#====================================================================#
$ESX_host = read-host "Select ESXi host by DNS to connect"
$newhostname = read-host "Select hostname to configure"
$newdomainname = read-host "Select domain name to configure"
$root_user = "root"
$root_password = read-Host "Select root password to connect"
$new_user = read-host "Select extra username to configure"
$new_user_password = read-Host "Select extra password to configure"
$dns01 = read-host "Select Primary DNS to configure"
$dns02 = read-host "Select Secundary DNS to configure"
$VMK01 = read-host "Select iSCSI VMkernel01 to configure"
$VMK02 = read-host "Select iSCSI VMkernel02 to configure"
$iSCSIsub = read-host "Select iSCSI Subnet Mask to configure"
$iSCSItarget = read-host "Select iSCSI target to configure"
$vMotiontcp = read-host "Select vMotion VMkernel to configure"
$vMotionsub = read-host "Select vMotion Subnet Mask to configure"
$NTPServer01 = "0.pool.ntp.org"
$NTPServer02 = "1.pool.ntp.org"
Write-Host "vSphere Host-configuration will begin..." -foregroundcolor Green
#====================================================================#
Write-Host "Connect to the target ESXi Host" -foregroundcolor green
#====================================================================#
Connect-VIServer "$ESX_host" -User "$root_user" -Password "$root_password"
Sleep 10
#--------------------------------------------------------------------#
Write-Host "Enter Maintenance mode" -foregroundcolor green | out-null
#--------------------------------------------------------------------#
Get-VMHost | Set-VMHost -State maintenance | out-null
#--------------------------------------------------------------------#
#
#
#====================================================================#
# ***CONFIGURE HOST SETTINGS*** #
#====================================================================#
Write-Host "Set the hostname and domain name" -foregroundcolor green
#--------------------------------------------------------------------#
Get-VMHostNetwork | Set-VMHostNetwork -DomainName $newdomainname -HostName $newhostname | out-null
Sleep 10
#--------------------------------------------------------------------#
Write-Host "Configure DNS settings" -foregroundcolor green
#--------------------------------------------------------------------#
Get-VMHostNetwork | Set-VMHostNetwork -DnsAddress $dns01 | out-null
#--------------------------------------------------------------------#
Write-Host "Configure NTP Server" -foregroundcolor green
#--------------------------------------------------------------------#
Add-VmHostNtpServer -NtpServer "$NTPServer01" , "$NTPServer02" | out-null
#--------------------------------------------------------------------#
Write-Host "Configure Support User" -foregroundcolor green
#--------------------------------------------------------------------#
New-VMHostAccount -Id "$new_user" -password "$new_user_password" -Description "Tech Support" -AssignGroups root -GrantShellAccess | out-null
#--------------------------------------------------------------------#
#
#
#====================================================================#
# ***CONFIGURE NETWORK*** #
#====================================================================#
Write-Host "Delete the default VM Network" -foregroundcolor green
#--------------------------------------------------------------------#
Get-VirtualPortGroup -Name "VM Network" | Remove-VirtualPortGroup -Confirm:$false | out-null
#--------------------------------------------------------------------#
Write-Host "Configure vSwitch0 - Management / vMotion" -foregroundcolor green
#--------------------------------------------------------------------#
Get-VirtualSwitch -Name vSwitch0 | Set-VirtualSwitch -Nic vmnic0,vmnic1 -Confirm:$false | out-null
New-VMHostNetworkAdapter -PortGroup vMotion -VirtualSwitch vSwitch0 -IP "$vMotiontcp" -SubnetMask "$vMotionsub" -vMotionEnabled:$true -Confirm:$false | out-null
get-virtualportgroup -name vMotion | Get-NicTeamingPolicy | Set-NicTeamingPolicy -MakeNicActive vmnic1 | out-null
get-virtualportgroup -name vMotion | Get-NicTeamingPolicy | Set-NicTeamingPolicy -MakeNicStandby vmnic0 | out-null
get-virtualportgroup -name "Management Network" | Get-NicTeamingPolicy | Set-NicTeamingPolicy -MakeNicActive vmnic0 | out-null
get-virtualportgroup -name "Management Network" | Get-NicTeamingPolicy | Set-NicTeamingPolicy -MakeNicStandby vmnic1 | out-null
#--------------------------------------------------------------------#
Write-Host "Configure vSwitch1 - Network" -foregroundcolor green
#--------------------------------------------------------------------#
New-VirtualSwitch -Name vSwitch1 -Nic vmnic2,vmnic3 -Confirm:$false | out-null
Get-VirtualSwitch -Name vSwitch1 |Set-VirtualSwitch -NumPorts "256" -Confirm:$false | out-null
Get-VirtualSwitch -Name vSwitch1 | New-VirtualPortGroup -Name "VLAN-100-Production" -VLANID 100 | out-null
Get-VirtualSwitch -Name vSwitch1 | New-VirtualPortGroup -Name "VLAN-200-Management" -VLANID 200 | out-null
Get-VirtualSwitch -Name vSwitch1 | New-VirtualPortGroup -Name "VLAN-300-DMZ" -VLANID 300 | out-null
#--------------------------------------------------------------------#
Write-Host "Configure vSwitch2 - iSCSI" -foregroundcolor green
#--------------------------------------------------------------------#
New-VirtualSwitch -Name vSwitch2 -Nic vmnic4,vmnic5 | out-null
New-VMHostNetworkAdapter -PortGroup "iSCSI01" -VirtualSwitch vSwitch2 -IP "$VMK01" -SubnetMask "$iSCSIsub" | out-null
New-VMHostNetworkAdapter -PortGroup "iSCSI02" -VirtualSwitch vSwitch2 -IP "$VMK02" -SubnetMask "$iSCSIsub" | out-null
get-virtualportgroup -name "iSCSI01" | Get-NicTeamingPolicy | Set-NicTeamingPolicy -MakeNicActive vmnic4 | out-null
get-virtualportgroup -name "iSCSI01" | Get-NicTeamingPolicy | Set-NicTeamingPolicy -MakeNicStandby vmnic5 | out-null
get-virtualportgroup -name "iSCSI02" | Get-NicTeamingPolicy | Set-NicTeamingPolicy -MakeNicActive vmnic5 | out-null
get-virtualportgroup -name "iSCSI02" | Get-NicTeamingPolicy | Set-NicTeamingPolicy -MakeNicStandby vmnic4 | out-null
#--------------------------------------------------------------------#
#
#
#====================================================================#
# ***CONFIGURE STORAGE*** #
#====================================================================#
Write-Host "Configure iSCSI target address" -foregroundcolor green
#--------------------------------------------------------------------#
Get-VMHost | Get-VMHostHba -Type iScsi | New-IScsiHbaTarget -Address "$iSCSItarget" | out-null
#--------------------------------------------------------------------#
Write-Host "Configure iSCSI initiator" -foregroundcolor green
#--------------------------------------------------------------------#
Get-VMHostStorage | Set-VMHostStorage -SoftwareIScsiEnabled $True | out-null
#--------------------------------------------------------------------#
#
#
#====================================================================#
# ***FINISHING CONFIGURATION*** #
#====================================================================#
Write-Host "Exit Maintenance Mode" -foregroundcolor green
#--------------------------------------------------------------------#
Get-VMHost | Set-VMHost -State connected | out-null
#--------------------------------------------------------------------#
#
#
Write-Host "vSphere Host-configuration has finished.." -foregroundcolor yellow
break;
}
2 {
#====================================================================#
# vCenter - CUSTOM DEFINITIONS #
#====================================================================#
$vCenterServer = read-host "Select vCenter server to connect"
$vCenterAdministrator = read-host "Select vCenter Administrator"
$vCenterPassword = read-host "Select vCenter Administrator password"
$cluster = read-host "Select Cluster to add host"
Write-Host "vSphere Host will be added in vCenter server..." -foregroundcolor Green
#====================================================================#
Write-Host "Connect to the target vCenter server" -foregroundcolor green
#====================================================================#
Connect-VIServer "$vCenterServer" -User "$vCenterAdministrator" -Password "$vCenterPassword"
#====================================================================#
Add-VMHost $ESX_host -Force -Location (Get-Cluster "$cluster") -User root -Password "$root_password" | out-null
#====================================================================#
#
#
#====================================================================#
# ***FINISHING CONFIGURATION*** #
#====================================================================#
Write-Host "Tell DRS to re-balance VMs including the new host" -foregroundcolor green
#====================================================================#
Get-DrsRecommendation -Cluster (Get-Cluster "$cluster") -Refresh | out-null
#====================================================================#
#
#
Write-Host "Host is added to vCenter Server.." -foregroundcolor yellow
break;
}
}
}
while ($response -ne "0")

Compliance Checker for vSphere downloads to a Windows desktop and the intuitive web-based interface requires little or no learning curve. Administrators simply point the product to the ESX and ESXi hosts they want to test compliance against to perform the test immediately. The resultant compliance report provides a detailed rule by rule indication of pass or failure. Where compliance problems are found, users are directed to a detailed knowledge base for an explanation of the rule violated and advice on remediation. Compliance Checker for vSphere should be downloaded by all VMware customers to assess and report on the security and compliance of deployed VMware servers against the VMware vSphere Hardening Guidelines.
Download free VMware Compliance Checker for vSphere.

To determine if VAAI is enabled service console in ESX or the RCLI in ESXi, run the commands and ensure that the value is 1:
# esxcfg-advcfg -g /DataMover/HardwareAcceleratedMove
# esxcfg-advcfg -g /DataMover/HardwareAcceleratedInit
# esxcfg-advcfg -g /VMFS3/HardwareAcceleratedLocking

Can I check the VAAI status from the command line?
esxcfg-scsidevs -l | egrep "Display Name:|VAAI Status:"

More interesting information: yellow-bricks.com
Source: VMware KB

Virtual Hardware (VMX) template configuration:
| Hardware: |
Value: |
| Memory |
2 GB |
| CPU’s |
1 |
| Video card |
Auto-detect video settings |
| VMCI device |
None |
| SCSI Controller 0 |
LSI Logic SAS, bus sharing: none |
| Hard disk 1 |
40 GB, Thin (after deploy always Thick) |
| CD/DVD Drive 1 |
Client Device |
| Floppy Drive 1 |
Removed |
| Network Adapter 1 |
VMXNET3, network: VM Network with DHCP (for joining domain) |
| General Options |
OS: Microsoft Windows Server 2008 R2 (64-bit) |
| VMware Tools |
Advanced: Check and upgrade Tools during power cycling |
| Virtual Machine Version |
7 |
Microsoft Windows Server 2008 R2 template configuration:
- Install always the latest VMware Tools (in my case: ESXi 4.1 build 260247)

- Change the CD/DVD Drive 1 from drive letter D:\ to X:\

- Install VMware display driver: VMware SVGA 3D (Microsoft Corporation – WDDM)

Driver located: C:\Program Files\Common Files\VMware\Drivers\wddm_video\
Read more…
I created a new VM via the “New virtual machine" wizard at my ESXi 4.1 server, after configuring the correct network settings and added some disks I started the VM.. but received this warning:
Insufficient video RAM. The maximum resolution of the virtual machine will be limited to 1672×1254. To use the configured maximum resolution of 2560×1600, increase the amount of video RAM allocated to this virtual machine by setting svga.vramSize="16384000" in the virtual machine’s configuration file.

Solution:
- Edit the VM settings
- Select: Video card
- Select: “Auto-detect video settings”
- Power on your VM… and it’s working

Last week I build a rack for a customer with some brand new HP DL380 G7’s, pre-sales decided (happy me) to install ESXi 4.1.. after creating a RAID10 (2x 72GB) configuration on HP SmartArray 410i I started the installation.
After the installation my first boot, ESXi keeps hanging on “multiextent loaded successfully” .. rebooted once again.. no result, waited more then 20 minutes.. still no result.

Watching some log files (ALT + F12) I saw some warnings/errors:
Could not detect setting of QErr for device naa.60a98000572d504c654a573236636b6c. Error Failure
ScsiDeviceIO: 4494: Could not detect settings of QErr for device naa.6005….
LinScsiLLD:
VMWARE SCSI Id: Could not get disk id for vmhba32:CO:TO:LO
Solution:
The current (out of the box) firmware for the HP SmartArray 410i was 3.03 , upgrade to version 3.66 (latest).
But… to solve this issue you need to delete the current array configuration and create a new one. Run the ESXi 4.1 installation again and the problem is permanently solved.
I know.. before you plan to install a new server.. first install the latest firmware with the HP Firmware DVD (955 mb).. I thought.. I’ll do this later.. NOT!
VMware released the first patches for ESX en ESXi 4.1, more information:
ESX:
ESX410-201010401-SG Security - KB 1027013
ESX410-201010402-SG Security - KB 1027014
ESX410-201010404-SG Security - KB 1027016
ESX410-201010405-BG Critical - KB 1027017
ESX410-201010409-SG Security - KB 1027019
ESX410-201010410-SG Security - KB 1027020
ESX410-201010412-SG Security - KB 1027022
ESX410-201010413-SG Security - KB 1027023
ESX410-201010414-SG Security - KB 1027024
ESX410-201010415-BG Critical - KB 1027025
ESX410-201010419-SG Security - KB 1027026
ESXi:
ESXi410-201010401-SG Security - KB 1027021
ESXi410-201010402-BG Critical - KB 1027028
Download patches: VMware