vmware 5.1 knowledge base doc

271
1 vSphere 5.1 How To Series 2 vSphere 5.1 - Part 7 - vSphere Update Manager Install 3 vSphere 5.1 - Part 6 - vSphere Web Client Install 4 vSphere 5.1 - Part 5 - vSphere Client Install 5 vSphere 5.1 - Part 4 - vCenter Server Install 6 vSphere 5.1 - Part 3 - vCenter Inventory Service Install 7 vSphere 5.1 - Part 2 - vCenter Single Sign On (SSO) Install 8 vSphere 5.1 - Part 1 - ESXi Server 5.1 Install 9 Host Profile - HA DRS Cluster Non Compliant - FT logging is not enabled 10 Host Profile Issue with local SAS drives - Specification state absent from host 11 vCloud Networking and Security - Configuring a vShield Edge Load Balancer 12 vCloud Networking and Security - Deploying a vShield Edge Gateway Device 13 vCloud Networking and Security - Installing vShield Manager 5.1 14 Removing the Cisco Nexus 1000V vSwitch 15 VMware vSphere 5.1 Release Announced 16 Upgrade vCenter Server 4.1 to 5.0 17 vCenter Server 5 Install/Upgrade Warning - The Fully Qualified Domain Name cannot be resolved 18 vSphere 5 How To Part 5 Install vSphere Web Client (Server) 19 VMware vSphere 5 Resources and How Tos 20 vSphere 5 How To Part 4 Configuring vCenter Server (Creating a Datacenter, HA DRS Cluster and Adding a Host) 21 vSphere 5 How To Part 3 Install vSphere Client 5.0 22 vSphere 5 How To Part 2 Install vCenter Server 5.0 23 Installing VMware vCenter Server 4.1 24 AgentUpgradeChecker.exe has encountered a problem and needs to close 25 vCenter CapacityIQ - Part 3 - What-If Scenarios 26 vCenter CapacityIQ - Part 2 - Dashboard, Views and Reports 27 vCenter CapacityIQ - Part 1 - Installing 28 vCenter Server Database Retention Policy - Events and Tasks 29 Error Applying Host Profile - IP address is used for multiple virtual nics 30 Insufficient Memory Resources When Powering on a VM 31 Installing Guided Consolidation in vCenter 4.0 32 vCenter Service Not Starting - Service Dependancies such as SQL Server 33 vSphere Client EMC Storage Viewer Plugin 34 Keyboard Shortcuts for vCenter 4

Upload: prasanna-kumar-matam-katee-basava

Post on 08-Nov-2014

620 views

Category:

Documents


3 download

DESCRIPTION

(once you download pls share with everyone)

TRANSCRIPT

Page 1: Vmware 5.1 Knowledge base doc

1 vSphere 5.1 How To Series

2 vSphere 5.1 - Part 7 - vSphere Update Manager Install

3 vSphere 5.1 - Part 6 - vSphere Web Client Install

4 vSphere 5.1 - Part 5 - vSphere Client Install

5 vSphere 5.1 - Part 4 - vCenter Server Install

6 vSphere 5.1 - Part 3 - vCenter Inventory Service Install

7 vSphere 5.1 - Part 2 - vCenter Single Sign On (SSO) Install

8 vSphere 5.1 - Part 1 - ESXi Server 5.1 Install

9 Host Profile - HA DRS Cluster Non Compliant - FT logging is not enabled

10

Host Profile Issue with local SAS drives - Specification state absent from host

11

vCloud Networking and Security - Configuring a vShield Edge Load Balancer

12

vCloud Networking and Security - Deploying a vShield Edge Gateway Device

13

vCloud Networking and Security - Installing vShield Manager 5.1

14

Removing the Cisco Nexus 1000V vSwitch

15

VMware vSphere 5.1 Release Announced

16

Upgrade vCenter Server 4.1 to 5.0

17

vCenter Server 5 Install/Upgrade Warning - The Fully Qualified Domain Name cannot be resolved

18

vSphere 5 How To Part 5 Install vSphere Web Client (Server)

19

VMware vSphere 5 Resources and How Tos

20

vSphere 5 How To Part 4 Configuring vCenter Server (Creating a Datacenter, HA DRS Cluster and Adding a Host)

21

vSphere 5 How To Part 3 Install vSphere Client 5.0

22

vSphere 5 How To Part 2 Install vCenter Server 5.0

23

Installing VMware vCenter Server 4.1

24

AgentUpgradeChecker.exe has encountered a problem and needs to close

25

vCenter CapacityIQ - Part 3 - What-If Scenarios

26

vCenter CapacityIQ - Part 2 - Dashboard, Views and Reports

27

vCenter CapacityIQ - Part 1 - Installing

Page 2: Vmware 5.1 Knowledge base doc

28

vCenter Server Database Retention Policy - Events and Tasks

29

Error Applying Host Profile - IP address is used for multiple virtual nics

30

Insufficient Memory Resources When Powering on a VM

31

Installing Guided Consolidation in vCenter 4.0

32

vCenter Service Not Starting - Service Dependancies such as SQL Server

33

vSphere Client EMC Storage Viewer Plugin

34

Keyboard Shortcuts for vCenter 4

35

HA Advanced Options

36

vCenter 4 - Creating a Datacenter, HA DRS Cluster and Adding a Host

37

Upgrading vCenter Server from 2.5 to 4.0

38

vSphere Client - Windows 7 error parsing clients.xml file

39

Installing Performance Overview Charts in vCenter

40

Updating vCenter Server 2.5 U3 to 2.5 U4

41

Alarms and Email Alerts from vCenter

42

Deploying from a Template and Using Guest OS Customization

43

Licensing - Unable to change license state as the license server is unavailable

44

Template Guest Customization - How to Configure vCenter with Sysprep

45

Adding an ESX/ESXi host to vCenter

46

Installing VI vCenter Server 2.5 U3

47

VMware DRS

48

VMware HA

49

Remove Getting Started Tabs from VI Client

50

Virtual machine snaphots

 

Page 3: Vmware 5.1 Knowledge base doc

51

Maintenance mode stuck at 2%

52

License Server - Showing incorrect number of licenses

53

Updating vCenter Server Process Overview

54

vCenter Service Not Starting - Database Permissions Error

55

Files that make up a virtual machine

56

License Server 14 day Grace Period

57

Virtual Center Services

58

Licensing - Installing and updating licenses in VI

59

DRS Rules - Keeping VMs on and seperating VMs across physical servers

60

Auto Login to Virtual Center with VI Client (Pass Thru Authentication)

 

1 vSphere/ESXi 5.1 Guest OS Support Ending Soon

2 Change vmnic order on ESXi

3 Install an update/patch on ESXi Standalone without Update Manager using esxcli

4 Access to resource settings on the host is restricted to the server that is managing it

5 How to Migrate ESX 4.x to ESXi 5.0

6 vSphere 5 How To Part 1 Install ESXi 5.0

7 Software iSCSI Initiator with Jumbo Frames vs Hardware dependant iSCSI Initiator without Jumbo Frames

8 Creating/Adding a Raw Device Mapping (RDM) to a Virtual Machine

9 Installing ESXi 4.1 U1

10 Host currently has no management network redundancy

11 ESX 4.0 486 days uptime

Page 4: Vmware 5.1 Knowledge base doc

12 How to Resize a VMs Virtual Disk (.VMDK)

13 Updating a standalone ESXi host with vSphere CLI and vihostupdate

14 PCI standard PCI-to-PCI bridge Install Loop - Found New Hardware Wizard after P2V

15 Windows 7 Black Screen / Freezes / No Login Sceen on VMware ESX/ESXi

16 Multiple VMkernel NICs, Round Robin MPIO - DVS and Jumbo Frames

17 Intresting ESX Error on PCIE NIC Fail - Dazed and confused ESX

18 Configuring iSCSI Storage (Advanced with CHAP)

19 Configuring iSCSI Storage (Basic)

20 Creating a VMkernel Port (for ISCSI, vMotion, NFS and FT) on Standard and Distrubuted vSwitches

21 Accessing a VMFS Datastore Snaphot and Resignaturing

22 Changing the Queue Depth on Qlogic Fibre HBAs

23 Intel Gigabit ET 82576 Network Adaptor Driver ESX

24 Guest OS Slow, Freezing or Hanging with Windows Server 2008 R2 or Windows 7

25 Configuring Active Directory Authentication on ESX

26 ESXi - Accessing the Unsupported Console

27 ESX4 - Disable CTRL+ALT+DEL Keyboard Combination Invokes Shutdown

28 Installing ESX 4.0

29 Virtual Network Adaptor Types

30 Installing VMware Tools on Windows Server 2008 Server Core

31 Installing VMware Tools

32 Configuring ESX Syslog to a Remote Syslog Server

33 Permissions, Users and Roles on ESX

Page 5: Vmware 5.1 Knowledge base doc

34 Virtual Machine Automatic Startup and Shutdown

35 Creating a Virtual Machine (Basic Settings)

36 Creating a VMFS Datastore

37 Networking Configuration - vSwitches and Port Groups with 8 Physical NICs

38 Networking Configuration - vSwitches and Port Groups with 6 Physical NICs

39 Networking Configuration - vSwitches and Port Groups with 4 Physical NICs

40 Networking Configuration - vSwitches and Port Groups with 3 Physical NICs

41 Networking Configuration - vSwitches and Port Groups with 2 Physical NICs

42 NIC Teaming

43 ESX and ESXi Server Comparison

44 Networking - 802.1q Trunking

45 Networking - 802.1q Trunking and 802.3ad Link Aggregation using Cisco Switches

46 Releasing Locked Files in a VMFS Volume

47 Soft and Hard Stopping an Unresponsive VM

48 Running ESX 3.5 in Workstation 6.5

49 Installing ESXi on an IDE drive

50 Advanced HA Options

51 Virtual Machine - XP guest OS SCSI driver

52 Differences/Comparision between ESX and ESXi

53 Updating ESX - ISO

54 Multipathing Fibre Channel

Page 6: Vmware 5.1 Knowledge base doc

55 Service Console - Virtual Switch Commands

56 Service Console - Setting the VMkernel Default Gateway

57 Service Console - VMFS Datastores

58 Service Console - ESX Server Firewall Commands

59 Service Console - VSwif Commands

60 Service Console - VMkernel NIC Commands

61 Service Console - Sudoers (Super Users)

62 Service Console - Service Console Default Gateway

<< Start < Prev 1 2 Next > End >>

Top of Form

1

SRM SRA Timeout HBA Rescans- Recovered datastore is not visible to host

2

SRM 5 - IP Customization

3

SRM 5 - VM Dependencies

4

SRM 5 - Priorities and Recovery Order

1 vSphere 5 How To Part 6 Install Update Manager 5

2 VMware Update Manager Error - Session is not authenticated

3 Installing and Upgrading vSphere vCenter Update Manager 4.0 from 3.5

4 Update Manager Metadata and Update File Location

5 Update Manager (VUM) - Updating ESX Servers

Page 7: Vmware 5.1 Knowledge base doc

1 Converter PEtool - Add Network and Storage Drivers to the Cold Clone CD/ISO

2 Converter 100% Failed - ERROR: Unknown error returned by vcenter converter agent

3 Converter - File level clone failed - The filename, directory name, or volume label syntax is incorrect

4 Installing and Upgrading vSphere Converter from 3.0 to 4.0

5 P2V Conversion Plan Info Sheet

6 Pre P2V Conversion Checklist

7 Remove Old Hidden Devices from a VM after P2V Conversion

8 Converter Issue with Windows NT and Dell Perc Raid 3 / 4

9 Converter Log File Locations

10 Converter - Ports Used

Virtual machine snaphots

When you create a snapshot it takes a copy of the virtual machine config file (.vmx), and then creates the disk snapshot files.

.vmx Virtual machine configuration

.vmdk Virtual disk-flat-vmdk Disk that contains the data

The disk snapshot files are: -0000#-delta.vmdk Snapshot differences file-SnapshotName.vmsn Virtual machine configuration of a snapshot-0000#.vmsd Dictionary for snapshots and associated disk

Each time a snapshot is taken all changes to the disk are written to a differences file.

When a snapshot is deleted all the changes are commited to the original disk.

VMware HA

What is VMware HA and how does it work?

VMware HA is a feature which is available in vCenter to provide highly available virtual machines.

It allows virtual machines and the application(s) running inside them to gain a level of high availability

Page 8: Vmware 5.1 Knowledge base doc

that may otherwise have no failover option.In the event of a physical ESX/ESXi server any virtual machines running are restarted on another physical server.

You may have a legacy application running on a server that is mission critical but to make it highly available would be costly or not possible due to application limitations.By running the application inside a virtual machine and leveraging the HA feature you can ensure that virtual machine is only unavailable for a minimal amount of time.

The following is required for HA:vCenterTwo or more ESX/ESXi Servers in a HA clusterHA licensed on the ESX/ESXi Servers in the HA clusterCentral storage (typically a SAN) for the virtual machine files which is available to all ESX/ESXi Servers in the HA clusterThe same network available to all ESX/ESXi Servers in the HA cluster

VMware HA works by monitoring all ESX/ESXi servers in the HA cluster via an agent, maintaining a heartbeat.When this heartbeat is lost such as in the event of a server failure the virtual machine is started on another server. This is done automatically.Because the virtual machines files are stored on a central storage device using the VMFS clustered file system, the virtual machine files can be accessed and started on another server.

Remove Getting Started Tabs from VI Client

 After a while the "Getting Started" tabs in VI client can get a bit annoying. But dont worry you can remove them.

BEFORE:

Page 9: Vmware 5.1 Knowledge base doc

 

Go to Edit --> Client Settings.

 

In Client Settings under the Getting Started Tabs section click "Remove all tabs".

Then Click "Ok". Job done. It will remember this from now on.

VMware DRS

What is VMware DRS and how does it work?

VMware Distributed Resource Scheduler (DRS) is a feature which is available in vCenter to balance the load on ESX/ESXi Servers.

VMware DRS allocates and balances resources in a DRS cluster. It does this dynamically and continuously monitors for changes in utilization. Resource pools are used to allocate resources to a set of virtual machines in a DRS cluster. When load increases in a VM, DRS will redistribute VMs to other physical servers if required to ensure all VMs get their correct share of resources.

When a VM is powered on DRS is used to decide which server it is best to be placed on.If a VM is running and DRS decides that it needs to be placed on another physical server to ensure its requirements are met, vMotion is used.This allows the VM to be moved without powering it off or loss of service, allowing resources to be balanced

Page 10: Vmware 5.1 Knowledge base doc

 

AFTER:

Adding an ESX/ESXi host to vCenter

Adding an ESX or ESXi Server to vCenter is very simple indeed.The most important rule is to ensure that everything has DNS configured correctly and the ESX server has a DNS name.

First login to the vCenter Server.Enter the DNS name, username and password. Click Login.

Page 11: Vmware 5.1 Knowledge base doc

Once you are connected to vCenter and if this is a fresh new vCenter Server you need to create a datacenter.Right click "Hosts & Clusters" and click "Add Datacenter". Give the datacenter a name (e.g. London).Right click your datacenter "London" and click "Add Host".

The Add Host Wizard will appear. Enter the fully qualified DNS name of the ESX/ESXi Server and a username/password for the host. Click Next.

Page 12: Vmware 5.1 Knowledge base doc

It will discover an VMs running on the host the model details of the server. Click Next.

Select which datacenter to add the host to. Click Next.

Page 13: Vmware 5.1 Knowledge base doc

Review the summary and click Finish.

A task will appear "Add Standalone Host" when complete the ESX/ESXi Server will now be in your vCenter Server. You no longer need to connect VI client directly to each individual host, only vCenter.

Page 14: Vmware 5.1 Knowledge base doc

Template Guest Customization - How to Configure vCenter with Sysprep

 

For guest OS cutomization to work when deploying from a template, the vCenter server needs to have the sysprep files for that operating system to be able to customize its settings.

 

If you do not you will get the following error when deploying from a template:

Warning: Windows customization resources were not found on the server

 

Use the download links below to get the sysprep files from Microsoft and extract the contents to the correct folder within

C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\

Page 15: Vmware 5.1 Knowledge base doc

sysprep

 Sysprep 1.1 Download

C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\1.1

Copy contents of the "tools" folder to the "1.1".

Windows 2000 SP4 Download

C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\2k

Copy contents of i386\deploy.cab to "2k".

 

Windows 2003 SP2 Download

C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\svr2003

Copy contents of system32\deploy.cab to "svr2003".

Windows 2003 SP2 x64 Download

C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\svr2003-64

Copy contents of SP2QFE\deploy.cab to "svr2003-64".

Windows XP SP3 Download

C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\xp

Copy contents of CAB file to "xp".

Windows XP SP3 x64 Download

C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\xp-64

Page 16: Vmware 5.1 Knowledge base doc

Copy contents of SP2QFE\deploy.cab to "xp-64".

 

 

Note: Windows Server 2008, Windows Server 2008 R2, Windows Vista and Windows 7 use a new method for imaging which does not require sysprep files on the vCenter server.

Licensing - Unable to change license state as the license server is unavailable

So im setting up my test environment and when trying to configure the ESX server to get its license from the license server I get the following error:

"Unable to change license state as the license server is unavailable"

Along with the following log entries in /var/log/vmware/hostd-X.log

dynamicType = <unset>,licenseServer = "[email protected]",msg = ""}[2009-02-22 19:37:02.425 'EnvironmentBrowser' 21687216 info] Hw info file: /etc/vmware/hostd/hwInfo.xml[2009-02-22 19:37:02.430 'EnvironmentBrowser' 21687216 info] Config target info loaded[2009-02-22 19:37:32.021 'PropertyCollector' 98446256 warning] GetPropertyProvider failed for haTask--vim.LicenseManager.configureSource-147325[2009-02-22 19:37:32.023 'PropertyCollector' 98446256 warning] GetPropertyProvider failed for haTask--vim.LicenseManager.configureSource-147325[2009-02-22 19:38:05.421 'PropertyCollector' 21687216 warning] GetPropertyProvider failed for haTask--vim.LicenseManager.configureSource-147325[2009-02-22 19:38:05.423 'PropertyCollector' 21687216 warning] GetPropertyProvider failed for haTask--vim.LicenseManager.configureSource-147325

I did the usual checks: Ping the license server IP address (the vCenter server) Checked no firewall is blocking license server ports 27000 and 27010

Then I checked the ESX server can resolve the DNS name of the license server.

Page 17: Vmware 5.1 Knowledge base doc

I found that it could not resolve the IP of the vCenter server. This was due to the fact I had not setup the correct DNS servers in my ESX server.Because it could not resolve the DNS name to an IP it was failing its the check and essentially telling me it is not available.

Adding the correct DNS server IP into the ESX server, allowed it to resolve the IP and continue to change the license server configuration settings.

Deploying from a Template and Using Guest OS Customization

Templates can be very useful in reducing time to deploy a virtual machine and ensuring that it is built to a certain standard.

Say you have a test server that you are constantly deploying to test various senarios.Installing the OS, applications and configuring it can be very time consuming. After a while even though you have done it a thousand times you forget to do something in the right order and have to start over.This is where templates will make you sane again.

What you would do is create the perfect virtual machine:Install the OSFully patch the systemInstall applications/configure etc

Now convert this VM to a template.

Page 18: Vmware 5.1 Knowledge base doc

A task will show when this is complete (it only takes a few seconds for this change).

Switch to the "Virtual Machines And Templates" view so you can now see your template.

You will see the template has a different icon to a virtual machine.Now right click the template and select "Deploy Virtual Machine form this Template".

The Deploy Template Wizard will appear.Give the VM a suitable name and location. Click Next.

Page 19: Vmware 5.1 Knowledge base doc

Now you could either not customize the template or customize it.If you choose not to customize the VM it will have the same SID and other settings as the original VM. If you deploy several VMs from this template they will conflict with each other, but the option is there.We want to customize the VM deployed from this template so choose "Customize using the Customization Wizard". Click Next.

Now the Guest Customization Wizard appears. This will look familiar if you have used sysprep or infact install windows before.Enter the Name and Organization. Click Next.

Page 20: Vmware 5.1 Knowledge base doc

If you prefer to have VM and OS computer names the same, choose "Use the virtual machine name". Otherwise give another name for the computer. Click Next.

Enter licensing details, for servers tick the box for licensing mode (per seat/per server). Click Next.

Page 21: Vmware 5.1 Knowledge base doc

Enter the password and confirm. You can optionally auto login as administrator if you wish. Click Next.

Set the timezone. Click Next.

It is possible to run commands during the customization, if you want to do this now is the time to enter them. Click Next.

Configure the network settings. Click Next.

Page 22: Vmware 5.1 Knowledge base doc

Configure the domain/workgroup settings. Click Next.

You can also save this specification for deploying these settings without having to enter them again. Click Next.

Review guest customization settings and click Next.

Page 23: Vmware 5.1 Knowledge base doc

Review template settings and click Finish.

The VM will now be created and configured to the defined settings. It will take sometime to first copy the template and then customize the OS. During the customization process the OS will reboot several times before completing.

Page 24: Vmware 5.1 Knowledge base doc

Alarms and Email Alerts from vCenter

vCenter comes with a few default alarms such as ESX host connection state and usage alarms.These are useful but only are visible if you are logged into vCenter with VI Client.

However it can be configured so that you get email alerts when these alerts trigger between a certain status.

At the "Hosts & Clusters" level click on the "Alarms" tab.

Change the view button to "Definitions".

Choose the Alarm you want to setup and email notification for right click "Edit Settings".

In the Alarm Settings dialog go to the "Actions" tab.

Add an action to "Send a notification email" and set an email address as the value.

Tick the status changes you want to be emailed about. Click Ok.

Now when there is a status change in the defined trigger you will receive an email alert.

Note: Be sure you have set an SMTP server in the virtualcenter configuration under the administration menu.

vCenter 4 - Creating a Datacenter, HA DRS Cluster and

Page 25: Vmware 5.1 Knowledge base doc

Adding a Host One of the first things you will configure in vCenter Server is

Create a datacenter Create a HA and DRS cluster

Add an ESX/ESXi host

 

Start the vSphere client and connect to the vCenter Server.

 

Once connected right click the vCenter server hostname in the inventory,

Click "New Datacenter".

 

Give the Datacenter a name that describes its location.

 

Right click the datacenter and click "New Cluster".

Page 26: Vmware 5.1 Knowledge base doc

 

Firstly give the cluster a sensible name. This could describe the processor type, the rack that the cluster of servers will be in, its use etc.

Select "Turn on VMware HA"

Select "Turn on VMware DRS"

Click Next.

Page 27: Vmware 5.1 Knowledge base doc

 

VMware DRS will be discussed in more detail in another article.

To setup a fully automated DRS cluster choose "Fully automated" and a desired migration threshold.

Click Next.

 

VMware DRS Power Management will be discussed in more detail in another article.

Page 28: Vmware 5.1 Knowledge base doc

Choose "Off" and Click Next.

 

VMware HA will be discussed in more detail in another article.

Select "Enable Host Monitoring".

Choose to prevent or allow VMs from being powered on if it violates availability constraints in a failure.

Choose an admission control policy if preventing VMs from being powered in when resources are constrained.

Click Next.

Page 29: Vmware 5.1 Knowledge base doc

 

Choose default a restart priority (Medium in most if not all cases).

Choose a host isolation response (Shut down being the most graceful but slowest).

Click Next.

Page 30: Vmware 5.1 Knowledge base doc

 

Choose to enable VM monitoring via VMware Tools.

Select the sensitivity for monitoring.

Click Next.

Page 31: Vmware 5.1 Knowledge base doc

 

Chose "Disable EVC".

Click Next.

 

For the swapfile policy choose "Store the swapfile in the same directory as the virtual machine" (This will speed up VMotion).

Click Next.

Page 32: Vmware 5.1 Knowledge base doc

 

Review the Cluster configuration.

Click Finish.

Page 33: Vmware 5.1 Knowledge base doc

 

The HA DRS cluster is created. 

 

Right click the cluster and select "Add Host...".

 

Enter the hostname of the ESX/ESXi Server host.

Enter a username for the host (root).

Enter a password for the host.

Click Next.

Page 34: Vmware 5.1 Knowledge base doc

 

Review the host details and a list of virtual machines currently running on the host (if any).

Click Next.

Page 35: Vmware 5.1 Knowledge base doc

 

Choose where to put any existing virtual machines on the host. Either:

In the root resource pool.

A new resource pool named after the host.

Click Next.

 

Review the actions and click Finish.

Page 36: Vmware 5.1 Knowledge base doc

 

The ESX/ESXi host is added to the HA DRS Cluster including any existing virtual machines.

 

 

HA Advanced Options

These are advanced options that can be specified in the HA settings.

Most commonly used is the das.isolationaddress options below which is used to detect if an ESX/ESXi server has lost connectivity with the network. Several addresses can be checked, but dont forget to set the das.usedefaultisolationaddress to false!

 

To add advanced HA options do the following:Open the cluster settings.

Page 37: Vmware 5.1 Knowledge base doc

Click the "Advanced Options" in the HA section.Enter the attribute and the value per line.

 

das.isolationaddress# (e.g. das.isolationaddress1)

Address to ping to determine if a host is isolated from the network. If not set uses the default gateway of the service console. Upto 10 isolation addresses can be set starting with das.isolationaddress1.

das.usedefaultisolationaddressSpecifies to use the default isolation address or the addresses specified. (True or False)

das.failuredetectiontimeFailure detection time for host monitoring. The default is 15000 milliseconds

das.failuredetectionintervalHeartbeat interval for HA hosts. Default is 1000 milliseconds.

das.defaultfailoverhostThe host HA fails VMs to.

das.isolationShutdownTimeoutThe time HA waits for a VM to shut down before powering it off. Default is 300 seconds.

das.slotMemInMBThe maximum bound on the memory slot size.

das.slotCpuInMHzThe maximum bound on the CPU slot size.

das.vmMemoryMinMBMemory resource value assigned to a VM if it’s not specified or zero. Default is 0 MB.

das.vmCpuMinMHzDefault CPU resource value assigned to a VM if it’s not specified or zero. Default is 256MHz.

das.iostatsIntervalI/O stats interval for VM monitoring sensitivity. Default is 120 (seconds).

Keyboard Shortcuts for vCenter 4

 

You may or may not have noticed while using vSphere client connected to vCenter there are keyboard shortcuts.

 

These can be very handy and are worth remembering ones that are useful to you. I will list all that I can find in vCenter here, as far as I know they are not listed anywhere by VMware.

 

Page 38: Vmware 5.1 Knowledge base doc

 

 

Change Inventory Views

CTRL+SHIFT+F Search

CTRL+SHIFT+H Hosts and Clusters

CTRL+SHIFT+V VMs and Templates

CTRL+SHIFT+D Datastores

CTRL+SHIFT+N Networking

 

Navigation

ALT+HOME Go to Home Screen

ALT+LEFT Go Back Through Navigation History

ALT+RIGHT Go Forward Through Navigation History

CTRL+TAB Change Tab Forwards

CTRL+SHIFT+TAB Change Tab Backwards

 

Making New Things (Depends if your on the Datacenter, Cluster etc)

CTRL+F New Folder

CTRL+D New Datacenter

CTRL+O New Resource Pool

CTRL+H New Host

Page 39: Vmware 5.1 Knowledge base doc

CTRL+L New Cluster

CTRL+A New vApp

CTRL+N New Virtual Machine

 

Operate Virtual Machines (A VM needs to be selected)

CTRL+B Power On

CTRL+E Power Off

CTRL+Z Suspend

CTRL+T Reset

CTRL+D Shutdown Guest

CTRL+R Restart Guest

CTRL+ALT+ENTER Enter Full Screen

 

Manage Objects (These options apply to all objects)

CTRL+P Define Permissions

CTL+S Create Scheduled Task

CTL+M Add Alarm

 

Administration

CTRL+SHIFT+R Roles

CTRL+SHIFT+S Sessions

CTRL+SHIFT+L Licensing

CTRL+SHIFT+O System Logs

CTRL+SHIFT+I Server Settings

 

Page 40: Vmware 5.1 Knowledge base doc

Management

CTRL+SHIFT+T Scheduled Tasks

CTRL+SHIFT+E Events

CTRL+SHIFT+M Maps

CTRL+SHIFT+P Host Profiles

CTRL+SHIFT+U Customization Specifications Manager

vCenter Service Not Starting - Service Dependancies such as SQL Server

 

After rebooting the server running vCenter, you find you cannot log into vCenter with vSphere client. On further inspection you find the "VMware VirtualCenter Server" service is not running (even though it is set to automatic). However you can start it manually, it just will not start automatically after a reboot.

 

 

Event ID 1000 explains in the description, it could not get the configuration from the database:

Event Type: ErrorEvent Source: VMware VirtualCenter ServerEvent ID: 1000Description:The description for Event ID ( 1000 ) in Source ( VMware VirtualCenter Server ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Error getting configuration info from the database.

Page 41: Vmware 5.1 Knowledge base doc

 

Additionally you may see the following events:Event Type: ErrorEvent Source: MSSQLSERVEREvent ID: 17187Description:SQL Server is not ready to accept new client connections. Wait a few minutes before trying again. If you have access to the error log, look for the informational message that indicates that SQL Server is ready before trying to connect again. [CLIENT: <local machine>]

Event Type: ErrorEvent Source: Service Control ManagerEvent ID: 7024Description:The VMware VirtualCenter Server service terminated with service-specific error 2 (0x2).

Event Type: ErrorEvent Source: Service Control ManagerEvent ID: 7001Description:The VMware VirtualCenter Management Webservices service depends on the VMware VirtualCenter Server service which failed to start because of the following error: The service has returned a service-specific error code.

 

 

 

Page 42: Vmware 5.1 Knowledge base doc

 

This occurs if you are running the vCenter database (SQL Server) on the same server as vCenter itself.

As the server starts up it starts SQL Server, but this may take sometime. While this is taking place vCenter services try and start, in doing so attempts connecting to the SQL Server database (which is not ready) hence the event ID 17187. Finally it fails to start the service.

 

This is what is known as a race condition. vCenter is trying to start before SQL Server which it depends on. If you have your SQL Server on another server this will not be a problem.

 

Checking the service properties tab will confirm the dependancy does not exist for SQL Server.

It resolve this we need to create dependancies for the"VMware VirtualCenter Server" service for the following services:

MSSQLSERVER

ADAM_VMwareVCMSDS (If using vCenter Server 4)

 

By doing so will ensure the "VMware VirtualCenter Server" service starts after its required services have started.

Page 43: Vmware 5.1 Knowledge base doc

 

 

 

Create a Service Dependancy:

Click Start--> Run.Type "services.msc", Click Ok.

Find the services (service names) required for vCenter to start (MSSQLSERVER and ADAM_VMwareVCMSDS).

 

Click Start--> Run.Type "regedit", Click Ok.

 

Browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vpxd. Edit the "DependOnService" key and add the service names required.

Close Regedit.

 

Checking the service properties tab will confirm the dependancy is now configured.

Page 44: Vmware 5.1 Knowledge base doc

 

 

From now on when you reboot the server, the VMware VirtualCenter Server service will wait until is dependancies have started before it tries to start.

 

Insufficient Memory Resources When Powering on a VM

 

When powering on a virtual machine you may get the following error relating to resources:

"Insufficient memory resources"

 

 

This has occurred because the virtual machine has a minimum amount of memory assigned to it.

For it to be able to power on, there has to be sufficient memory available.

Aside from having enough physical memory and options for overcommitment, page sharing etc...

Page 45: Vmware 5.1 Knowledge base doc

Resource pools are a very common cause of this issue.

 

 

In this example the virtual machine is part of a resource group.

 

 Resource pools can be created with specific reservations and limits.

Here we have a resource pool with its limit set to unlimited.

However its reservation is at 0 Mhz and 0 MB with expandable reservation off.

By having it configured this was there is no resources available in the pool.

To power on the VM the resource pool needs at least enough memory the VM is configured for (in this case the VM is set to 512 MB Memory).

  

To solve this problem two different routes can be taken.

Expandable reservation can be turned on for the resource pool and this will then use the parent or root resource pool.

Configure the correct amount of resource reservation (with surplus if required) for the virtual machines that are to be powered on in the resource pool.

Page 46: Vmware 5.1 Knowledge base doc

 

   

 

After configuring the correct resources for the resource pool and hence the virtual machines within it, the virtual machine can now be powered on.

 

Error Applying Host Profile - IP address is used for multiple virtual nics

I had created a host profile from an identical server (NICs etc) and applied to a fresh install of ESX 4. However it failed for a couple of reasons half way though applying. At this point it had converted the standard virtual switch (SVS) to several DVS distributed virtual switches (DVS), and moved the pNICs as part of this. After correcting the problem I went back to continue to apply the profile to the server to complete the remaining parts (firewall etc) however I received the following error:

 

"IP Address <ip.add.re.ss> is used for multiple virtual nics" 

 

Page 47: Vmware 5.1 Knowledge base doc

 

 

 

There was little to no information about this occuring for anyone so this is what I did...

 

 

1. First remove a pNIC from a DVS (or use a spare).

2. Create a new standard virtual switch (SVS).

3. Add the pNIC (from the DVS or the spare) to the SVS.

4. Migrate the Service Console "vswif0" from the DVS to the SVS using the "Migrate to Virtual Switch" option under "Manage Virtual Adaptors" in the DVS.

 

 

Page 48: Vmware 5.1 Knowledge base doc

 

5. This should correct the problem of multiple virtual nics being defined and allow the host profile to apply correctly.

 

vCenter Server Database Retention Policy - Events and Tasks

As time goes by your vCenter database will grow, its a fact we all know and accept. However we dont want to retain unnecessary old data in the database which causes disks to eventually fill up and backups to for run longer periods. So what can we do about it? Change the vCenter database retention policy of course...

 

 

Everytime a task or event is created it is stored in the database.

For example a task is created when powering on a virtual machine.

An event would be created when something occurs such as cpu usage for a VM changing to red.

In most cases for each task an event is created, such as powering off a VM in the example below.

 

 

Fortunatley the retention period for tasks and events can be changed (individually too!) 

 

 

Page 49: Vmware 5.1 Knowledge base doc

1. In vSphere client go to (Administration --> vCenter Server Settings).

 

 

2. Check the database retention policy

Go to "Database Retention Policy".

The default retention policy is to keep tasks and event indefinatley.

 

Page 50: Vmware 5.1 Knowledge base doc

 

3. Change the retentention policy as required

PCI-DSS compliance requires logs/records to be kept for up-to 1 year.

To change this so to reduce the database size while remaining compliant, set the retention period to 365 days for both tasks and events.

Click Ok, and there you go, you have now limited the growth of the database.

 

vSphere 5 How To Part 2 Install vCenter Server 5.0

 VMware vCenter Server is "THE" management system for your VMware vSphere private cloud It's used to manage your clusters of ESXi servers, configure HA, DRS and vMotion, manage your virtual networks and their interfaces to the physical network. Its also used to provison storage (maybe even integrated with your SAN) and create virtual machines, including templates and other wonderful things.For those wanting to find out the new features specifically in vSphere and vCenter server 5 please see here.

 

Page 51: Vmware 5.1 Knowledge base doc

 

So whats the requirements for VMware vCenter server?!... Well firstly it CAN be either virtual or physical and its supported on either.The O/S since vCenter 4.x must be 64-bit, this has changed from earlier releases such as vCenter 2.5 which could be 32-bit.Also note that a 64-Bit DSN is required to access the vCenter database. 

Minimum requirements for the vCenter Server are as follows: Processor: Two 64-bit CPUs Intel or AMD x64 2.0GHz or faster (could be one dual core - the key is two logical processors at a minimum) Memory: 4GB RAMRAM requirements may be higher if your database runs on the same machine. (VMware VirtualCenter Management WebServices requires 128Mb to 1.5GB of memory which is allocated at startup) Disk storage: 5GB (Disk requirements may be higher if your database runs on the same machine) Networking: 1GB recommended (If physical team NICs for redundancy) Database: SQL Express for small deployments (5 hosts/50 VMs) or see below for supported databases.Note: If you will be running SQL Server on the same server as vCenter server (thats either express or standard/enterprise) the requirements for the above will be higher. Operating System:Windows Server 2008 (64-bit)Windows Server 2008 R2

Database:Microsoft SQL server Database Support:Microsoft SQL Server 2005 Express (Note: Microsoft SQL Server 2005 Express is intended for use with small deployments of up to 5 hosts and/or 50 virtual machines)Microsoft SQL Server 2005 Standard edition (SP3) 64 bitMicrosoft SQL Server 2005 Enterprise edition (SP3) 64 bitMicrosoft SQL Server 2008 Standard Edition 64 bitMicrosoft SQL Server 2008 Enterprise Edition 64 bit Oracle Database Support:

Page 52: Vmware 5.1 Knowledge base doc

Oracle 10g Standard edition (Release 2 [10.2.0.4])Oracle 10g Enterprise edition (Release 2 [10.2.0.4])Oracle 10g Enterprise edition (Release 2 [10.2.0.4]) 64 bitOracle 11g Standard editionOracle 11g Enterprise edition (For detailed OS and Database information please refer to the VMware vSphere Compatibility Matrix)

The following is used in this walkthrough installation of vCenter Server 5:Windows Server 2008 Standard R2 64-BitSQL Server 2008 R2 Express

 

  

1. Insert DVD or unzip "VMware-VIMSetup-all-5-xxxxxx.zip"

If it does not autorun, use "autorun.exe" in the root of the cd or folder. Click "vCenter Server" to start the installation

 

 

Page 53: Vmware 5.1 Knowledge base doc

  

 

 

 

 2. Read the the intro page and click Next.

 

 

Page 54: Vmware 5.1 Knowledge base doc

 

 3. Read the patent agreement and click Next.

 

 

 

4. Read the license agreement, accept and click Next.

 

Page 55: Vmware 5.1 Knowledge base doc

 

 

 5. Enter your customer info, username, organisation and license (optional). Click Next.

 

 

 

6. If deploying a small scale deployment (5 hosts and upto 50 VMs) you can choose to use SQL Server 2008 Express.

If using an full SQL server installation (either local or remote), create a 64-bit DSN and choose to use an existing database.

Click Next.

Page 56: Vmware 5.1 Knowledge base doc

 

 

 

7. Choose to run the vCenter service under the "SYSTEM" account or recommended user-specified account.

This can be a standard active directory account with local administrator rights on the vCenter server.

The account will be grated "Log on as a service" right on the server.

Click Next.

Page 57: Vmware 5.1 Knowledge base doc

 

 

 

8. Verify or change the installation destination folder(s).

Click Next.

 

 

 

Page 58: Vmware 5.1 Knowledge base doc

9. As this will be the first vCenter installation choose "Create a standalone VMware vCenter Server Instance".

You would create linked mode vCenter servers if you have muliple vCenter servers, most likley if you were deploying a vCenter at two different datacenters for use with Site Recovery Manager.

Click Next.

 

 

 

10. Verify the ports to use for vCenter server, change if required (I recommend keeping the defaults unless you have a very specific reason).

Click Next.

Page 59: Vmware 5.1 Knowledge base doc

 

 

 

11. Verify the ports to use for the inventory service and change if required.

Click Next.

 

 

 

12. Select your deployment inventory size to correctly size the JVM memory for vCenter

Page 60: Vmware 5.1 Knowledge base doc

server web services. 

 

 

 

13. Click Install to begin the installation.

Optionally, if this is a vCenter server for a large deployment that may power on over 2000 VMs at once (such as VMware View), Tick the box to increase the number of ephemeral ports available on the server.

 

Page 61: Vmware 5.1 Knowledge base doc

 

 

 14. vCenter server will install (make a cup of coffee).

 

 

 

 15. The installation of vCenter server will complete, Click Finish.

Page 62: Vmware 5.1 Knowledge base doc

 

 

vSphere 5 How To Part 3 Install vSphere Client 5.0

 

The vSphere Client is used to connect to and manage either ESXi servers individually, or more often to connect to a vCenter server to manage multiple ESXi servers in a single interface (or "pane of glass").

 

Its a simple but important part of a vSphere deployment, as without it you cannot manage your environment. Ok so you could if you know the vSphere CLI or PowerCLI, but my point is its the main management interface for ESXi and vCenter that you will use day-to-day.

 

Its extremley easy to install, just a simple next, next, blah and finish.

 

Page 63: Vmware 5.1 Knowledge base doc

 

 

 

 

 

 

 

 

Page 64: Vmware 5.1 Knowledge base doc

 

 

 

 

 

Page 65: Vmware 5.1 Knowledge base doc

 

 

 

 

 

 

 

Page 66: Vmware 5.1 Knowledge base doc

 

 

 

 

 

 

 

Page 67: Vmware 5.1 Knowledge base doc

 

 

 

 

Open the vSphere client in Programs --> VMware --> vSphere Client

 

Enter the IP address/FQDN of the ESXi server or vCenter Server.

 

Enter the username/password for the server (if ESXi this is "root" and for vCenter this is a Windows Account).

 

Page 69: Vmware 5.1 Knowledge base doc

(Creating a Datacenter, HA DRS Cluster and Adding a Host)

 

One of the first things you will configure in vCenter Server is

Create a datacenter Create a HA and DRS cluster

Add an ESX/ESXi host

 

 1. Start the vSphere client and connect to the vCenter Server.

 

 

2. Once connected right click the vCenter server hostname in the inventory,

Click "New Datacenter".

Page 70: Vmware 5.1 Knowledge base doc

 

 

3.Give the Datacenter a name that describes its location.

 

 

4. Right click the datacenter and click "New Cluster".

Page 71: Vmware 5.1 Knowledge base doc

 

 

5. Firstly give the cluster a sensible name. This could describe the processor type, the rack that the cluster of servers will be in, its use etc.

Select "Turn on vSphere HA"

Select "Turn on vSphere DRS"

Click Next.

Page 72: Vmware 5.1 Knowledge base doc

 

 

6. VMware DRS will be discussed in more detail in another article.

To setup a fully automated DRS cluster choose "Fully automated" and a desired migration threshold.

Click Next.

Page 73: Vmware 5.1 Knowledge base doc

 

 

 

7. VMware DRS Power Management will be discussed in more detail in another article.

Choose "Off" and Click Next.

Page 74: Vmware 5.1 Knowledge base doc

 

 

 

8. VMware HA will be discussed in more detail in another article.

Select "Enable Host Monitoring".

Choose to prevent or allow VMs from being powered on if it violates availability constraints in a failure.

Choose an admission control policy if preventing VMs from being powered in when resources are constrained.

Click Next.

Page 75: Vmware 5.1 Knowledge base doc

 

9. Choose default a restart priority (Medium in most if not all cases).

Choose a host isolation response (Shut down being the most graceful but slowest).

Click Next.

Page 76: Vmware 5.1 Knowledge base doc

 

 

 

10. Choose whether to enable VM monitoring via VMware Tools.

Select the sensitivity for monitoring if enabled.

Click Next.

11. Chose "Disable EVC".

Click Next.

Page 77: Vmware 5.1 Knowledge base doc

 

 

 

12. For the swapfile policy choose "Store the swapfile in the same directory as the virtual machine" (This will speed up VMotion).

Click Next.

Page 78: Vmware 5.1 Knowledge base doc

 

13. Review the Cluster configuration.

Click Finish.

Page 79: Vmware 5.1 Knowledge base doc

 

 

 14. Right click the cluster and select "Add Host...".

 

 

 

15. Enter the hostname/IP address of the ESX/ESXi Server host.

Enter a username for the host (root).

Enter a password for the host.

Click Next.

Page 80: Vmware 5.1 Knowledge base doc

 

16. Review the host details and a list of virtual machines currently running on the host (if any).

Click Next.

Page 81: Vmware 5.1 Knowledge base doc

 

17. If running in evaluation mode Click Next. Otherwise enter the license for the correct edition of vSphere.

 

  

18. Choose to enable Lockdown Mode.

Click Next.

Page 82: Vmware 5.1 Knowledge base doc

 

 

 

19. Choose where to put any existing virtual machines on the host. Either:

In the root resource pool.

A new resource pool named after the host.

Click Next.

Page 83: Vmware 5.1 Knowledge base doc

 

 

 

20. Review the actions and click Finish.

Page 84: Vmware 5.1 Knowledge base doc

 

 

 

21. The ESX/ESXi host is added to the HA DRS Cluster including any existing virtual machines.

 

vSphere 5 How To Part 1 Install

Page 85: Vmware 5.1 Knowledge base doc

ESXi 5.0  

Note: VMware ESX is no longer a product VMware is developing. Since vSphere 4.1 it has was mentioned that the next major release will not include ESX and a migration will be required to ESXi. So now vSphere 5 is here it is ESXi ONLY.

 

I have been deploying ESXi in all the implementations I have done since 4.1, so these VMware customers will be able to do a simple upgrade rather than a migration.

 

1. Check the server hardware you are installing ESXi 5 onto is supported and on the VMware HCL.

 

2. Login to the VMware license portal to check/upgrade/buy your vSphere licenses.

 

3. Read the ESXi Setup Guide to ensure you understand the pre-requisites.

 

4. Download the VMware ESXi 5 ISO file from the VMware download area.

 

5. Burn the ESXi 5 ISO to a CD.

6. Disconnect all Fibre Channel connections (if any) and boot the server from the CD.

7. Select "ESXi-5 Installer"

Page 86: Vmware 5.1 Knowledge base doc
Page 87: Vmware 5.1 Knowledge base doc

8. When ready to install press "Enter"

Page 88: Vmware 5.1 Knowledge base doc

9. Read and accept the license agreement, press F11 to accept.

10. Select the correct storage device to install ESXi on and press "Enter"

NOTE: ensure it is not an FC VMFS datastore!

Page 89: Vmware 5.1 Knowledge base doc

11. Select the keyboard layout and press Enter. 

Page 90: Vmware 5.1 Knowledge base doc

12. Enter a password for the "root" account. Press Enter.

13. Press F11 to start installing ESXi 5.

14. Once the installation is complete press Enter to reboot the server and boot the ESXi 5 hypervisor.

Page 91: Vmware 5.1 Knowledge base doc

15. Once the ESXi server has booted it will receive a DHCP lease (if applicable) you can now manage this with the vSphere client or continue to set a static IP for management (recommended)

Page 92: Vmware 5.1 Knowledge base doc

 

 

 

 

vSphere 5 How To Part 5 Install vSphere Web Client (Server)

 

The vSphere Web Client (Server) is provided in the download media along with vCenter.

It provides most functionality used day-to-day such as creating a VM, powering on, configuring VMs, consoles to more advanced fucntionality like memory reservations.

 

It does however lack support for plugins such as Update Manager, CapacityIQ, SRM etc. It uses Adobe Flex like the View and vCloud web interfaces, so Adobe Flash is required for the web browser.

 

 

 

1. Insert DVD or unzip "VMware-VIMSetup-all-5-xxxxxx.zip"

If it does not autorun, use "autorun.exe" in the root of the cd or folder. Click "vSphere Web Client (Server)" to start the installation 

Page 93: Vmware 5.1 Knowledge base doc

 

 

2. Select the desired language, Click Ok.

 

 

3. The installer will start, Click Next

Page 94: Vmware 5.1 Knowledge base doc

 

 

4. Read the user patent agreement, Click Next.

 

 

5. Read the license agreement, Accept it and Click Next.

Page 95: Vmware 5.1 Knowledge base doc

 

 

7. Enter user and organisation info and Click Next.

 

 

8. Verify the ports to use and change if required. Click Next.

Page 96: Vmware 5.1 Knowledge base doc

 

 

9. Ensure the correct installation folder is selected, Click Next.

 

 

10. Click Install to start the installation.

Page 97: Vmware 5.1 Knowledge base doc

 

 

 

11. The installation will complete, Click Finish.

Page 98: Vmware 5.1 Knowledge base doc

 

 

12. Browse to the vSphere Web Client Administration Tool website to configure the vCenter server it will manage.

The URL is the server you just installer the web client on and the standard port 9443 (e.g. https://localhost:9443/admin-app/)

13. Click "Register vCenter Server"

Page 99: Vmware 5.1 Knowledge base doc

 

 

14. Enter the connection information for the vCenter server that will be managed from the web client server.

vCenter Server IP/FQDN

Username/Password

15. Click Register

Page 100: Vmware 5.1 Knowledge base doc

 

 

16. Accept the certificate warning by ticking "install the certificate.." and Ignore.

Page 101: Vmware 5.1 Knowledge base doc

 

 

17. The vCenter Server will now show in the list of vCenter servers, confirming it was added successfully.

Page 102: Vmware 5.1 Knowledge base doc

 

 

18. Now browse to the the web client URL (e.g. https://f.q.d.n:9443/)

Login with credentials that have permissions to access the vCenter server.

Page 103: Vmware 5.1 Knowledge base doc

 

 

 

19. The vSphere Web Client will authenticate and the inventory of the vCenter server will be displayed.

From here you can manage "your cloud" via the web browser securley over https.

Page 104: Vmware 5.1 Knowledge base doc

 

vSphere 5 How To Part 6 Install Update Manager 5

 

With vSphere 5 there is also an updated Update Manager. This is pretty much the same Update Manager we are familiar with in VUM4 but there is one suprise, or shock another might say?!

Update Manager 5 no longer provides updates to the guest OS (Windows and Linux) as in previous releases.You will need to use something such as WSUS or System Center for Windows and setup your own update repo for Linux.

It does still provide updates for hosts, including upgrading from ESX/ESXi 4 to ESXi 5.

You cannot upgrade from ESX/ESXi 3.x to ESXi 5 (as one would expect).

 

1. Insert DVD or unzip "VMware-VIMSetup-all-5-xxxxxx.zip"

If it does not autorun, use "autorun.exe" in the root of the cd or folder. Click "vSphere Update Manager" to start the installation

Page 105: Vmware 5.1 Knowledge base doc

 

 

 

2. Select the desired language, Click Ok.

 

 

3. The installation wizard will start, Click Next.

Page 106: Vmware 5.1 Knowledge base doc

 

 

 

4. Read User Patent Agreement, Click Next.

 

 

Page 107: Vmware 5.1 Knowledge base doc

 

5. Read and accept the license agreement, Click Next.

 

 

 

6. Heres the suprise, or shock?!

Update Manager 5 no longer provides updates to the guest OS (Windows and Linux) as in previous releases.You will need to use something such as WSUS or System Center for Windows and setup your own update repo for Linux.

It does still provide updates for hosts, including upgrading from ESX/ESXi 4 to ESXi 5.

You cannot upgrade from ESX/ESXi 3.x to ESXi 5 (as one would expect).

 

7. Tick the box to download update immediatley. Click Next.

Page 108: Vmware 5.1 Knowledge base doc

 

 

 

8. Enter the infromation for the vCenter server.

 

 

 

Page 109: Vmware 5.1 Knowledge base doc

9. If deploying a small scale deployment you can choose to use SQL Server 2008 R2 Express.

If using an full SQL server installation (either local or remote), create a DSN and choose to use an existing database.

Click Next.

 

 

 

10. Select the FQDN of the vCenter server for the connection settings. Verify or change the ports if required.

Page 110: Vmware 5.1 Knowledge base doc

 

 

 

11. Verify the installation destination is correct. Alternativley the updates and patches can be stored in a seperate folder or disk.

 

Page 111: Vmware 5.1 Knowledge base doc

 

 

 

 

12. The installation will complete. Click Finish.

Page 112: Vmware 5.1 Knowledge base doc

 

 

 

13. Login to the vCenter Server with the vSphere client and click "Plug-ins" and then "Manage Plug-ins.."

 

 

 

14. You will now see a new available plug-in aptly named "VMware vSphere Update Manager"

Click Download and Install.

 

Page 113: Vmware 5.1 Knowledge base doc

 

 

 15. Select your lanaguage.

 

 

 

 16. The installation of the vSphere plug-in will start. Click Next.

Page 114: Vmware 5.1 Knowledge base doc

 

 

 

17. When the installation completes Click Finish.

Page 115: Vmware 5.1 Knowledge base doc

 

 

 

18. The plug-in will now show with a status of enabled.

 

 

Page 116: Vmware 5.1 Knowledge base doc

 

19. Finally an button named "Update Manager" will appear in the Home Screen of the vSphere client when connected to the vCenter Server.

It is from here the admin settings for Update Manager can be found to configure baselines etc. This will be covered in another article.

 

Page 117: Vmware 5.1 Knowledge base doc

Compare vSphere with Operations Management Editions

 

 

Page 118: Vmware 5.1 Knowledge base doc

vCenter Server 5 Install/Upgrade Warning - The Fully Qualified Domain Name cannot be resolved

Whilst performing clean installaions and upgrades of vCenter Server 5, I have come across the following warning message on a number of occasions.

"The Fully Qualified Domain Name cannot be resolved. If you continue the installation, some features might not work correctly."

 

The vCenter server installer is performing a reverse DNS lookup and confirming if there is an entry for the server. In this case it has failed.

All you need to do is first confirm if infact a reverse lookup zone exists on the DNS server. This most likley will be on an Active Directory Domain Controller and replicated too all other DCs in the domain/forest. So a single point of config can add this for all DNS servers if there are more than one.

 

Page 119: Vmware 5.1 Knowledge base doc

 

 

Go to your DNS server and add a new reverse lookup zone for the IP range that the server exists in. You will notice your server still does not appear in the reverse lookup zone.

 

 

 

Next we need to request the server to register its adaptors in DNS updating the records already held

Page 120: Vmware 5.1 Knowledge base doc

and not - in this case our reverse lookup zone record.

 

ipconfig /registerdns

 

Refreshing the DNS Manager console will now show the pointer record for this server in its reverse lookup zone.

 

Page 121: Vmware 5.1 Knowledge base doc

 

 

Pressing backing the back button then next again will confirm this issue is now resolved. If the reverse lookup was still not working correctly this test would fail again and the warning dialog would be shown again.

Happily now continue the installation/upgrade....

 

Page 122: Vmware 5.1 Knowledge base doc

Upgrade vCenter Server 4.1 to 5.0

 

As was the case with vCenter Server 4.1, vCenter Server 5.0 also only supports being installed on a 64 bit OS.

If you are currently running vCenter 4.0 on a 32-bit OS you cannot upgrade. You must create a new server (physical or virtual) with a supported 64-bit OS and either start with a clean installation and database or migrate your installation and database to a new 64-bit OS server and then perform the upgrade.

 

 

Before upgrading you should backup both the database and the SSL certificates in C:\ProgramData\VMware\VMware VirtualCenter\SSL\

Also confirm if using anything else such as View, Site Recovery Manager or vCloud their version is compatible with vCenter 5.0

 

You may need to upgrade for example View 4.6 to View 5.0 BEFORE you upgrade to vCenter 5.0

Check the VMware Product Interoperabilty Matrices

 

 

 

Page 123: Vmware 5.1 Knowledge base doc

1. Insert DVD or unzip "VMware-VIMSetup-all-5-xxxxxx.zip"

If it does not autorun, use "autorun.exe" in the root of the cd or folder. Click "vCenter Server" to start the installation

 

 

 

Page 124: Vmware 5.1 Knowledge base doc

 

  

 2. Note the vCenter installer will detect that an existing version of vCenter is installed and this wil be an upgrade.

Click Next. 

 

Page 125: Vmware 5.1 Knowledge base doc

 

 

3. Read the license agreement, accept and click Next.

 

 

 4. Enter your customer info, username, organisation and license (optional). Click Next.

 

 

Page 126: Vmware 5.1 Knowledge base doc

 

5. Note the previous vCenter license key is not valid for v5.0 and so you will need to agree to the license upgrade in the VMware licensing portal and apply the new vCenter 5.0 license key.

 

6. If required enter the database credentials. 

 

 

 

7. Additionally also note that the Update Manager plugin for vCenter will be out of date and incompatible with vCenter 5 (you will update VUM after this).

Page 127: Vmware 5.1 Knowledge base doc

 

 

 

8. Here is the most important part...

HAVE YOU BACKED UP YOUR VCENTER DATABASE?

HAVE YOU BACKED UP THE SSL CERTIFICATES?

 

If you have not got a backup then its your own fault if the upgrade fails and you cannot restore your vCenter server database!

 

Page 128: Vmware 5.1 Knowledge base doc

 

 

9. Select "Automatic" to upgrade the vCenter agent on all the hosts.

 

 

 

10. Ensure the service account details are correct.

 

Page 129: Vmware 5.1 Knowledge base doc

 

 

11.  I have found the following message is displayed if the vCenter server cannot perform a reverse DNS lookup of itself.

If you find this message please follow the details here.. vCenter Server 5 Install/Upgrade Warning - The Fully Qualified Domain Name cannot be resolved

 

 

 

12. Verify the installation destination folders.

 

Page 130: Vmware 5.1 Knowledge base doc

 

 

13. Verify the ports to use for vCenter and its services (only change if absolutley neccersary).

 

 

 

Page 131: Vmware 5.1 Knowledge base doc

14. Verify the port numbers to use for the inventory service.

 

 

 

15. Based in your deployment size (or intended final size - hint) select the memory size for JVM.

 

Page 132: Vmware 5.1 Knowledge base doc

 

 

16. The installation is ready to proceed.

In the case of a large VM deployment that requires more than 2,000 VMs to be powered on at the same time (such as a View deployment - hint), tick the box to increased the number of ephemeral ports.

 

 

 

17. The vCenter server upgrade will complete successfully, and there you have it!

Now update/install the vSphere client 5.0 so you can connect to it...

 

Page 133: Vmware 5.1 Knowledge base doc

 

 

 

 

vSphere 5.1 - Part 2 - vCenter Single Sign On (SSO) Install

 

And here it is... the bit that will go wrong with your vSphere installation - vCenter Single Sign On!

Now when this was initially released there were several problems, seemingly due to installation bugs with SSO, most of these appear to have been resolved according to the release notes and installations I've performed since, however there are some caveats that if you do not pay attention to, will cause you an issue during the install.

 

First thing to note when running the vSphere 5.1 installer and you get the below bunch of install options (see first image), DON'T go for the "Simple Install", firstly my experience is this does not work everytime, secondly if one of the components do have a problem (usually SSO) you can work on the problems with that component.

 

Before we get ahead of ourselves, you might be asking what is the Single Sign On thing?!

"vCenter Single Sign On (SSO) is a component of the VMware Cloud Suite. SSO deals with identity management for administrators and applications that interact with the vSphere platform.

SSO is based on identity management technology built by RSA and specifically tailored for VMware

Page 134: Vmware 5.1 Knowledge base doc

Cloud Infrastructure deployment."

 

In english what this means is that previously when you logged into vCenter via vSphere Client you authenticated directly with Active Directory.

However now when vSphere Client connects to vCenter, it's authenticating via vCenter SSO. Which in turn has your AD as an authentication method.

As the environment expands what VMware are trying to do is use SSO for authenticating all their products, so of course we have the vSphere Web Client now and vCloud, all use SSO.

 

If you have any more questions on this it's best looking at the vCenter Single Sign On FAQ

 

Now then next thing you might be thinking is where do I install this, do I need another server for SSO?

No SSO, vCenter, vSphere Client, vSphere Web Client and vSphere Update Manager can all be installed on a single server (and in most cases it is).

If you want you can also install each one on it's own dedicated server.

 

Here we will be installing all the components on the one server.

 

1. Insert DVD or unzip "VMware-VIMSetup-all-5.1.0-xxxxxx.zip"

If it does not autorun, use "autorun.exe" in the root of the cd or folder. Click "vCenter Server" to start the installation.

 

2. Click "vCenter Single Sign On"

Note: DON'T go for the "Simple Install"

  

Page 135: Vmware 5.1 Knowledge base doc

 

 

3. The vCenter Single Sign On installation wizard will start. Good luck! Click Next. 

Page 136: Vmware 5.1 Knowledge base doc

 

 

 4. Read the license, agree and Click Next.

 

 

Page 137: Vmware 5.1 Knowledge base doc

 5. Select "Create the primary node for a new vCenter Single Sign On installation"

 

 

 6. Select "Install basic vCenter Single Sign On" 

 

Page 138: Vmware 5.1 Knowledge base doc

 

7. Enter a password for the vCenter SSO administrator account

Note: See this as a local user in the SSO database, it's not a local windows user or AD user.

If all the windows auth stops working you can still login with this "admin@System-Domain" user so make sure you remember you keep this safe.

 

 

8. You can use SQL express or a full SQL server, select your required database option.

Here I will use a full SQL server running on another server.

 

Page 139: Vmware 5.1 Knowledge base doc

  

Very Important Note:

If you are using a full SQL server for vCenter SSO, you need to create the database beforehand.

However it's not that strightforward, you cannot just right click create new database as SSO requires some specifically named DATA and INDEX tablespaces.

If you ignore this your installation will fail.

 

9. Use the below SQL script to create your SQL databases with the correct filegroups (RSA_DATA and RSA_INDEX) changing the DB name and filepaths only:

 

-- PROJECT     IMS

-- MODEL       IDENTITY MANAGEMENT SERVICE

-- COMPANY     RSA, the Security Division of EMC

-- DATABASE   MSSQL

 

USE MASTER

Page 140: Vmware 5.1 Knowledge base doc

GO

 

-------------------------------------------------------------------------------------

-- Create database

--

-- Using this script is not mandatory. The database can be created with

-- SQL Management Studio, ensuring that there are two tablespaces, named RSA_DATA

-- and RSA_INDEX, and that there are only alphanumeric characters in the database name.

--

-- Before running this script, customize the file paths (CHANGE ME) below.

-- 1. Decide on a folder to hold the database files (10 GB of space required).

-- For example, it can be the DATA folder of the SQL Server, usually

-- C:\Program Files\Microsoft SQL Server\MSSQL10_50.<instance name>\MSSQL\DATA

-- 2. Replace all 3 occurrences of C:\CHANGE ME with the path to the folder

 

-- The database name can also be customized, but cannot contain

-- reserved keywords like database or any characters other than letters, numbers,

-- _, @ and #.

 

-- Advanced users can put the different files (RSA_DATA, RSA_INDEX and LOG)

-- on different storage devices to improve performance. RSA_INDEX is a small file which

Page 141: Vmware 5.1 Knowledge base doc

-- is recommended to be stored on a fast device.

-- For more details, please refer to Microsoft documentation at http://technet.microsoft.com/en-us/library/ms143547.aspx

-------------------------------------------------------------------------------------

CREATE DATABASE "VMware-SSO" ON PRIMARY(

   NAME='RSA_DATA',

   FILENAME='E:\MSSQL\DATA\VMware-SSO-RSA_DATA.mdf',

   SIZE=10MB,

   MAXSIZE=UNLIMITED,

   FILEGROWTH=10%),

FILEGROUP RSA_INDEX(

   NAME='RSA_INDEX',

   FILENAME='E:\MSSQL\DATA\VMware-SSO-RSA_INDEX.mdf',

   SIZE=10MB,

   MAXSIZE=UNLIMITED,

   FILEGROWTH=10%)

LOG ON(

   NAME='translog',

   FILENAME='F:\MSSQL\Data\VMware-SSO-translog.ldf',

   SIZE=10MB,

   MAXSIZE=UNLIMITED,

   FILEGROWTH=10% )

GO

 

-- Set recommended performance settings on the database

Page 142: Vmware 5.1 Knowledge base doc

ALTER DATABASE [VMware-SSO] SET AUTO_SHRINK ON

GO

ALTER DATABASE [VMware-SSO] SET RECOVERY SIMPLE

GO

 

CHECKPOINT

GO

 

-------------------------------------------------------------------------------------

-- To drop the database, the command is:

-------------------------------------------------------------------------------------

-- DROP DATABASE VMware-SSO

 

 

 

10. You also need to create a SQL user that has "db owner" privileges on this SSO database.

Very Important Note:

Don't use any special characters in the username or password for this SSO SQL user otherwise the installation WILL fail.

That's nothing such as @ !&^%$£>< etc etc

For example "Password1" will work "P@ssword1" will not.

 

 

11. Enter your database server information, IP, username etc.

 

Page 143: Vmware 5.1 Knowledge base doc

 

 

12. Enter the FQDN of the SSO server. 

 

 

Page 144: Vmware 5.1 Knowledge base doc

 

13. Enter the account details SSO will run under. Tick to use Network Service. 

 

 

 

14. Set the installation folder 

 

Page 145: Vmware 5.1 Knowledge base doc

 

 

15. Leave the SSO HTTPS port as 7444 (default).

 

 

Page 146: Vmware 5.1 Knowledge base doc

 

16. Now click "Install" and let the installer run. If you get any errors check VMware's KB.

Most errors I've ever got installing this are due to incorrect database settings and the username/password containing special characters (which breaks it).

 

 

 

17. Once this has installed you should see the vCenter SSO service in services.msc

18. We now continue onto the next installation step.. vCenter Inventory Service..

 

vSphere 5.1 - Part 3 - vCenter Inventory Service Install

Welcome to Part 3 of our vSphere 5.1 installation.

Next up is the vCenter Inventory Service, another new install? No, infact the inventory service has been around for quite sometime. It was just installed with vCenter Server previously, now you can install it on it's own dedicated server if you wanted to.

 

So what does the vCenter Inventory Service actually do? Well it simply stores the inventory data of all the linked vCenters so you can search accross all the vCenters for various objects such as a VM.

Page 147: Vmware 5.1 Knowledge base doc

This is stored in Active Directory LDS (formely known as ADAM).

 

There is not much more to say about this other than to get on with installing it..

 

1. Kick off the installer for vCenter Inventory Service and Click Next.

 

2. Read and Accept the license agreement. Click Next.

 

Page 148: Vmware 5.1 Knowledge base doc

 

 

3. Change your installation path as required. Click Next. 

 

4. Enter the FQDN for the inventory service.

(e.g. vcenter1.vmadmin.local) it's hidden here as it's a customer install! 

Page 149: Vmware 5.1 Knowledge base doc

 

 

5. Keep the ports as their defaults. Click Next. 

 

 

6. Select the appropriate JVM memory size for your expected end goal deployment size.

 

Page 150: Vmware 5.1 Knowledge base doc

 

 

7. Enter your Single Sign On (SSO) username/password and lookup service URL:

e.g.

admin@system-domain

P@sword1

https://vcenter1.vmadmin.local:7444/lookupservice/sdk

 

Page 151: Vmware 5.1 Knowledge base doc

8. The installer will generate and install a self-signed SSL cert. Click Install Certificates.

 

9. Click install

 

 

10. And after a few short moments the vCenter Inventory Service will complete installing. Very simple, now onto the vCenter Server install in the next part...

Page 152: Vmware 5.1 Knowledge base doc

 

 

 

VMware vSphere 5.1 Release Announced

VMware have announced their latest release of vSphere, which will soon be released for GA as vSphere 5.1.

vSphere 5.1 brings a number intresting changes from my point of view, both technically and license wise.

 

 

As you may remember the release of vSphere 5.0 brought a much debated change to licensing, which was vRAM entitlement.

It still remained per processor licensing but depending on the about of vRAM configured per VM would affect if you needed to by addition processor licenses to run those VMs, or even upgrade to the next edition up (say standard to enterprise) even though the customer did not need those features, it was more "cost effective".

 

I've spoken with many VMware partners can customers who found this a big issue for them and a few even went down the hyper-v route purley based on cost. I could problably rant for a while on this, especially regards to quotes teams quoting but not knowing VM requirements so how can they quote the right licenses.

Page 153: Vmware 5.1 Knowledge base doc

 

In vSphere 5.1 VMware have done something I commend them for and thats remove vRAM entitlments from their vSphere licensing model. Thats right! No more limits of vRAM per CPU licenses - gone! Back to how it was!

 

 

Additionally in regards to technical improvements, new features and changes we have the following:

 

vSphere Web Client is now the core administrative interface for vSphere!!! Wow! This new flexible, robust interface simplifies vSphere control through shortcut navigation, custom tagging, enhanced scalability, and the ability to manage from anywhere with Internet Explorer or Firefox-enabled devices. Update manager however does not work via this (so back to the vSphere client for that).

 

Even larger virtual machines (monster monster VMs), upto 64 vCPUs per VM and 1 TB of vRAM. Standard edition is 8 vCPUs, Enterprise 32 vCPUs and Enterprise Plus 64 vCPUs - simply huge!

 

New virtual machine v9 format, which brings the support for larger virtual machines, CPU performance counters and virtual shared graphics acceleration designed for enhanced performance.

 

vSphere Distributed Switch, Enhancements such as Network Health Check, Configuration Backup and Restore, Roll Back and Recovery, and Link Aggregation Control Protocol support and deliver more enterprise-class networking functionality and a more robust foundation for cloud computing.

 

Single-root I/O virtualization (SR-IOV) support, Support for SR-IOV optimizes performance for sophisticated applications.

 

vMotion, vMotion (zero-downtime migration) without the need for shared storage configurations. This new vMotion capability applies to the entire network.

 

vSphere Data Protection, Simple and cost effective backup and recovery for virtual machines. vSphere Data Protection is a newly architected solution based EMC Avamar technology that allows admins to back up virtual machine data to disk without the need of agents and with built-in deduplication. This feature replaces the vSphere Data Recovery product available with previous releases of vSphere.

Page 154: Vmware 5.1 Knowledge base doc

 

vSphere Replication, enables efficient array-agnostic replication of virtual machine data over the LAN or WAN. vSphere Replication simplifies management enabling replication at the virtual machine level and enables RPOs as low as 15 minutes.

 

Zero-downtime upgrade for VMware Tools, After you upgrade to the VMware Tools available with version 5.1, no reboots will be required for subsequent VMware Tools upgrades (for Vista/2008 upwards)

 

vSphere Storage DRS and Profile-Driven Storage, integration with VMware vCloud Director enables further storage efficiencies and automation in a private cloud environment.

Host Profile - HA DRS Cluster Non Compliant - FT logging is not enabled

 

Compliance of a cluster is checked based on various factors, depending on if you have HA enabled, DRS enabled or both!

 

HA and DRS FT logging NIC speed is at least 1000 Mbps. At least one shared datastore exists.

FT logging is enabled.

VMotion NIC speed is at least 1000 Mbps.

All the hosts in the cluster have the same build for Fault Tolerance.

The host hardware supports Fault Tolerance.

VMotion is enabled.

DRS only

VMotion NIC speed is at least 1000 Mbps. VMotion is enabled.

At least one shared datastore exists. 

HA only

FT logging NIC speed is at least 1000 Mbps.

Page 155: Vmware 5.1 Knowledge base doc

At least one shared datastore exists.

FT logging is enabled.

VMotion NIC speed is at least 1000 Mbps.

All the hosts in the cluster have the same build for Fault Tolerance.

The host hardware supports Fault Tolerance.

VMotion is enabled.

 

 

The most common problem is that when HA is enabled on a cluster (with or without DRS enabled) one requirement is "FT logging is enabled".

FT (Fault Tolerance) is not that widely used so the chance you set this up is unlikley (and is not require for HA to work) so this is a bit a false check as we might not want FT!

 

To disable the checking of FT for the cluster complance check this is simply and advanced option in the HA settings..

 

1. Simply right-click Edit Settings on your cluster

 

2. Select vSphere HA and click the "Advanced Options" button

 

3. Enter the option "das.includeFTcomplianceChecks" and a value of "false".

 

4. Click Ok, Ok.

 

5. Rescan you cluster for compiance and hey presto! 

 

 

Page 156: Vmware 5.1 Knowledge base doc

 

 

 

Host Profile Issue with local SAS drives - Specification state absent from host

There are numerous reasons to use vSphere host profiles, namely to ensure all your ESXi hosts within a cluster are configured identically.

Storage of course is an important part of this, as we need to ensure all hosts can see the same

Page 157: Vmware 5.1 Knowledge base doc

datastores, the same pathing policy configured etc.

If not we want an alert to tell us this so we can correct - even perhaps automagically with host profiles!

 

However local SAS drives within the ESXi server can be detected as remote storage devices, which as you can imagine can cause an issue with this compliance checking.

If this is the case the local SAS drive "naa.xxxxx ID" needs to be presented to each ESXi server to tick the compliance box, but thats not possible as it's a local disk.

 

 

In such case you wll come across the following errors in your host profile checks. Attempting to remediate will not resolve the problem.

 

Specification state absent from host: device '<datastore>' state needs to be set to 'on' Host state doesn't match specification: device '<datastore>' needs to be reset

Specification state absent from host: device '<datastore>' Path Selection Policy needs to be set to 'VMW_PSP_FIXED'

Host state doesn't match specification: device '<datastore>' Path Selection Policy needs to be set to default for claiming SATP

 

 

 

To my knowledge there is no way of getting the local SAS to disk not show as remote storage so all you can do is disable this part of the check in the host profile.

 

Page 158: Vmware 5.1 Knowledge base doc

1. In vSphere client under Home --> Host Profiles select Enable/Disable Profile configuration.

 

2. As in the image below, go to Storage Configuration

 

3. Native Multi-pathing (NMP) --> PSP and SATP confiugration for NMP policies, untick "PSP configuration for"

 

4. Pluggable Storage Architecture (PSA) configuration --> PSP and SATP confiugration for NMP policies, untick "PSA device configuration" 

 

5. Click Ok and Rescan your cluster for compliance

 

6. Your cluster should now be complaint remove the 4 device naa device compliance issues.

 

 

 

Page 159: Vmware 5.1 Knowledge base doc

Install an update/patch on ESXi Standalone without Update Manager using esxcli

 

1. Use vSphere Client to connect to your ESXi host (or vCenter server)

 

2. Browse a VMFS datastore (e.g. the local ESXi VMFS datastore if it has one)

 

3. Upload your VMware ESXi update/patch (.zip file) to the VMFS datastore

 

4. Put your host in maintenance mode (VMs will need to be powered off or vMotioned to other hosts if in a cluster)

 

5. SSH to the ESXi server and login as "root".

Note: You may need to start the SSH service (under Configuration --> Security Profile)

 

6. Install the update with esxcli:

esxcli software vib install --depot=/vmfs/volumes/50bf1ff8-dd8a5bd5-5fc0-00145edc9454/ESXi500-201207001.zip

 

Page 160: Vmware 5.1 Knowledge base doc

 

 7. Reboot the ESXi server

reboot

 

8. Exit maintenance mode

 

9. Power on and/or vMotion the VMs back (if DRS is not enabled).

 

10. Job done!

 

~ # ls /vmfs/volumes/50ab7d53-c6c64e41-01a5-001a64239fda

ESXi500-201207001.zip

  

~ # esxcli software vib list

~ # esxcli software vib update -d=/vmfs/volumes/50ab7d53-c6c64e41-01a5-001a64239fda/ESXi500-201207001.zip

Access to resource settings on the host is restricted to

Page 161: Vmware 5.1 Knowledge base doc

the server that is managing it I recently came across a nice annoying error on an ESXi 5.1 server:

 

"Access to resource settings on the host is restricted to the server that is managing it: x.x.x.x"

 

 

 

I was given this error while connected directly to an ESXi server with vSphere client, attempting to resize a virtual disk on a VM (to add more capacity).

However as this ESXi server and its virtual machines was managed by vCenter server, it would not let me modify its "resource settings" i.e. its disk size.

 

I figured out a way to remove the host from thinking it was connected to vCenter (as in my case it wasnt - it had not been disconnected from vCenter before someone deleted it)!. This is probably not supported by VMware and I do not support it but it worked for me.

 

1. Connect to the ESXi server either on the console or via SSH

 

2. Edit /etc/vmware/vpxa/vpxa.cfg

vi /etc/vmware/vpxa/vpxa.cfg

Remove the whole vpxa section including <vpxa> and </vpxa> "d"

Save it ":wq!!

3. Restart the services

/sbin/services.sh restart

4. Connect back to the ESXi server with vSphere client and it should now let you make the changes

Page 162: Vmware 5.1 Knowledge base doc

How to Migrate ESX 4.x to ESXi 5.0

 

Unlike prior versions, vSphere 5 supports only the ESXi hypervisor architecture, the only thin purpose-built hypervisor that does not depend on a general purpose operating system. If you are currently running ESX 4.x you must migrate to ESXi 5, in order to benefit from the unique capabilities and features of vSphere 5 and ESXi 5.

 

 

Like its predecessor ESX, ESXi is a "bare-metal" hypervisor, meaning it installs directly on top of the physical server and partitions it into multiple virtual machines that can run simultaneously, sharing the physical resources of the underlying server. VMware introduced ESXi in 2007 to deliver industry-leading performance and scalability while setting a new bar for reliability, security and hypervisor management efficiency.

 

So how is ESXi different from ESX? While both architectures use the same kernel to deliver virtualization capabilities, the ESX architecture also contained a Linux OS called the "Service Console," that is used to perform local management tasks such as executing scripts or installing third party agents. The Service Console has been removed from ESXi, drastically reducing the hypervisor code-base footprint (less than 150MB vs. ESX's 2GB) and completing the ongoing trend of migrating management functionality from the local command line interface to remote management tools.

 

Previous releases of ESXi such as ESXi 4.1 did not provide a way to migrate from ESX to ESXi. However now with ESXi 5 you can upgrade/migrate from a previous release of ESX 4.x to ESXi 5.

There a number of ways this can be achieved:

Local upgrade from CD VMware Update Manager

Scripted

 

Here I will show you how to upgrade ESX 4.1 to ESXi 5.0 via a CD locally at the console of the server. This perhaps would b the best option for a very small vSphere deployment where you have access to the datacenter the servers are based in.

 

Pre-Requisites:

Check the server hardware you are installing ESXi 5 onto is supported and on the VMware HCL.

Login to the VMware license portal to check/upgrade/buy your vSphere licenses.

Page 163: Vmware 5.1 Knowledge base doc

Read the ESXi Setup Guide to ensure you understand the pre-requisites.

Download the VMware ESXi 5 ISO file from the VMware download area.

Burn the ESXi 5 ISO to a CD.

Disconnect all Fibre Channel connections (if any) and boot the server from the CD.

 

 

1. First make sure you upgrade the vCenter server, you cannot connect an ESXi server to a vCenter 4.1 U1 server (or earlier).

 

2. Put the host(s) you want to upgrade into maintenance mode, vMotion VMs to other hosts or shutdown VMs are required).

 

3. Reboot the server and boot from the VMware ESXi 5.0 installation CD media.

 

4. Select "ESXi-5.0.0-xxxxx-standard Installer"

 

 

 

5. Press "Enter"

Page 164: Vmware 5.1 Knowledge base doc

 

 

 

6. Read and accept the license agreement. Press "F11"

 

 

 

Page 165: Vmware 5.1 Knowledge base doc

7. Select the disk to upgrade to ESXi. Ensure this is not a shared VMFS datastore on a SAN (you should have unplugged the FC connections). Press "Enter".

 

 

 8. Here are the upgrade/migrate options:

Force Migrate ESX, preserve VMFS datastore

Install ESXi, preserve VMFS datastore

Install ESXi, overwrite VMFS datastore

 

If you are migrating note only some of the settings are migrated over. A full list of the files/settings migrated can be found in the upgrade guide.

 

Page 166: Vmware 5.1 Knowledge base doc

 

 

9. Note you will get a warning about any 3rd party software installed that cannot be migrated. In this case it is a network and scsi driver, verify this will not pose an issue once migrated.

Press "Enter"

 

Page 167: Vmware 5.1 Knowledge base doc

 

 

10. Press "F11" to force the migration and preserve the VMFS datastore.

 

Page 168: Vmware 5.1 Knowledge base doc

 

 

11. The migration will start.

 

 

Page 169: Vmware 5.1 Knowledge base doc

 

12. Once the migration has completed press "Enter" to reboot what is now an ESXi server :-)

 

 

 

13. The ESXi server will reboot preserving its management IP to reconnect to your vCenter 5 server.

 

Page 170: Vmware 5.1 Knowledge base doc

 

 

 

 

 

 

Creating/Adding a Raw Device Mapping (RDM) to a Virtual Machine

 

A Raw Disk Mapping (RDM) can be used to present a LUN directly to a virtual machine from a SAN. Rather than creating a virtual disk (VMDK) on a LUN, which is generally shared with other VMs and virtual disks.

 

The reasons for doing this should purley be for functional and management reasons, NOT performance. There is a mis-understanding that RDMs offer greater performance compared to VMDK's on a VMFS datastore. I've seen lots of vSphere environments that have gone over kill on RDMs for SQL servers and the like for "performance reasons", its difficult to manage! If your looking for improved storage performance look into the VMware Paravirtual SCSI (PVSCSI) adaptor.

 

 

The main reason for using an RDM should be as follows:

Page 171: Vmware 5.1 Knowledge base doc

To utilize native SAN tools and commands If using Microsoft Cluster Services (MSCS), Failover Clusters or other clustering solution

 

LUNs presented from FC, FCoE and iSCSI are supported for RDMs.

 

There are two RDM modes to be aware of:

Virtual compatability mode provides vSphere snapshots of this virtual disk. Physical compatability mode allows the VM to pass SCSI commands direct to the

storage system LUN. This allows it to leverage SAN specific features such as interation with the SANs own snapshot functions.

 

 

 

 

1. The first step to adding a RDM to a virtual machine is to assign an unused LUN to your ESXi Servers. This will vary depending on the type of SAN in use (consult the SAN vendors documentation on how to do this).

 

2. For the new LUN to become available, Rescan the HBAs on all your ESXi servers.

 

Page 172: Vmware 5.1 Knowledge base doc

 

3. The virtual machine that the RDM is going to be added to needs to be shut down first, the RDM cannot be added while it is running.

 

4. On the hardware tab, click "Add" and choose "Hard Disk".

 

5. For the disk type choose "Raw Device Mapping" (RDM). Click Next.

Page 173: Vmware 5.1 Knowledge base doc

6. Choose the LUN. Click Next.

 

 

Page 174: Vmware 5.1 Knowledge base doc

7. Choose "Store with virtual machine" or if you want store the link to the RDM in a specific datastore. Click Next.

8. RDM volumes can be created in either "Physical" or "Virtual" compatability mode:

Virtual compatability mode provides vSphere snapshots of this virtual disk.

Physical compatability mode allows the VM to pass SCSI commands direct to the storage system LUN. This allows it to leverage SAN specific features such as interation with the SANs own snapshot functions.

 

 

Page 175: Vmware 5.1 Knowledge base doc

9. The RDM must be located on a seperate SCSI controller.

Choose a Virtual Device Node that is on a different SCSI bus to the current virtual disks (e.g. SCSI 1:0).

Click next.

 

 

10. Confirm settings and choose finish.

Page 176: Vmware 5.1 Knowledge base doc

 

 

 

11. A new SCSI controller and hard disk is added to the virtual machine configuration. Now boot your VM. Depending on the OS check for new disks and format/mount the disk.

 

 

 

Host currently has no management network redundancy

Page 177: Vmware 5.1 Knowledge base doc

When admitting a host to a HA cluster, or enabling HA on an existing cluster you may receive the "Host currently has no management network redundancy" warning message.

This happens due to requirements in a HA cluster where the management network (that is the service console or VMkernel port for management) is required to have two physical NICs.

If this requirement is not met the above error message is displayed. While I recommend you always, always ensure the management network has two pNICs and is redudant (including via seperate physical switches), it might not be possible in a demo/test environment.In which case you may want to disable this warning message.

This can be done as follows...

1. Go to "Edit" the cluster settings

2. Click "VMware HA"

3. Click "Advanced Options"

Page 178: Vmware 5.1 Knowledge base doc

4. Add "das.ignoreRedundantNetWarning" and set the value to "True", Click Ok

5. If there error still shows you need to select the host and click "Reconfigure for HA"

How to Resize a VMs Virtual Disk (.VMDK)

When you created your virtual machine you of course created the number of disks and their sizes as per the requirements, best practice guidelines or just your best estimation for its use. However, as requirements change and the amount of data in your virtual machine grows, from time to time you need add additional storage. How do you resize the virtual disk (.VMDK)?

Resizing virtual disks is relativley straight forward. However, as with anything before making changes ensure you have a backup (especially when making changes to disks).Note: You cannot change the disk size if you take a snapshot, plus if there was an issue with the disk the snapshot would be useless anyway.

Another thing to be aware of is you can only INCREASE the size of a virtual disk. You cannot reduce the size of a virtual disk, VMware does not currently allow it as it could risk losing data. If you want to reduce the disk size you could either use VMware converter to copy the VM and resize the disks at the same time or create a new smaller virtual disk and copy the data over to it.

To Increase the size of a virtual disk (.VMDK):1. Shutdown the virtual machine.2. Right click on the virtual machine and select "Edit Settings".

Page 179: Vmware 5.1 Knowledge base doc

3. On the "Hardware" tab, select the virtual disk you would like to resize and in the "Capacity" section enter the required size.

We are not finished yet. If you boot the virtual machine now the OS will not see the new size, it will only see the old size. You need to expand the volume into the new free space. Below are two methods of doing this, and depding on the guest OS and your preference depends which one you will choose.Method 1 (Windows DISKPART) will of course only work in windows.Method 2 (GParted) will work for any OS, including Linux and Unix provided as the filesystem type is supported by your chosen partitional utility.

Method 1 (Windows DISKPART):1. Click Start --> Run and type "diskmgmt.msc"2. You will see the free space after your volume.

 

3. Use DISKPART to extend the volume into all the free space:diskpartlist volumeselect Volume 0extendexit

Page 180: Vmware 5.1 Knowledge base doc

 

4. You will now see the volume has been extended to use all the free space.

 

Method 2 (GParted):To resize the partition on the disk use your favourite partition resizing tool. If you dont have one mine is GParted, which there is a live CD for. Download the GParted Live CD

1. Click on the "Options"  tab and go to "Boot Options".

2. Tick "Force BIOS Setup" (This will boot into the BIOS screen when the VM is powered on - This is so that you can mount and ISO image before the OS boots.)

Page 181: Vmware 5.1 Knowledge base doc

3. Click Ok to reconfigure the virtual machine.

 

 

4. Connect the ISO image or connect the CD drive with your GParted Live CD (This is easier with force BIOS option set in step 5).

 

5. Boot into GParted and you will see the current partion in the now much larger disk.

 

Page 182: Vmware 5.1 Knowledge base doc

6. Right click on the partion and select "Resize/Move".

 

7. Resize the partion to fill entire remaining space and click "Resize/Move".

 

8. Click "Apply" to run the resize task. After sometime depending on the size the task will complete.

9. Reboot the computer, remove the CD and boot into the OS.

 

Page 183: Vmware 5.1 Knowledge base doc

10. Depending on the OS it may perform a disk check like Windows Server 2003 here.

 

11. You should now see the disk has been resized.

Windows 7 Black Screen / Freezes / No Login Sceen on VMware ESX/ESXi

Right i'm going to put this down in ink, or even better electronic, as its happened twice and I forgot what I did to fix it the first time...

 

Essentially the issue is a black screen (sometimes with coloured lines/dots) when booting Windows 7.

This happens before the login screen and hangs there indefintley.

 

This occurs after installing Windows 7 as a virtual machine on VMware ESX/ESXi and then installing VMware Tools.

Once the Windows 7 VM is rebooted the black screen is then all you get.

 

The cause seems to be as soon VMware Tools is installed, and hence replaces the display driver more

Page 184: Vmware 5.1 Knowledge base doc

video ram is required.

By default the Windows 7 VM was created with a video memory size of 4MB. This appears to be insufficient and causes the black screen.

 

The fix is to increase the video memory size or change it to "Auto-detect video settings". From then on the Windows 7 VM boots and reaches the login screen correctly as expected.

 

Guest OS Slow, Freezing or Hanging with Windows Server 2008 R2 or Windows 7

 

There is an issue with a Guest OS of either Windows Server 2008 R2 or Windows 7 running on VMware ESX/ESXi 4.x with VMware Tools installed. The display driver SVGA-II freezes intermittently and sometimes permanently requiring reset of the VM.

This is a display driver issue which is resolved in the latest VMware Tools in ESX/ESXi 4.0 Update 1.However manual intervention is also required after updating to the latest VMware Tools to

Page 185: Vmware 5.1 Knowledge base doc

replace the display driver.

Check the current version of VMware Tools and display driver being used.VMware Tools 4.0.0 Build 208167 or before uses the "VMware SVGA-II" display driver which causes the problem.

 

1. Uninstall VMware Tools

2. Restart the server.

 

3. Install latest VMware Tools 4.0.0 Build 219382 or later

 

This will use the "Standard VGA Graphics Driver" but the video will appear slow and choppy.

To resolve this the VMware SVGA 3D (WDDM) for Windows Server 2008 R2 and Windows 7 needs adding. 4. Manually update the display driver via Device Manager to the following driver:C:\Program Files\Common Files\VMware\Drivers\wddm_video"VMware SVGA 3D (Microsoft Corporation - WDDM)" The driver folder is created when the latest version of VMware Tools was installed.

5. Restart the server.

 

 

 

 

 

ESXi - Accessing the Unsupported Console

Page 186: Vmware 5.1 Knowledge base doc

As some may know ESXi 3.5 and 4.0 has an unsupported console which can be accessed for VMware technical support etc.

However if you know what your doing it can be useful for getting to the bottom of a problem before calling VMware about an issue.

To gain access to the Unsupported Console:1. ALT+F12. Type "unsupported"3. Type <your root password>

And there you are, so blindingly obvious its unsupported! So use with caution. It runs a very light version of Linux called Busybox.

You will find an array of esxcfg commands available to assist if required

Installing VMware Tools on Windows Server 2008 Server Core

Installing VMware Tools on Windows Server 2008 Server Core has to be done slightly differently than a full installation of the OS.Because Server Core is command line based and does not have a GUI, the VMware Tools installer has to be run via the command line with msiexec.

1. First right click the virtual machine and choose "Install VMware Tools".

2. Then at the command prompt (assuming the CD drive is D:) run:msiexec /i d:\VMware Tools.msi /qn

3. The computer will reboot once the installation is complete.

Configuring ESX Syslog to a Remote Syslog Server

If you have a central log server that collects all your server and device syslogs, you will want to configure your ESX servers to also send their logs to it.

1. Login to the ESX server

2. Modify the following syslog system config line below to allow remote syslogging:vi /etc/sysconfig/syslog

SYSLOGD_OPTIONS="-m 0 -r"

3. Modify the syslog config with the line below to log all to a remote syslog server:vi /etc/syslog.conf

*.*     @syslog.server.local

 

4. Restart syslog:/etc/init.d/syslog restart

Shutting down kernel logger:                               [  OK  ]

Page 187: Vmware 5.1 Knowledge base doc

Shutting down system logger:                               [  OK  ]Starting system logger:                                    [  OK  ]Starting kernel logger:                                    [  OK  ]

5. Check the syslog firewall port UDP 514 is open:/usr/sbin/esxcfg-firewall -qOpened ports:

6. Open the syslog port if it is not open:/usr/sbin/esxcfg-firewall -o 514,udp,out,syslog

7. Check the syslog firewall port UDP 514 is open:/usr/sbin/esxcfg-firewall -qOpened ports:syslog              : port 514 udp.out

8. Send a test log message to check it is sending remote logs:logger testlogmessage1

 

Permissions, Users and Roles on ESX

 

If you are not using vCenter or only want to give a specific person access to an ESX server to do a specific task then here is how to do it...

 

First connect to the ESX server with VI client (it will need to have full admin right e.g. root).

 

If you want the user to only do certain tasks then we first need to create a role.

The roles can be found under the "Administration" button and the "Roles" tab.

To add a new role, right click and select "Add..."

Page 188: Vmware 5.1 Knowledge base doc

 

Give the role a name (in this case "VM Admin" because it will have all permissions to the VMs). Select the permissions and click "Ok".

Page 189: Vmware 5.1 Knowledge base doc

 

Now you can see your new role with the default roles.

 

Next is to create a user that can carry our this role.

Click on the ESX server in the inventory and navigate to the "User & Groups" tab.

 

Right click in the users list and select "Add..."

Page 190: Vmware 5.1 Knowledge base doc

 

Give the user a name (e.g. bob) and a password. Click "Ok".

 

The user will now appear in the list of users.

 

The next step is to give the user a role. This is done under the "Permissions" tab.

Right click in the permissions list and select "Add Permission...".

Notice the vpxuser in the list below, this is because this ESX server I am doing this on is connected to a vCenter server. The "vpxuser" is created and given the Administrator role when you connect the ESX server to vCenter.

Page 191: Vmware 5.1 Knowledge base doc

 

Add the user "bob" and assign a role (e.g. VM Admin that we created).

Choose to propogate the permissions to child objects.

Click "Ok".

 

The new permission can now be seen in the list of permissions, and is effective immediatley.

Page 192: Vmware 5.1 Knowledge base doc

 

Virtual Machine Automatic Startup and Shutdown

 

It is possible to set virtual machines to automatically startup and shutdown with the ESX server.

You may want to do this for example in a test environment where vCenter is in a VM.

Rather than connecting to the ESX server and starting the vCenter VM then connecting to vCenter, you could connect straight to vCenter.

 

Click on the "Configuration" tab of the ESX server and go to the "Virtual Machine Startup/Shutdown" section.

You will see the VMs are set to manual startup.

Click on "Properties".

Check the box to "Allow virtual machines to start and stop automatically with the system".

Page 193: Vmware 5.1 Knowledge base doc

 

Set the default startup and shutdown delay.

If VMware tools is installed you can set the guest to shutdown gracefully rather than just powering off.

Select the VM you want to auto start/stop and click "Move Up" so that it goes to "Automatic Startup".

Click Ok.

 

An overview of the configuration can now been seen in the "Virtual Machine Startup/Shutdown" section.

Page 194: Vmware 5.1 Knowledge base doc

 

Creating a Virtual Machine (Basic Settings)

This is one of the more basic tasks performed on ESX/ESXi. The wizard is very similar to workstation, server and fusion, however within the advanced settings they are very different. This will cover the initial basic part of creating a virtual machine on ESX. Though the process is the same if you did it via vCenter.

Connect to you ESX server or vCenter server using VI Client. Right click on the host and select "New Virtual Machine".

As this is just a standard virtual machine select "Typical" configuration. You will do this in most cases unless you need to change specific virtual hardware details, or a different OS to the usual list typically used that requires some tweaking. Click Next...

Page 195: Vmware 5.1 Knowledge base doc

Give the virtual machine a name to identify it. This could be the hostname so it is easier to find. Click Next...

Select the VMFS datastore to store the virtual machine on. Click Next...

Choose the guest operating system. This can be from the standard more popular types such as windows, linux, solaris etc, however you can select other and continue. This does make a difference to the recommendation of memory settings in the next steps. Click Next...

Page 196: Vmware 5.1 Knowledge base doc

Select the number of virtual processors. aka vCPU aka HEC (hardware execution context).If the OS or the apps running on it are not muti processor aware then only select 1 CPU. Otherwise this will negativley affect other VMs. As processor slots and time allocated to this VM could be used by other waiting. Click Next...

Set the amount of memory you want the VM to have. Click Next...

Page 197: Vmware 5.1 Knowledge base doc

Set the amount of virtual network cards you want the VM to have and the networks they should be connected to. Click Next...

Set the size of the virtual disk. Click Next...

Page 198: Vmware 5.1 Knowledge base doc

Review the VM settings and click Finish.

A task will run named "Create Virtual Machine". When complete you will be able to power on the VM.

The VM can now be seen under the host.

Page 199: Vmware 5.1 Knowledge base doc

Creating a VMFS Datastore

To create a VMFS datastore you need SCSI storage.

This can be either local SCSI disks (with or without RAID), or shared storage such as SAN storage (iSCSI or Fibre Channel) or NFS.

The storage device and ESX server must be configured prior to this so that the the storage can be seen by the ESX server.

 

See Configuring iSCSI Storage (Basic) or Configuring iSCSI Storage (Advanced with CHAP) for an example and help on this if required.

If you already have this configured you can continue.

 

It is also possible to create a VMFS datastore via the ESX server service console (see Service Console - VMFS Datastores).

 

 

 

1. Click on the "Configuration" tab on the server, then choose the "Storage" section.

 

2. You may see other configured datastores such as the local one here. Click "Add Storage".

Page 200: Vmware 5.1 Knowledge base doc

 

 

3. Select "Disk/LUN" for the storage type. Click Next...

 

 

4. You will now see any LUNs that have not yet been assigned. Select the LUN you want to use for your VMFS datastore and click Next...

Page 201: Vmware 5.1 Knowledge base doc

 

 

5. Review the disk layout. Click Next...

 

6. Give the datastore a name that will help you identify it. Click Next...

7. Choose an appropriate maximum file size for files on the VMFS volume.

If you will not have any virtual disks larger than 256GB each then choose a block size of 1MB. Click Next...

Page 202: Vmware 5.1 Knowledge base doc

 

 

8. Review the device, partition and file system details. Click Finish.

9. A task named "Create VMFS Datastore" will run and complete. The VMFS datastore is now ready to use.

10. This datastore can now been seen in the "Storage" section of the server configuration.

Page 203: Vmware 5.1 Knowledge base doc

 

 

Networking Configuration - vSwitches and Port Groups with 8 Physical NICs

When configuring networking on an ESX/ESXi server it is important that you plan and configure it correctly.Doing so will ensure you get the best reliability, performance and security within your virtual network.

Depending on your requirements the configuration will vary slightly. For example if network storage such and iSCSI and NFS will be used the setup will need to plan for this.I will explain the different setups for these needs.

The following setup is the best for a server with 8 physical networks cards. This setup would be implemented if network based IP storage is being used to ensure reliability, performance and security.

Physical NIC        Virtual Switch        Port Group(s)vmnic0                        vSwitch0                      Service Consolevmnic1                        vSwitch0                      Service Consolevmnic2                        vSwitch1                      VMkernel (IP Storage)vmnic3                        vSwitch1                      VMkernel (IP Storage)vmnic4                        vSwitch2                      VM Networkvmnic5                        vSwitch2                      VM Networkvmnic6                        vSwitch3                      vMotionvmnic7                        vSwitch3                      vMotion

Ideally VLANs should be used to seperate these networks

Networking Configuration - vSwitches and Port Groups with 6 Physical NICs

When configuring networking on an ESX/ESXi server it is important that you plan and configure it

Page 204: Vmware 5.1 Knowledge base doc

correctly.Doing so will ensure you get the best reliability, performance and security within your virtual network.

Depending on your requirements the configuration will vary slightly. For example if network storage such and iSCSI and NFS will be used the setup will need to plan for this.I will explain the different setups for these needs.

The following setup is the best for a server with 6 physical networks cards. This setup would be implemented if network based IP storage is being used to ensure reliability, performance and security.

Configuration for a server without network based IP storage:Physical NIC        Virtual Switch        Port Group(s)vmnic0                        vSwitch0                      Service Consolevmnic1                        vSwitch0                      Service Consolevmnic2                        vSwitch1                      vMotionvmnic3                        vSwitch1                      vMotionvmnic4                        vSwitch2                      VM Networkvmnic5                        vSwitch2                      VM Network

Configuration using network based IP storage:Physical NIC        Virtual Switch        Port Group(s)vmnic0                        vSwitch0                      Service Console + vMotionvmnic1                        vSwitch0                      Service Console + vMotionvmnic2                        vSwitch1                      VMkernel (IP Storage)vmnic3                        vSwitch1                      VMkernel (IP Storage)vmnic4                        vSwitch2                      VM Networkvmnic5                        vSwitch2                      VM Network

Ideally VLANs should be used to seperate these networks.

Networking Configuration - vSwitches and Port Groups with 4 Physical NICs

When configuring networking on an ESX/ESXi server it is important that you plan and configure it correctly.Doing so will ensure you get the best reliability, performance and security within your virtual network.

Depending on your requirements the configuration will vary slightly. For example if network storage such and iSCSI and NFS will be used the setup will need to plan for this.I will explain the different setups for these needs.

The following setup is the best for a server with 4 physical networks cards.

Configuration for a server without network based IP storage:Physical NIC        Virtual Switch        Port Group(s)vmnic0                        vSwitch0                      Service Console + vMotionvmnic1                        vSwitch0                      Service Console + vMotionvmnic2                        vSwitch1                      VM Networkvmnic3                        vSwitch1                      VM Network

Configuration using network based IP storage:Physical NIC        Virtual Switch        Port Group(s)vmnic0                        vSwitch0                      Service Console + vMotion + VMkernel (IP Storage)vmnic1                        vSwitch0                      Service Console + vMotion + VMkernel (IP Storage)vmnic2                        vSwitch1                      VM Networkvmnic3                        vSwitch1                      VM Network

Because service console network traffic is typically very small it can be placed on the same vSwitch as vMotion.

Page 205: Vmware 5.1 Knowledge base doc

vMotion may require a transfer of a large amount of traffic from time to time so keeping this seperate from the virtual machine traffic is a good idea. Otherwise it may be noticable when a VM is being vMotioned, in addition it is more secure keeping vMotion and service console traffic seperate from the rest of the network.Ideally VLANs should be used to seperate these networks.

Networking Configuration - vSwitches and Port Groups with 3 Physical NICs

When configuring networking on an ESX/ESXi server it is important that you plan and configure it correctly.Doing so will ensure you get the best reliability, performance and security within your virtual network.

Depending on your requirements the configuration will vary slightly. For example if network storage such and iSCSI and NFS will be used the setup will need to plan for this.I will explain the different setups for these needs.

The following setup is the best for a server with 3 physical networks cards.

Configuration for a server without network based IP storage:Physical NIC        Virtual Switch        Port Group(s)vmnic0                        vSwitch0                      Service Console + VM Networkvmnic1                        vSwitch0                      Service Console + VM Networkvmnic2                        vSwitch1                      vMotion

Configuration using network based IP storage:Physical NIC        Virtual Switch        Port Group(s)vmnic0                        vSwitch0                      Service Console + VM Network + VMkernel (IP Storage)vmnic1                        vSwitch0                      Service Console + VM Network + VMkernel (IP Storage)vmnic2                        vSwitch1                      vMotion

The best use of 3 NICs is to ensure reliability of the important traffic such as the service console, virtual machines and IP storage if used.vMotion traffic is not as imporant because a failure to this network will not bring VMs down or cause any issues. they just will not Vmotion.If a host happened to fail then HA would still bring up the VM on another host as vMotion is not used for that process.

Ideally VLANs should be used to seperate these networks.

Networking Configuration - vSwitches and Port Groups with 2 Physical NICs

When configuring networking on an ESX/ESXi server it is important that you plan and configure it correctly.Doing so will ensure you get the best reliability, performance and security within your virtual network.

Depending on your requirements the configuration will vary slightly. For example if network storage such and iSCSI and NFS will be used the setup will need to plan for this.I will explain the different setups for these needs.

The following setup is the best for a server with 2 physical networks cards. As most servers typically come with 2 onboard NICs this is a common initial configuration in test or small setups.

To ensure the most reliable configuration it is best to use both physical network cards for one vSwitch.This configuration has sacrificed performance for reliability.

Configuration for a server without network based IP storage:

Page 206: Vmware 5.1 Knowledge base doc

Physical NIC        Virtual Switch        Port Group(s)vmnic0                        vSwitch0                      Service Console + vMotion + VM Networkvmnic1                        vSwitch0                      Service Console + vMotion + VM Network

Configuration using network based IP storage:Physical NIC        Virtual Switch        Port Group(s)vmnic0                        vSwitch0                      Service Console + vMotion + VM Network + VMkernel (IP Storage)vmnic1                        vSwitch0                      Service Console + vMotion + VM Network + VMkernel (IP Storage)

Alternativley the opposite could be done. To get the best performance configuration have two vSwitches and a NIC to each as follows.This configuration has sacrificed reliability for performance.

Configuration for a server without network based IP storage:Physical NIC        Virtual Switch        Port Group(s)vmnic0                        vSwitch0                      Service Console + vMotionvmnic1                        vSwitch1                      VM Network

Configuration using network based IP storage:Physical NIC        Virtual Switch        Port Group(s)vmnic0                        vSwitch0                      Service Console + vMotion + VMkernel (IP Storage)vmnic1                        vSwitch1                      VM Network

Ideally VLANs should be used to seperate these networks.

NIC Teaming

NIC teaming can be used in virtual switches to improve reliability and performance.You may be familiar with NIC teaming on a server where you have two NICs and give them both the same IP using a special driver to create a virtual NIC.On ESX servers you can use NIC teaming also to take advantage of multiple physical NICs you have. The NIC teaming is however done at the virtual switch (vSwitch) level rather than in the VM itself. This way everything using that vSwitch benefits.

This is done the following way:1. Click on the ESX or ESXi Server within VI client.2. Click on the Configuration tab and got to the networking section.3. Go to the vSwitch you want to load balance on (eg. vSwitch0) and click Properties.4. In the dialog that opens click vSwitch and choose edit.5 Go to the NIC Teaming tab.6. You will see Active, Standby and Unused adaptors. Change this as required, ensuring you have the physical network setup correctly.

ESX and ESXi Server Comparison

Notably the biggest difference between ESX and ESXi, is the fact ESXi does not have a service console. There is now a remote CLI that can be run from a windows system to perform the majority of commands available from the similar ESX service console.However lacking the service console has some drawbacks that may restrict some from running ESX server based backups, 3rd party monitoring and other custom applications from the red hat based service console.

Page 207: Vmware 5.1 Knowledge base doc

There are other feature differences and also licensing and upgrade path differences as shown below.

ESXi – Free License

(ESX not available without VI)

VI Foundation

(with ESX or ESXi)

VI Standard(with ESX or

ESXi)

VI Enterprise(with ESX or

ESXi)Core hypervisor functionality

Yes Yes Yes Yes

Virtual SMP Yes Yes Yes YesVMFS Yes Yes Yes YesVirtualCenter Agent Yes Yes YesUpdate Manager Yes Yes YesConsolidated Backup Yes Yes YesHigh Availability Yes YesVMotion YesStorage VMotion YesDRS YesDPM Yes

Service Console - Virtual Switch Commands

If you need to change your vswitch and port group settings using the service console, esxcfg-vswitch is what you need to use.If you were "tweaking" ESX network settings via VI Client and lost connectivity you will find these commands very useful.

List all virtual switches and the port group information:esxcfg-vswitch -l

Switch Name    Num Ports   Used Ports  Configured Ports  MTU     UplinksvSwitch0                    64                  9                     64                    1500    vmnic2,vmnic0PortGroup Name      VLAN ID  Used Ports  UplinksServer Network                 41           5               vmnic0,vmnic2Switch Name    Num Ports   Used Ports  Configured Ports  MTU     UplinksvSwitch1                    64                  6                         64               1500     vmnic3,vmnic1PortGroup Name      VLAN ID  Used Ports  UplinksService Console           35                  1           vmnic1,vmnic3VMkernel                        35                  1           vmnic1,vmnic3Switch Name    Num Ports   Used Ports  Configured Ports  MTU     UplinksvSwitch2                    64                     1                      64                1500PortGroup Name      VLAN ID  Used Ports  UplinksInternal                               0                0

Delete a port group from a vswitch:/usr/sbin/esxcfg-vswitch -D "Service Console" vSwitch1

Add a port group to a vswitch:/usr/sbin/esxcfg-vswitch -A "Service Console" vSwitch1

Set the VLAN ID of a port group:/usr/sbin/esxcfg-vswitch -p "Service Console" -v35 vSwitch1

Check if virtual switch already exists:esxcfg-vswitch -c vSwitch2

Page 208: Vmware 5.1 Knowledge base doc

Create a virtual switch:esxcfg-vswitch -a vSwitch2

Check if a port group on a virtual switch already exists:esxcfg-vswitch -C VMotion

Create a port group on a virtual switch:esxcfg-vswitch -A VMotion vSwitch2

Link a virtual switch to a physical nic:esxcfg-vswitch -L vmnic2 vSwitch2

Command Options:

/usr/sbin/esxcfg-vswitchesxcfg-vswitch [options] [vswitch[:ports]]-a|--add              Add a new virtual switch.-d|--delete           Delete the virtual switch.-l|--list             List all the virtual switches.

-L|--link=pnic        Set pnic as an uplink for the vswitch.-U|--unlink=pnic      Remove pnic from the uplinks for the vswitch.

-M|--add-pg-uplink    Add an uplink to the list of uplinks for a portgroup-N|--del-pg-uplink    Delete an uplink from the list of uplinks for a portgroup

-p|--pg=portgroup     Specify a portgroup for operationUse ALL to set VLAN IDs on all portgroups

-v|--vlan=id          Set vlan id for portgroup specified by -p0 would disable the vlan

-c|--check            Check to see if a virtual switch exists.Program outputs a 1 if it exists, 0 otherwise.

-A|--add-pg=name      Add a new portgroup to the virtual switch.-D|--del-pg=name      Delete the portgroup from the virtual switch.-C|--check-pg=name    Check to see if a portgroup exists.  Program

outputs a 1 if it exists, 0 otherwise.-B|--set-cdp          Set the CDP status for a given virtual switch.

To set pass one of "down", "listen", "advertise", "both".-b|--get-cdp          Print the current CDP setting for this switch.

-m|--mtu=MTU          Set MTU for the vswitch. This affects all the nics attached on the vswitch.-r|--restore          Restore all virtual switches from the configuration file

(FOR INTERNAL USE ONLY).-h|--help             Show this message.

NOTE: Useful to remember for esxcfg-vswitch use lower case switch for the switches. Upper case switch for port groups.

Networking - 802.1q Trunking

How do you make a trunk port on a cisco switch and how do you get it to work with ESX and ESXi?

Why would you want to do this...To segregate traffic on different VLANs for improved security (802.1q). Meaning you will be able to put virtual machines onto different VLANs (Maybe you have dev, test and production VLANs).

Before you make the port a trunk port, ensure that you set the correct VLAN ID on the port groups,

Page 209: Vmware 5.1 Knowledge base doc

especially the service console. Otherwise you will be unable to connect and manage the server via VI client. If you cannot connect afterwards you can connect to the service console via the server terminal pressing ALT+F1 and then using the esxcfg-vswitch commands set the correct VLAN ID or remove it.

Switch Port Configuration for 802.1q trunkingMake the port a trunk port

interface GigabitEthernet1/13description ESX Server 1switchport trunk encapsulation dot1qswitchport mode trunkswitchport nonegotiatespanning-tree portfast trunkend

NOTE: You cannot use VLAN 1 in virtual switches with trunking because the traffic is not tagged.

Releasing Locked Files in a VMFS Volume

When files are in use they are locked to prevent modifying by anything else. In a VMFS volume sometimes these files stay locked even when they are not in use (possibly when a VM was not stopped properly). This doesn't happen often, but it can be annoying when it does and you will get a busy, locked or in use error. To fix this you need to release the lock on the file.

Logon to the ESX Server that was last running the VM.

Dump the log information:vmkfstools -D /vmfs/volumes/path/to/myvm1

Check the log:less /var/log/vmkernel...Dec 15 14:31:34 vm19 vmkernel: 1:02:11:14.325 cpu3:1038)Lock [type 10c00001 offset 30439424 v 21, hb offset 4154368Dec 15 14:31:34 vm19 vmkernel: gen 37671, mode 1, owner 2a3b5a3-cb2591a3e-b657-e18b9e6d24b6 mtime 8781867] ...

The owner locking the file is on the line where it says owner "owner 2a3b5a3-cb2591a3e-b657-e18b9e6d24b6". Get the last part of that hex value "e18b9e6d24b6".

Find the system UUID of all the ESX Servers so you know which one is locking it:esxcfg-info | grep -i 'system uuid' | awk -F '-' '{print $NF}'

ps -elf | grep myvm1

/usr/lib/vmware/bin/vmkload_app /usr/lib/vmware/bin/vmware-vmx should have a lock on the VMs file.

 

Kill the master user world id (vmid):

Page 210: Vmware 5.1 Knowledge base doc

 

cat /proc/vmware/vm/*/names | grep myvm1

less /proc/vmware/vm/ value/cpu/status

/usr/lib/vmware/bin/vmkload_app -k 9 vmid#

 

Failing that crash the VM and get the logs (run in a directory with some space to spare):vm-support -xvm-support -X vmid#

Soft and Hard Stopping an Unresponsive VM

Sometimes a virtual machine can stop working and fail to respond. While you may not be able to power off the VM gracefully via VI client to vCenter or ESX there is another way to do this, ensuring it is powered off properly. If you kill off the process the VM is running under you may stop it from working again. You can use the vmware-cmd command in the service console to stop the VM.

Logon to the ESX Server that is running the VM.

List all VMs on that ESX Server (Check you VM is listed here):vmware-cmd -l

Get the current state of the VM:vmware-cmd /path/to/vm getstate

If an answer is needed run:vmware-cmd /path/to/vm answer

Try to soft stop the VM:vmware-cmd /path/to/vm stop trysoft

Failing that try to hard stop the VM:vmware-cmd /path/to/vm stop hard

Failing that kill the master user world id (vmid):cat /proc/vmware/vm/*/names | grep myvm1

less /proc/vmware/vm/ value/cpu/status

/usr/lib/vmware/bin/vmkload_app -k 9 vmid#

Failing that crash the VM and get the logs (run in a directory with some space to spare):vm-support -xvm-support -X vmid#

SRM SRA Timeout HBA Rescans- Recovered datastore is not visible to host

It's possible with SRM to get one of the following errors when testing failover (and actual failover -

Page 211: Vmware 5.1 Knowledge base doc

that's why testing is important):

 

Recovered VMFS datastore 'snap-xxxxxxxx' is not visible or not mounted on host 'esxi-xxxxxx'

Recovered datastore is not visible to host 'esxi-xxxxxx'

Failed to rescan HBAs on host 'esxi-xxxxxx'

 

Now you have the above errors and thinking oh s$%£ thats not good I can't see the storage on all the hosts.

So it's either incorrect zoning, or more likley if you've double checked that already.. insufficient time for the hosts to rescan and discover all the datastores before the recovery continues.

 

SRM only performs a rescan once. However it is quite possible that more than one rescan is required before all the datastores are discovered, it seems to vary depending on the array.

 

The fix for this is to modify an SRM advanced setting "storageProvider.hostRescanRepeatCnt", to increase the number of host rescans during testing and recovery to 2-3.

 

 

Additionally it's also possible to increase the host rescan timeout value "storageProvider.hostRescanTimeoutSec" combined with this to ensure all datastores are discovered

Page 212: Vmware 5.1 Knowledge base doc

sucessfully.

 

One thing to note is if you increase these values, your recovery time (RTO) will also increase.

 

 

SRM 5 - IP Customization

With SRM it is possible to change the IP settings for VMs between the DR site and production site, as VMs failover and failback between the sites, without manual IP changes.

In SRM 5 there is a new UI for modifying the IP customisations at a per VM level, this allows changing of IP address, mask, default gateway, DNS and WINS servers.

So for example here we have SRMDEMOVM1 which at the production site has IP 172.16.100.173 and at the DR site has IP 10.1.100.173 also with respective gateway and DNS server IP changes between sites.

 

While IP customization is pretty straightforward to once you have planned out the IP changes, it's worth noting that this adds additional time to the recovery process to change the IPs, and added complexity for applications - more so bespoke/legacy applications and/or ones that are tied to IP address not FQDN.

 

So far my experience designing and implementating SRM solutions the split has been 50/50 regards spanned VLANs and implementations requiring IP address changes. My preference always... Spanned VLANs - Why?! Well it leave so much less to go wrong at the application layer, plus most important of all the recovery time (RTO) is faster.

 

So how is it done?

 

 

1. Navigate to your recovery plan with the VMs that require IP customisations (at this point I'm mixing between the "s" and "z" spelling- BTW "s" is correct I'm British wrong!!).

 

2. Right click a VM you want to change the IP for and select Configure.

 

Page 213: Vmware 5.1 Knowledge base doc

 

 

 

3. For each vNIC you can change the IP settings, select the appropriate "IP Settings - NIC #" and tick "Customize IP Settings during recovery"

 

Page 214: Vmware 5.1 Knowledge base doc

 

 

4. First configure the protected site IP (this is the production site where the VM resides now). You can click "Retrieve" to pull out the current settings if the VM is on.

 

Page 215: Vmware 5.1 Knowledge base doc

  

5. Note the protected site IP settings are now populated. Now click "Configure Recovery" which will configure the IP settings for the DR site.

 

Page 216: Vmware 5.1 Knowledge base doc

 

6. Enter the IP settings for the DR site.

Note: Don't forget the default gateway and DNS servers will be different too.

 

  

7. Now both protected and recovery site IP settings are populated in the VM recovery properties dialog. Click Ok to save this.

 

Page 217: Vmware 5.1 Knowledge base doc

8. Note in the recovery plan that VMs sub recovery steps will now have a new "Customize IP" step.

 

 

At time of writing when SRM 5.0.1 was released the following Windows and Linux guest OSes were supported for IP customisation:

Windows 2000 Advanced Server (SP4 with Update Rollup #1) 32-bitWindows 2000 Advanced Server (SP3, SP4) 32-bitWindows 2000 Advanced Server 32-bitWindows Server 2003 Datacenter Edition R2 32-bit & 64-bitWindows Server 2003 Datacenter Edition (SP1, SP2) 32-bit & 64-bitWindows Server 2003 Datacenter Edition 32-bit & 64-bitWindows Server 2008 Standard Edition R2 64-bitWindows Server 2008 Standard Edition R2 SP1 64-bitWindows Server 2008 Standard Edition (SP1, SP2) 32-bit & 64-bitWindows Vista Business (SP1, SP2) 32-bit & 64-bitWindows Vista Business 32-bit & 64-bitWindows XP Home Edition (SP1, SP2, SP3) 32-bitWindows XP Home Edition 32-bitWindows XP Professional Edition (SP2) 64-bitWindows 7 32-bit & 64-bit

SRM 5 - VM Dependencies

So we have already covered SRM 5 - Priorities and Recovery Order in a previous post. However what if we want to manipulate the startup order more specifically within a priority group?

Well that's what we have "VM Dependencies" for for each virtual machine within the recovery plan.

 

Just to re-cover the past and present..

Site Recovery Manager 5 brought a change from 3 levels of priorities (High, Medium, Low) to 5 levels of priorites (1-5 with 1 being the highest priority).

So now instead of having additional seperate recover plans to allow for specific recovery priorities, we can perhaps now include them within one recovery plan.

Page 218: Vmware 5.1 Knowledge base doc

 

However that said, you might put critical infrastructure VMs in priority 1, critical tier 1 business apps at priority 2 and so on, but what about dependencies within each of those priorities?

In priority 2 (critical tier 1 business apps) there might be an application that has a DB VM and a web server VM, in which the web VM depends on the DB VM being available first.

What we could then do is set a VM dependency for the web VM to say it depends on the DB VM, hence they will be started in the required order, one after another.

 

One thing to note however is by setting VM dependencies is that it will extend the time it takes to run the recovery plan, as there will be an additional time while each VM with a dependency waits before it can power on itself. Say 5 minutes boot time each, so you can easily see how that 15 min recovery time objective (RTO) could be smashed to 30 mins etc the more dependencies you have!

 

Configuring VM dependencies is easy-peasy..

 1. Go you your desired recovery plan.

 2. Select the VM that has a dependency on another VM and choose Configure.

(in our case SRMDEMOVM1 depends on SRMDEMOVM2 being booted first)

Page 219: Vmware 5.1 Knowledge base doc

 

3. In the VM Recovery Properties dialog for the VM, navigate to "VM Dependencies"

 

Page 220: Vmware 5.1 Knowledge base doc

4. Click Add, and select the VM that it depends on. Click Add.

 

5. The VM dependency will be added and show the status of that VM, priority group and protection group. Click Ok.

 

 

Page 221: Vmware 5.1 Knowledge base doc

SRM 5 - Priorities and Recovery Order

 When a recovery plan runs, groups of virtual machines are started according to priority. Before a priority groupis started, all machines in the next-higher priority group must have recovered or failed to recover. As long asdependancies have been met, the recovery engine attempts to power on as many virtual machines in parallelas vCenter supports.

   

Site Recovery Manager 5 brought a change from 3 levels of priorities (High, Medium, Low) to 5 levels of priorites (1-5 with 1 being the highest priority).

 The priorities for virtual machines are set within the recovery plan steps. To change the priority level of a VM within a recovery plan follow the below steps.

 1. Open vSphere Client and Click Site Recovery Manager plugin

 2. Select Recovery Plans from the left inventory view of SRM.

 3. Click on the recovery plan you want to modify and navigate to the "Recovery Steps" tab.

 4. Right Click the VM for which you want to change the priority for and select Priority-->and the desired priority.

 

Page 222: Vmware 5.1 Knowledge base doc

 

 

5. The VM will be moved into its new priority group.

 

 

VMware Update Manager Error - Session is not authenticated

 

I recently came across the following error with VMware Update Manager 4...

 

There was an error connecting to the VMware vCenter Update Manager [servername:8084].

: Vmomi.Fault.NotAuthenticated : The session is not authenticated.

 

Page 223: Vmware 5.1 Knowledge base doc

 

 

No related changes to VUM or vSphere in general had been made that would affect it. However the user account I was using and logged into vSphere with had its password changed, which assumably was the cause. Restarting the "VMware Update Manager Service" resolved the problem.

 

First I checked the vSphere client plugin. It was showing an error "Plug-in is unavailble for the following server(s): servername". 

Attempting to right click and enable the plug-in resulted in the same error.

 

 

 

 Checking the Update Manager logs there were messages relating the problem to connections issues

Page 224: Vmware 5.1 Knowledge base doc

with Update Manager and the client.

C:\Documents and Settings\All Users\Application Data\VMware\VMware Update Manager\Logs\vmware-vum-server-log4cpp.logvmware-vum-server-logXcpp.log

 

[2010-03-23 19:33:04:899 'VaCimClientXML' 4424 ERROR]  [vaCimClientXml, 1217] SendRequestToGuest to IP 192.168.1.26:5489  failed: A connection attempt failed because the connected party did not properly respond after a period of time, or established  connection failed because connected host has failed to respond. [2010-03-23 19:33:04:899 'VaCimClientXML' 4424 ERROR]  [vaCimClientXml, 1335] All connection attempts failed[2010-03-23 19:33:04:993 'SingleVADiscoveryTask.SingleVADiscoveryTask{6}' 4424 ERROR] [singleVADiscoveryTask, 226] SingleVADiscoveryTask{6} encountered error: Unknown exception 

 

I restarted the "VMware Update Manager Service".

 

Then went back to the vSphere client and enabled the "VMware Update Manager" plug-in, which enabled fine.

All update manger tabs in vSphere client appeared and it has been working find since.

 

Page 225: Vmware 5.1 Knowledge base doc

 

There is a related VMware KB on this error but it did not apply to my issue. 

http://kb.vmware.com/kb/1011858

 

Update Manager (VUM) - Updating ESX Servers

This is a guide to the process of updating VMware ESX Server Its intention is to give an overview of the steps involved rather than going into too much detail, as this can vary from version to version.

It is assumed that VMware Update Manager (VUM) is installed and configured correctly, and that the VUM VI client plugin is installed and enabled.

1. Click "Scheduled Tasks".

2. Run the "VMware Update Manager Update Download" task. This will download all available updates as configured in Update Manager. Wait until completed.

3. Right click the ESX server or cluster that you want to update and click "Scan for updates". This will check what updates are needed (It will not install anything). Wait until completed. Updates needed (non-compliant updates) can be found under the Update Manager tab ont he cluster or the ESX server.

4. Right click the ESX server or cluster that you want to update and click "Remediate".

5. Select the baselines you want to apply.

6. Select the updates to install. Read the release notes for the updates.

7. Set the install parameters.

8. Click "Finish" to start the update procedure.

9. Once complete check the version/build number is now updated and re-run "Scan for updates" to see that all updates are now compliant.

10. Test that all functionality is working correctly

Converter PEtool - Add Network and Storage Drivers to the Cold Clone CD/ISO

As you P2V various different servers with the VMware Converter Cold Clone CD, you will find that not all the network and storage drivers you require are available on the CD.

Whilst the included driver set suffices for alot of very common server hardware, messing about with floppies can get a little tedious, especially if you have alot of servers to do.

 

Enter the "petool.exe", there to help you in exactly this situation.

It is included with the VMware Converter CD download and is provided to slipstream additional

Page 226: Vmware 5.1 Knowledge base doc

network and storage drivers into the coldclone.iso

 

To add the additional drivers you need the following:

VMware Converter CD download (Extracted with .iso and petool.exe) Network and/or Storage drivers you wish to add

 

 

1. In a command prompt navigate to the Converter CD folder

cd c:\temp\VMware-convertercd-4.1.1-206170

 

 

2. Run the PEtool to add the driver to the coldclone.iso 

For storage drivers use "-d":

petool-i coldclone.iso -d c:\temp\R194151

For network drivers use "-n"

petool-i coldclone.iso -n c:\temp\NET1234

 

Page 227: Vmware 5.1 Knowledge base doc

 

  

3. And there you have it

The previous coldclone.iso file is now named coldclone.iso.bak

Your new Cold Clone CD with added drivers can be found as coldclone.iso

Burn to a CD and off you go....

 

Page 228: Vmware 5.1 Knowledge base doc

 

 

Converter 100% Failed - ERROR: Unknown error returned by vcenter converter agent

I recently ran VMware convereter via a cold clone CD that completed, but said 100% Failed.

Additionally VMware converter also showed the following... Step 3 : Preparing target virtual machineERROR: Unknown error returned by vcenter converter agent The guest OS customization box was not ticked however it tried to run sysprep anyway and failed.The fact it says "Error while creating Customization deploy File: error creating archive" seems to show it didnt have any details for the sysprep file (because I didnt ask for it) and failed.Following that shortly after "Image processing task has failed with MethodFault::Exception: sysimage.fault.CustomizationSysprepFault" confirms that it was trying to run a sysprep image processing task which failed. Despite all this the VM was still created, bootable and fully working so panic was over but worth knowing what happened. As to why it happened maybe the box was ticked then unticked a boolean flag wasnt cleared? Who knows wasnt worth putting a call in to VMware as otherwise it was 100% successful.  Log Extract:[#2] [j1] [2010-07-02 05:59:52.812 'App' 256 info] [extendedOsInfo,874] ParseNTRegistry FOUND: Microsoft Windows Server 2003 root:WINDOWS\ SrvPack:2 SMP:1 64:0 Ver:5.2[#2] [j1] [2010-07-02 05:59:52.812 'App' 256 verbose] [disposable,122] object explicitly disposed: fileRegistry={virtVol={computer={990f7ffa34dae92a3d60a30f58465ee43ebfb8a3},0}},WINDOWS\system32\config\SOFTWARE[#2] [j1] [2010-07-02 05:59:52.828 'App' 256 info] [extendedOsInfo,230] Returning OS as winNetStandardGuest[#2] [j1] [2010-07-02 06:00:00.734 'App' 660 info] [vmiCustomizeTaskWin32,912] sysprepDeployRoot:

[#2] [j1] [2010-07-02 06:00:00.734 'App' 660 info] [vmiCustomizeTaskWin32,913] sysprepOptions: [#2] [j1] [2010-07-02 06:00:44.546 'App' 660 error] [vmiCustomizeTaskWin32,942] Error while creating Customization deploy File: error creating archive[#2] [j1] [2010-07-02 06:00:44.546 'managedImportSource' 660 info] *** Begin Logout() ***[#2] [j1] [2010-07-02 06:00:48.578 'managedImportSource' 660 info] *** Finish Logout() ***[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [disposable,122] object explicitly disposed: computer={990f7ffa34dae92a3d60a30f58465ee43ebfb8a3}[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [diskSet,114] Cleaning up computer's child objects[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [diskSet,130] Unregistring volume id=virtVol={computer={990f7ffa34dae92a3d60a30f58465ee43ebfb8a3},0}

Page 229: Vmware 5.1 Knowledge base doc

[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [diskSet,130] Unregistring volume id=virtVol={computer={990f7ffa34dae92a3d60a30f58465ee43ebfb8a3},1}[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [diskSet,130] Unregistring volume id=virtVol={computer={990f7ffa34dae92a3d60a30f58465ee43ebfb8a3},2}[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [diskSet,130] Unregistring volume id=virtVol={computer={990f7ffa34dae92a3d60a30f58465ee43ebfb8a3},3}[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [diskSet,130] Unregistring volume id=virtVol={computer={990f7ffa34dae92a3d60a30f58465ee43ebfb8a3},4}[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [diskSet,130] Unregistring volume id=virtVol={computer={990f7ffa34dae92a3d60a30f58465ee43ebfb8a3},5}[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [diskSet,130] Unregistring volume id=virtVol={computer={990f7ffa34dae92a3d60a30f58465ee43ebfb8a3},6}[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [diskSet,130] Unregistring volume id=virtVol={computer={990f7ffa34dae92a3d60a30f58465ee43ebfb8a3},7}[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [diskSet,130] Unregistring volume id=virtVol={computer={990f7ffa34dae92a3d60a30f58465ee43ebfb8a3},8}[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [diskSet,140] Unregistring disk id=disk={bc134b6dcd10bd2f4d53e8e7f2adbede8068c5ed}[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [diskSet,140] Unregistring disk id=disk={689f19d5ac660fb4edbc6c4c1ce25e4d50af1869}[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [diskSet,140] Unregistring disk id=disk={e2ec87a2f2bf9d6875e8c24e9d765dcc2f6efbab}[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [diskSet,140] Unregistring disk id=disk={2f2fd3f0dca77da8f1325f04994852b199dcd903}[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [diskSet,140] Unregistring disk id=disk={41b8df9eb8cecf38d9ffbfec4a4fad4a8a2fbefc}[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [diskSet,140] Unregistring disk id=disk={1b759882cb87ca15166e43b3d795c971ab6bd313}[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [diskSet,140] Unregistring disk id=disk={121acd4a08c5f51b0bda1a17bb5386a1b5f8567}[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [diskSet,140] Unregistring disk id=disk={2debb775ec50b388e09ad8555ab02b8c5c0bf1af}[#2] [j1] [2010-07-02 06:00:48.578 'App' 532 verbose] [diskSet,140] Unregistring disk id=disk={3489613a464383617e9ff4fb84423ad0ad1b9ec}[#2] [j1] [2010-07-02 06:00:48.671 'App' 660 error] [imageProcessingTaskImpl,572] VmiCustomizeTask::task{17}: Image processing task has failed with MethodFault::Exception: sysimage.fault.CustomizationSysprepFault[#2] [j1] [2010-07-02 06:00:48.671 'App' 660 verbose] [imageProcessingTaskImpl,154] VmiCustomizeTask::task{17}: SetState to error[#2] [j1] [2010-07-02 06:00:48.703 'App' 532 verbose] [disposable,122] object explicitly disposed: VmiCustomizeTask::task{17}[#2] [j1] [2010-07-02 06:00:48.703 'App' 532 verbose] [imageProcessingTaskImpl,123] VmiCustomizeTask::task{17} being destroyed[#2] [j1] [2010-07-02 06:00:49.437 'App' 532 info] Stopped impersonating in session 04C8860C-5DE4-4917-942D-DC21D35C5431[2010-07-02 06:00:49.484 'App' 532 verbose] CloseSession called for session id=04C8860C-5DE4-4917-942D-DC21D35C5431[2010-07-02 06:00:49.484 'VmdbAdapter' 532 verbose] Removed vmdb connection /db/connection/#2/[#3] [2010-07-02 16:07:17.296 'App' 1620 info] Impersonating user SYSTEM in session AE86C5F9-CF2A-4DB3-8079-1C22BFC0827D[#3] [2010-07-02 16:07:17.328 'App' 1620 info] Stopped impersonating in session AE86C5F9-CF2A-4DB3-8079-1C22BFC0827D[2010-07-02 16:07:17.359 'App' 1620 verbose] CloseSession called for session id=AE86C5F9-CF2A-4DB3-8079-1C22BFC0827D[2010-07-02 16:07:17.359 'VmdbAdapter' 1620 verbose] Removed vmdb connection /db/connection/#3

Installing and Upgrading vSphere Converter from 3.0 to 4.0

VMware vCenter Converter quickly, easily and affordably converts Microsoft Windows and Linux

Page 230: Vmware 5.1 Knowledge base doc

physical machines and third party image formats to VMware virtual machines. It also converts virtual machines between VMware platforms.

VMware vCenter Converter is available in two different versions:

Standalone Converter

Converter integrated with VMware vCenter Server

 

Here the integrated VMware vCenter Converter Server is being upgraded. The process for the install and upgrade is the same, but for the upgrade there is an additional prompt to let you know its being upgraded.

 

Download VMware vSphere vCenter 4 from the VMware download area. 

Insert the DVD (it will autorun) or run the exe, from the extracted ZIP file.

Click "vCenter Converter.

 

Choose the language. Click OK.

Page 231: Vmware 5.1 Knowledge base doc

 

If upgrading confirm you want to continue by clicking Yes.

 

Click Next.

 

Read and accept the license. Click Next.

Page 232: Vmware 5.1 Knowledge base doc

 

Enter the installation path. Click Next.

 

Choose the typical/custom installation. Click Next.

Page 233: Vmware 5.1 Knowledge base doc

 

If custom installation was choosen, notice the converter agent is not installed but the converter server and CLI are.

We do not need the converter agent installing on this server. Click Next.

 

Page 234: Vmware 5.1 Knowledge base doc

Enter the vCenter Server details. Click Next.

 

Confirm or modify the ports to be used. Click Next.

 

Page 235: Vmware 5.1 Knowledge base doc

Choose the vCenter address. Click Next.

 

Click Next to install.

 

Page 236: Vmware 5.1 Knowledge base doc

Converter is installed, wait for it to complete.

 

Installation is complete. Click Finish.

Page 237: Vmware 5.1 Knowledge base doc

 

Start the vSphere client and connect to the vCenter Server.

Page 238: Vmware 5.1 Knowledge base doc

 

Go to the vCenter plugin manager.

Right click "VMware Converter Enterprise" plugin and install the client plugin.

 

The client plugin will install.

 

Confirm the plugin shows under "Installed Plug-ins".

Page 239: Vmware 5.1 Knowledge base doc

 

Choose the "Import Machine..." option in the inventory to use Converter to P2V an existing server.

 

Use the Converter Import Wizard to convert the server to a virtual machine.

Page 240: Vmware 5.1 Knowledge base doc

P2V Conversion Plan Info Sheet

If you have not done so already, check the pre conversion checklist to ensure some basic pre checks are met and anything else you may need to consider for the migration.

For the actual conversion to take place you need to have a variety of information about the source and destination server. From the checks made in the pre conversion checklist you should now have a good idea about what the virtual machine settings will be for CPU, RAM, Network and disk.

This is an example of P2V conversion information sheet I have made. A blank copy of the P2V conversion information sheet is available for filling out your own P2V details.

Afterwards P2V conversion ensure you remove old hidden devices from the VM.

Summary P2V Conversion InformationDate:                01-01-2008Start Time:        18:00Type:                Hot Clone (Manual)OS:                  Windows Server 2003 Standard (Service Pack 1)Role:                Domain Member (mydomain.local)Disk Resize:     YES

Page 241: Vmware 5.1 Knowledge base doc

Agent:              Remote

Details of what server is used for:Web server running IIS for website intranet.mydomain.local

SOURCE SERVER (PHYSICAL) SPECIFICATION:MAKE:                      DellMODEL:                    PowerEdge 2650CPU:                         2 x 2.4ghz Intel XeonRAM:                        2048mbNETWORK:               2 x Broadcom NetXtreme Nics (NIC1 192.168.2.123, NIC2 disabled)SERIAL PORTS:        NonePARALLEL PORTS:   NoneSTORAGE:PhysicalUsed By Drive(s)        Disks                Raid Type        Disk Speed        Total Size (Gb)c, e                            2 x 73Gb           RAID1                15k                      73

LogicalDrive        Drive Name        Used (Gb)        Total (Gb)c              OS                          5                   12e              DATA                      2                   60TOTAL                                    7                   72

DESTINATION SERVER (VM) SPECIFICATION:CPU:                       1 x vCPU (Reserved and Limited at 2000mhz)RAM:                      2048mb (Reserved and Limited at 2048mb)NETWORK:             1 x VMware Network Adaptor (192.168.2.123 - VM Network)SERIAL PORTS:      NonePARALLEL PORTS: NoneSTORAGE:Drive        Drive Name        Used (Gb)        Total (Gb)        Datastore        RAID Typec              OS                        5                     8                   SAN1_LUN2        RAID5e              DATA                    2                     5                   SAN1_LUN2        RAID5TOTAL                                  7                    13               

IMPORT SETTINGS:Create a separate disk for each volume:                YESIgnore page file and hibernation file:                      YESInstall VMware tools:                                           YESCustomize the identity of the virtual machine:        NORemove all system restore checkpoints:               YESPower on virtual machine after creation:                NO

Pre P2V Conversion Checklist

This is a checklist to aid in the initial stages of planning a server consolidation. It can be used to assess the current physical server for compatability as a virtual machine. In some cases it may not be possible to convert the physical server due to certain conditions that exist, or the virtual environment

Page 242: Vmware 5.1 Knowledge base doc

may not be able to provide everthing the application requires (possibly USB device access).

1. Check VMware vCenter Converter documentation and release notes for any related known issues to the hardware/software being converted.http://www.vmware.com/support/pubs/converter_pubs.html

2. Decide on the clone method (Hot or Cold).Note: If the source machine is a domain controller, database server, email server,or any other service with frequently changing data, a cold conversion must be performed.Tip: For a domain controller the best way is to create a new virtual machine and promote it to a DC then decommission the old DC.

3. Does the physical machine use serial ports?If yes, it is still possible to P2V, however that VM will need to be resticted to an individual ESX server with the physical serial device attached.

4. Does the physical machine use parallel ports?If yes, it is still possible to P2V, however that VM will need to be resticted to an individual ESX server with the physical parallel device attached.

5. Does the physical machine use and USB devices?If yes, you will need to look into using USBanywhere, which allows to use USB over the network.

6. Check there is enough storage space for the new VM. Take into account the current data size plus growth.Note: Disks can be resized upon conversion so if there is a large quantity of unused space on the physical this can be removed to save space.

7. Check there is enough RAM available in the virtual environment to accomodate the new VMs needs.

8. Check there is enough CPU available in the virtual environment to accomodate the new VMs needs.Note: Physical machines with multiple CPUs but only using single threaded applications should be set to 1vCPU. Adding extra CPUs would waste CPU time / cycles because the applications would not make use of it.

9. Check the network the physical machine is connected to, is available in the virtual environment.

10. Monitor the physical machine for the following utilization metrics:Avg CPU usage (Mhz)Max CPU usage (Mhz)

Avg RAM usage (Mb)Max RAM usage (Mb)

Avg Disk IO ReadsMax Disk IO ReadsAvg Disk IO WritesMax Disk IO WritesNote: This performance information can be used to better specify the virtual machine reservations and limits. The longer this is monitored, the better the idea of its resource usage.

Page 243: Vmware 5.1 Knowledge base doc

 

Tools such as Microsoft Assessment and Planning Toolkit and Novel PlateSpin Recon can be used for gathering all resource utilization metrics. Perfmon can also be used or any other 3rd party monitoring solution including the use of WMI to gather various metrics.

Using this information the P2V conversion can be planned and performed.

Remove Old Hidden Devices from a VM after P2V Conversion

After you have converted a Windows server to a virtual machine, some redundant hardware devices may not be removed in the process.

I have seen this commonly with network devices. When setting the IP in a VM you may get and error saying a network card already has that IP assigned. But there are no other network devices I hear you say. Well there might be, but there hidden and you just need to reveal them and remove them. Its quite easy and this is how you go about doing it:

Open a command prompt on the Windows VM (Start --> Run --> cmd).

set devmgr_show_nonpresent_devices=1

devmgmt.msc

In the device management console (View --> Show Hidden Devices).

Uninstall the devices that are no longer required. Such as old network devices.

Converter Issue with Windows NT and Dell Perc Raid 3 / 4

Trying to hot clone a physical Dell server running Windows NT that has a Dell Perc 3 / 4 Raid Controller does not work.Converter will show the following error upon attempting to connect:"Unable to determine guest operating system".

The converter log shows that it is detecting the right OS at the start:[2008-12-04 10:32:21.990 'App' 354 info] [osInfoWin32,116] Microsoft Windows NT [2008-12-04 10:32:21.990 'App' 354 info] [osInfoWin32,203] Server 4.0 [2008-12-04 10:32:22.006 'App' 354 info] [osInfoWin32,260] Service Pack 6a (Build 1381)

The end of the log shows the specific errors:[#4] [2008-12-04 10:33:24.727 'App' 402 info] [attachedDiskWin32,227] IOCTL_STORAGE_QUERY_PROPERTY not available; assuming device is direct-attached[#4] [2008-12-04 10:33:24.727 'App' 402 warning] [attachedDiskWin32,255] Failed to get capacity for \\.\PhysicalDrive0: error Send a scsi pass-through request to \\.\PhysicalDrive0: Incorrect function (1)[#4] [2008-12-04 10:33:24.727 'App' 402 warning] [attachedDiskWin32,480] Warning: no attached disks were detected.3 2008-12-04 10:47:19.984 'App' 311 warning attachedDiskWin32,255 Failed to get capacity for [#4] [2008-12-04 10:33:24.727 'App' 402 error] [slave,334] No local disks were detected, so no local host config info.[#4] [2008-12-04 10:33:24.743 'App' 407 error] [importSource,335] Unable to read OS info from system disk: vmodl.fault.SystemError[#4] [2008-12-04 10:33:24.743 'App' 407 error] [imageProcessingTaskImpl,552] VmiQuerySourceInfoTask::task{3}: Image processing task has failed with MethodFault::Exception: sysimage.fault.UnableToDetermineGuestOs[#4] [2008-12-04 10:33:24.743 'App' 407 verbose] [imageProcessingTaskImpl,154] VmiQuerySourceInfoTask::task{3}: SetState to

Page 244: Vmware 5.1 Knowledge base doc

error[#4] [2008-12-04 10:33:24.774 'App' 403 verbose] [disposable,122] object explicitly disposed: VmiQuerySourceInfoTask::task{3}[#4] [2008-12-04 10:33:24.774 'App' 403 verbose] [imageProcessingTaskImpl,123] VmiQuerySourceInfoTask::task{3} being destroyed

This is a known issue with perc raid controllers 3 and 4 and Windows NT which does not understand the scsi command "read capacity". It returns "Incorrect function" when handling this scsi pass-through request sent by Converter code to retrieve the disk capacity.http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd =displayKC&externalId=1001559

A way round this is to use the cold clone CD if you have Converter enterprise (because it is based on windows server 2003). VMware are working on a fix to it but aparentley forsee this being fixed in the next release which is Converter 4 in 2009.

Converter Log File Locations

The converter logs show a great deal of useful information. They can be found in the following locations...

Converter Agent Logs (on the source computer):C:\WINDOWS\Temp\vmware-temp\vmware-converter-index (to find out log file number)C:\WINDOWS\Temp\vmware-temp\vmware-converter-0.log

Converter Logs (on the computer running Converter):C:\Documents and Settings\Administrator\Local Settings\Temp\1\vmware-temp\vmware-client-index (to find out log file number)C:\Documents and Settings\Administrator\Local Settings\Temp\1\vmware-temp\vmware-client-log-0.log

Converter - Ports Used

Overview of ports:139, 443, 445, 902

Details of ports and direction:Converter --> Physical 445 + 139Converter --> VirtualCenter 443 (If Converter on same server as VirtualCenter N/A)Converter --> ESX 443Physical --> VirtualCenter 443Physical --> ESX 443 (902 for converter 3.0.1)

Find VMs and information - vcbvmname.exe

vcbvmname.exe can be used to find out a VMs name, IP address, ID and hostname. It can be found in \Program Files\VMware\VMware Consolidated Backup Framework along with the rest of the VCB commands.

Here is an example of the command:vcbvmname -h vcserver -u vcbuser -p secretpass -s Any:

Found VM:moref:vm-6354name:ExampleVM1uuid:31458901-2535-c376-1f56-5984ba3685d2ipaddr:192.168.1.2

Page 245: Vmware 5.1 Knowledge base doc

VCB Process

This is the process that VCB takes to backup a VM.

Using your backup software create a backup job for the VM(s) you want to backup. The backup jobs purpose is to backup a location on the VCB server. You will know the location once you determine what type of VCB backup you are going to perform.See Image‐level virtual machine backups.See File‐level backups.

When the backup job is launched, the following steps take place:Step 1The backup software calls the pre‐backup script.

The pre‐backup script does the following:1. Runs a pre‐freeze script in the VM. The pre‐freeze script prepares the VM for backup. (this is optional)

2. Quiesces NTFS and FAT file systems inside the VM (only for VMs running 32‐bit versions of Windows XP, Windows 2000, or Windows 2003). This ensures that no file system writes are pending at the time the snapshot is taken, allowing the creation of file‐system consistent backups.

3. Puts the virtual machine into snapshot mode.

4. Unquiesces the NTFS and FAT file systems that were quiesced.

5. Runs a post‐thaw script in the VM. (this is optional)

6. Makes the VM snapshot available to the 3rd party backup software:See Image‐level VM backups.See File‐level VM backups.

Step 2The backup software performs a backup of the VM snapshot.

Step 3The backup software runs a post‐backup script, which does the following:

1. Unmounts the VM snapshot from the backup proxy.

2. Takes the VM out of snapshot mode. Commits changes made while the VM was in snapshot mode.

Full Virtual Machine Backup

A full virtual machine backup is a backup of all the files that make up the virtual machine. These are:.vmx Virtual machine configuration.nvram VM BIOS.vmdk Virtual disk.vmsd Dictionary for snapshots and associated disk.vmss Virtual machine suspend file-Snapshot#.vmsn Virtual machine configuration of a snapshot-flat-vmdk Disk that contains the data-f001.vmdk First extend of preallocated disk split into 2gb files-s001.vmdk First extend of growable disk split into 2gb files-delta.vmdk Snapshot differences file

Page 246: Vmware 5.1 Knowledge base doc

To perform a full backup of a virtual machine (the above files) you need to run this command on the VCB Proxy Server:vcbMounter -h 192.168.1.123 -u vcbuser -p vcbpass -a name:VM1 -t fullvm -r C:\VCB-Backups\VM1-full

View, Start and Stop Remote Tech Support Mode (TSM-SSH) on All ESXi Servers - PowerCLI Get-VMHostService

Ive started using PowerCLI a bit more in day-to-day situations, and i'm finding it rather useful. Once youve got your head round the syntax and the available cmd-lets its a viable time saving option, especially as you grow your little repo of reusable scripts. Here is one of mine that I made today...I had the need to enable "Remote Tech Support Mode" (TSM-SSH) on all ESXi 4.1 servers for various reasons then disable it again.Not favouring the manual process of going into each host in vCenter --> Host --> Configuration --> Security profile etc etc I wanted to be able to run a script that would do this for me. And confirm afterwards I had turned it all back off.That resulted in the following 3 PowerCLI scripts for viewing, starting and stopping the TSM-SSH service on all ESXi servers.

Note: Before running remember to run "Connect-VIServer vcenter.domain.local"

ViewServiceSSH.ps1 function ViewServiceSSH { $VMHost = Get-VMHost foreach ($VMHost in $VMHost) {   Get-VMHostService -VMHost $VMHost | where {$_.Key -eq "TSM-SSH"} | Select @{N="VMHost";E={$VMHost.Name}},Key,Running  }}ViewServiceSSH

Example Output:

StartServiceSSH.ps1 function StartServiceSSH { $VMHost = Get-VMHost foreach ($VMHost in $VMHost) {   Get-VMHostService -VMHost $VMHost | where {$_.Key -eq "TSM-SSH"} | Start-VMHostService  }}StartServiceSSH

StopServiceSSH.ps1 function StopServiceSSH { $VMHost = Get-VMHost foreach ($VMHost in $VMHost) {

Page 247: Vmware 5.1 Knowledge base doc

   Get-VMHostService -VMHost $VMHost | where {$_.Key -eq "TSM-SSH"} | Stop-VMHostService  }}StopServiceSSH

Rescan All ESXi Server HBAs - PowerCLI

 

So you've just created an additional LUN/volume and presented it to all your ESXi servers?

Now you want to rescan the HBAs on the servers so you can start using the storage, but you dont fancy manually doing this on say 10 or maybe even 100 servers.

 

Here is a very handy piece of VMware PowerCLI that will connect to your vCenter Server, get the list of clusters and hosts, then rescan all the HBAs on those hosts (ESX/ESXi). 

 

Connect-VIServer vcenter.domain.local

Get-Cluster | Get-VMHost | Get-VMHostStorage -RescanAllHBA

 

Note: Don't forget to change vcenter.domain.local to your vCenter server!!

 

PowerCLI - List All ESXi Hosts Network Info (and Output to CSV)

 

Before performing a piece of network maintenance I wanted ensure I had an up-to-date list of network information for all ESXi servers.

I was apprehensive to refer to old documentation incase something had changed.

To do this I used PowerCLI, specifically "Get-VMHostNetworkAdaptor" to retrieve a current set of information from all VM hosts containing networking information.

 

 

 

 

Page 248: Vmware 5.1 Knowledge base doc

List VM host network details and output to the PowerCLI console:

Get-VMHostNetworkAdapter | select VMhost, Name, IP, SubnetMask, Mac, PortGroupName, vMotionEnabled, mtu, FullDuplex, BitRatePerSec

 

 

Output to CSV VM host network details:

Get-VMHostNetworkAdapter | select VMhost, Name, IP, SubnetMask, Mac, PortGroupName, vMotionEnabled, mtu, FullDuplex, BitRatePerSec | Export-Csv C:\VMHostNetworkDetails.csv

 

Example CSV Output: 

 

 

  

PowerCLI Getting Started

vSphere PowerCLI is a command-line and scripting tool built on Windows PowerShell, and provides more than 200 cmdlets for managing and automating vSphere.

 Download vSphere PowerCLI  Install Guide

Page 249: Vmware 5.1 Knowledge base doc

Admin GuideDevelopers GuideOnline Command Reference  RequirementsTo use vSphere PowerCLI, you need:

.NET 2.0 Service Pack 1 Windows PowerShell 1.0 or Windows PowerShell 2.0 Release To Manufacture (RTM).

If .NET 2.0 is installed without Service Pack 1, some operations might take long to complete.

 Supported PlatformsvSphere PowerCLI 4.0 Update 1 works on the 32-bit and 64-bit versions of the following operating systems:

Windows Vista Windows XP Service Pack 2

Windows Server 2003

 vSphere PowerCLI 4.0 Update 1 supports the following VMware environments

VMware ESX Server 3.5 VMware ESX Server 3i

VMware VirtualCenter 2.5

VMware ESX 3.0 and VirtualCenter 2.0

VMware ESX 4.0 and vCenter 4.0

VMware ESX 4.0 Update 1 and vCenter 4.0 Update 1

 

Page 250: Vmware 5.1 Knowledge base doc

 

  Run the following (In Bold): Set-ExecutionPolicy RemoteSigned Connect-VIServer cmdlet Connect-VIServer at command pipeline position 1Supply values for the following parameters:Server[0]: vc1.vmadmin.localServer[1]:WARNING: There were one or more problems with the server certificate: * The X509 chain could not be built up to the root certificate.

Name                       Port                       User----                       ----                       ----vc1.vmadmin.local       443                        VMADMIN\administrator Example (Get All VMs):Get-VMName                 PowerState Num CPUs Memory (MB)----                 ---------- -------- -----------DC1                 PoweredOn  1        512VC1                 PoweredOn  1        4096

Maintenance mode stuck at 2%

Maintenance mode can get stuck at 2% progress when there are still active VMs running on that ESX host. An ESX or ESXi Server will not complete going into maintenance mode until there are no running VMs running on it.

Page 251: Vmware 5.1 Knowledge base doc

If you have HA configured it should automatically vmotion off the VMs to another ESX host with enough resources. If your also using DRS it will do some load balancing and also work out any affinity rules.

What can stop VMs from vmotioning automatically to another host is: CD/Floppy still attached to VM - If so remove it The virtual machine vNIC is attached to an internal only network or a vSwitch not

available on another ESX server - Check spellings of vSwitches and which network type the VM isconnected to.

VMtools currently installing in the Virtual Machine - Wait for install to complete or cancel the installation.

The virtual machine is stored on a datastore local to that ESX host - The VM needs to be on a centralized datastore (SAN etc) that is availble to another ESX host.

I have also found in a cluster of two hosts (even in VC 2.5 u3 and ESX 3.5 u3) it does not automatically migrate the VMs, and needs to be done manually. This used to work in u1 but was changed from u2 onwards to make harsher HA calculations, hence HA does not allow the VM to be auto migrated to another host.