Escolar Documentos
Profissional Documentos
Cultura Documentos
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 1 Host Profile Issue with local SAS drives - Specification state absent from host 0 1 vCloud Networking and Security - Configuring a vShield Edge Load Balancer 1 1 vCloud Networking and Security - Deploying a vShield Edge Gateway Device 2 1 vCloud Networking and Security - Installing vShield Manager 5.1 3 1 Removing the Cisco Nexus 1000V vSwitch 4 1 VMware vSphere 5.1 Release Announced 5 1 Upgrade vCenter Server 4.1 to 5.0 6 1 vCenter Server 5 Install/Upgrade Warning - The Fully Qualified Domain Name cannot be resolved 7 1 vSphere 5 How To Part 5 Install vSphere Web Client (Server) 8 1 VMware vSphere 5 Resources and How Tos 9 2 vSphere 5 How To Part 4 Configuring vCenter Server (Creating a Datacenter, HA DRS Cluster and 0 Adding a Host) 2 vSphere 5 How To Part 3 Install vSphere Client 5.0 1 2 vSphere 5 How To Part 2 Install vCenter Server 5.0 2 2 Installing VMware vCenter Server 4.1 3 2 AgentUpgradeChecker.exe has encountered a problem and needs to close 4 2 vCenter CapacityIQ - Part 3 - What-If Scenarios 5 2 vCenter CapacityIQ - Part 2 - Dashboard, Views and Reports 6 2 vCenter CapacityIQ - Part 1 - Installing
7 2 vCenter Server Database Retention Policy - Events and Tasks 8 2 Error Applying Host Profile - IP address is used for multiple virtual nics 9 3 Insufficient Memory Resources When Powering on a VM 0 3 Installing Guided Consolidation in vCenter 4.0 1 3 vCenter Service Not Starting - Service Dependancies such as SQL Server 2 3 vSphere Client EMC Storage Viewer Plugin 3 3 Keyboard Shortcuts for vCenter 4 4 3 HA Advanced Options 5 3 vCenter 4 - Creating a Datacenter, HA DRS Cluster and Adding a Host 6 3 Upgrading vCenter Server from 2.5 to 4.0 7 3 vSphere Client - Windows 7 error parsing clients.xml file 8 3 Installing Performance Overview Charts in vCenter 9 4 Updating vCenter Server 2.5 U3 to 2.5 U4 0 4 Alarms and Email Alerts from vCenter 1 4 Deploying from a Template and Using Guest OS Customization 2 4 Licensing - Unable to change license state as the license server is unavailable 3 4 Template Guest Customization - How to Configure vCenter with Sysprep 4 4 Adding an ESX/ESXi host to vCenter 5 4 Installing VI vCenter Server 2.5 U3 6 4 VMware DRS 7 4 VMware HA 8 4 Remove Getting Started Tabs from VI Client 9 5 Virtual machine snaphots
0 5 Maintenance mode stuck at 2% 1 5 License Server - Showing incorrect number of licenses 2 5 Updating vCenter Server Process Overview 3 5 vCenter Service Not Starting - Database Permissions Error 4 5 Files that make up a virtual machine 5 5 License Server 14 day Grace Period 6 5 Virtual Center Services 7 5 Licensing - Installing and updating licenses in VI 8 5 DRS Rules - Keeping VMs on and seperating VMs across physical servers 9 6 Auto Login to Virtual Center with VI Client (Pass Thru Authentication) 0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
vSphere/ESXi 5.1 Guest OS Support Ending Soon Change vmnic order on ESXi Install an update/patch on ESXi Standalone without Update Manager using esxcli Access to resource settings on the host is restricted to the server that is managing it How to Migrate ESX 4.x to ESXi 5.0 vSphere 5 How To Part 1 Install ESXi 5.0 Software iSCSI Initiator with Jumbo Frames vs Hardware dependant iSCSI Initiator without Jumbo Frames Creating/Adding a Raw Device Mapping (RDM) to a Virtual Machine Installing ESXi 4.1 U1 Host currently has no management network redundancy ESX 4.0 486 days uptime How to Resize a VMs Virtual Disk (.VMDK) Updating a standalone ESXi host with vSphere CLI and vihostupdate PCI standard PCI-to-PCI bridge Install Loop - Found New Hardware Wizard after P2V Windows 7 Black Screen / Freezes / No Login Sceen on VMware ESX/ESXi Multiple VMkernel NICs, Round Robin MPIO - DVS and Jumbo Frames Intresting ESX Error on PCIE NIC Fail - Dazed and confused ESX Configuring iSCSI Storage (Advanced with CHAP) Configuring iSCSI Storage (Basic) Creating a VMkernel Port (for ISCSI, vMotion, NFS and FT) on Standard and Distrubuted vSwitches Accessing a VMFS Datastore Snaphot and Resignaturing Changing the Queue Depth on Qlogic Fibre HBAs Intel Gigabit ET 82576 Network Adaptor Driver ESX
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
Guest OS Slow, Freezing or Hanging with Windows Server 2008 R2 or Windows 7 Configuring Active Directory Authentication on ESX ESXi - Accessing the Unsupported Console ESX4 - Disable CTRL+ALT+DEL Keyboard Combination Invokes Shutdown Installing ESX 4.0 Virtual Network Adaptor Types Installing VMware Tools on Windows Server 2008 Server Core Installing VMware Tools Configuring ESX Syslog to a Remote Syslog Server Permissions, Users and Roles on ESX Virtual Machine Automatic Startup and Shutdown Creating a Virtual Machine (Basic Settings) Creating a VMFS Datastore Networking Configuration - vSwitches and Port Groups with 8 Physical NICs Networking Configuration - vSwitches and Port Groups with 6 Physical NICs Networking Configuration - vSwitches and Port Groups with 4 Physical NICs Networking Configuration - vSwitches and Port Groups with 3 Physical NICs Networking Configuration - vSwitches and Port Groups with 2 Physical NICs NIC Teaming ESX and ESXi Server Comparison Networking - 802.1q Trunking Networking - 802.1q Trunking and 802.3ad Link Aggregation using Cisco Switches Releasing Locked Files in a VMFS Volume
47 48 49 50
Soft and Hard Stopping an Unresponsive VM Running ESX 3.5 in Workstation 6.5 Installing ESXi on an IDE drive Advanced HA Options
51 52 53 54 55 56 57 58 59 60 61 62
Virtual Machine - XP guest OS SCSI driver Differences/Comparision between ESX and ESXi Updating ESX - ISO Multipathing Fibre Channel Service Console - Virtual Switch Commands Service Console - Setting the VMkernel Default Gateway Service Console - VMFS Datastores Service Console - ESX Server Firewall Commands Service Console - VSwif Commands Service Console - VMkernel NIC Commands Service Console - Sudoers (Super Users) Service Console - Service Console Default Gateway
SRM SRA Timeout HBA Rescans- Recovered datastore is not visible to host
1 2 3 4 5
vSphere 5 How To Part 6 Install Update Manager 5 VMware Update Manager Error - Session is not authenticated Installing and Upgrading vSphere vCenter Update Manager 4.0 from 3.5 Update Manager Metadata and Update File Location Update Manager (VUM) - Updating ESX Servers
1 2 3 4 5 6 7 8 9 10
Converter PEtool - Add Network and Storage Drivers to the Cold Clone CD/ISO Converter 100% Failed - ERROR: Unknown error returned by vcenter converter agent Converter - File level clone failed - The filename, directory name, or volume label syntax is incorrect Installing and Upgrading vSphere Converter from 3.0 to 4.0 P2V Conversion Plan Info Sheet Pre P2V Conversion Checklist Remove Old Hidden Devices from a VM after P2V Conversion Converter Issue with Windows NT and Dell Perc Raid 3 / 4 Converter Log File Locations Converter - Ports Used
Virtual snaphots
machine
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 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: vCenter Two or more ESX/ESXi Servers in a HA cluster HA licensed on the ESX/ESXi Servers in the HA cluster Central storage (typically a SAN) for the virtual machine files which is available to all ESX/ESXi Servers in the HA cluster The 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.
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 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
AFTER:
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.
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.
It will discover an VMs running on the host the model details of the server. Click Next.
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.
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\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
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.
Along with the following log entries in /var/log/vmware/hostd-X.log dynamicType = <unset>, licenseServer = "27000@vcenter.atbnet.local", 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 haTask--vim.LicenseManager.configureSource-147325 [2009-02-22 19:37:32.023 'PropertyCollector' 98446256 warning] GetPropertyProvider failed haTask--vim.LicenseManager.configureSource-147325 [2009-02-22 19:38:05.421 'PropertyCollector' 21687216 warning] GetPropertyProvider failed haTask--vim.LicenseManager.configureSource-147325 [2009-02-22 19:38:05.423 'PropertyCollector' 21687216 warning] GetPropertyProvider failed 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.
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.
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.
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.
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.
Enter the password and confirm. You can optionally auto login as administrator if you wish. 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.
You can also save this specification for deploying these settings without having to enter them again. Click Next.
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.
Note: Be sure you have set an SMTP server in the virtualcenter configuration under the administration menu.
Once connected right click the vCenter server hostname in the inventory, Click "New Datacenter".
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.
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.
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.
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.
Choose to enable VM monitoring via VMware Tools. Select the sensitivity for monitoring. 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.
Enter the hostname of the ESX/ESXi Server host. Enter a username for the host (root). Enter a password for the host. Click Next.
Review the host details and a list of virtual machines currently running on the host (if any). Click Next.
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.
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!
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.usedefaultisolationaddress Specifies to use the default isolation address or the addresses specified. (True or False) das.failuredetectiontime Failure detection time for host monitoring. The default is 15000 milliseconds das.failuredetectioninterval Heartbeat interval for HA hosts. Default is 1000 milliseconds. das.defaultfailoverhost The host HA fails VMs to. das.isolationShutdownTimeout The time HA waits for a VM to shut down before powering it off. Default is 300 seconds. das.slotMemInMB The maximum bound on the memory slot size. das.slotCpuInMHz The maximum bound on the CPU slot size. das.vmMemoryMinMB Memory resource value assigned to a VM if its not specified or zero. Default is 0 MB. das.vmCpuMinMHz Default CPU resource value assigned to a VM if its not specified or zero. Default is 256MHz. das.iostatsInterval I/O stats interval for VM monitoring sensitivity. Default is 120 (seconds).
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.
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
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
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
Event ID 1000 explains in the description, it could not get the configuration from the database: Event Type: Error Event Source: VMware VirtualCenter Server Event ID: 1000 Description: 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.
Additionally you may see the following events: Event Type: Error Event Source: MSSQLSERVER Event ID: 17187 Description: 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: Error Event Source: Service Control Manager Event ID: 7024 Description: The VMware VirtualCenter Server service terminated with service-specific error 2 (0x2).
Event Type: Error Event Source: Service Control Manager Event ID: 7001 Description: 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.
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.
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).
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.
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.
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...
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).
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.
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:
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.
5. This should correct the problem of multiple virtual nics being defined and allow the host profile to apply correctly.
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!)
2. Check the database retention policy Go to "Database Retention Policy". The default retention policy is to keep tasks and event indefinatley.
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.
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 RAM RAM 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 bit Microsoft SQL Server 2005 Enterprise edition (SP3) 64 bit Microsoft SQL Server 2008 Standard Edition 64 bit Microsoft SQL Server 2008 Enterprise Edition 64 bit
Database Support: 10g Standard edition (Release 2 [10.2.0.4]) 10g Enterprise edition (Release 2 [10.2.0.4]) 10g Enterprise edition (Release 2 [10.2.0.4]) 64 bit 11g Standard edition 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-Bit SQL 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
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.
7. Choose to run the vCenter service under the "SYSTEM" account or recommended userspecified 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.
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.
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
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.
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.
Open the vSphere client in Programs --> VMware --> vSphere Client
Enter the username/password for the server (if ESXi this is "root" and for vCenter this is a Windows Account).
2. Once connected right click the vCenter server hostname in the inventory, Click "New Datacenter".
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.
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.
7. VMware DRS Power Management will be discussed in more detail in another article. Choose "Off" and Click Next.
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.
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.
10. Choose whether to enable VM monitoring via VMware Tools. Select the sensitivity for monitoring if enabled. Click Next.
12. For the swapfile policy choose "Store the swapfile in the same directory as the virtual machine" (This will speed up VMotion). Click Next.
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.
16. Review the host details and a list of virtual machines currently running on the host (if any). Click Next.
17. If running in evaluation mode Click Next. Otherwise enter the license for the correct edition of vSphere.
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.
21. The ESX/ESXi host is added to the HA DRS Cluster including any existing virtual machines.
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.
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.
10. Select the correct storage device to install ESXi on and press "Enter" NOTE: ensure it is not an FC VMFS datastore!
14. Once the installation is complete press Enter to reboot the server and boot the ESXi 5 hypervisor.
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)
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
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"
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
16. Accept the certificate warning by ticking "install the certificate.." and Ignore.
17. The vCenter Server will now show in the list of vCenter servers, confirming it was added successfully.
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.
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.
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
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).
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.
11. Verify the installation destination is correct. Alternativley the updates and patches can be stored in a seperate folder or disk.
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.
16. The installation of the vSphere plug-in will start. Click Next.
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.
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.
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 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.
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....
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
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
2. Note the vCenter installer will detect that an existing version of vCenter is installed and this wil be an upgrade. Click Next.
4. Enter your customer info, username, organisation and license (optional). Click Next.
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.
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).
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!
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
13. Verify the ports to use for vCenter and its services (only change if absolutley neccersary).
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.
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...
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 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.
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"
3. The vCenter Single Sign On installation wizard will start. Good luck! Click Next.
5. Select "Create the primary node for a new vCenter Single Sign On installation"
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.
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:
IMS IDENTITY MANAGEMENT SERVICE RSA, the Security Division of EMC MSSQL
USE MASTER
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 -- 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 ALTER DATABASE [VMware-SSO] SET AUTO_SHRINK ON
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.
13. Enter the account details SSO will run under. Tick to use Network Service.
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..
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.
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.
4. Enter the FQDN for the inventory service. (e.g. vcenter1.vmadmin.local) it's hidden here as it's a customer install!
6. Select the appropriate JVM memory size for your expected end goal deployment size.
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
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...
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
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.
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.
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. 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..
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.
1. In vSphere client under Home --> Host Profiles select Enable/Disable Profile 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"
6. Your cluster should now be complaint remove the 4 device naa device compliance issues.
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/ESXi500201207001.zip
9. Power on and/or vMotion the VMs back (if DRS is not enabled).
~ # ls /vmfs/volumes/50ab7d53-c6c64e41-01a5-001a64239fda ESXi500-201207001.zip
Access to resource settings on the host is restricted to 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.
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
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 industryleading 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 codebase 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:
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
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. 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.
5. Press "Enter"
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.
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"
10. Press "F11" to force the migration and preserve the VMFS datastore.
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.
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: 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.
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.
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.
5. For the disk type choose "Raw Device Mapping" (RDM). Click Next.
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.
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.
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.
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"
5. If there error still shows you need to select the host and click "Reconfigure for HA"
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: diskpart list volume select Volume 0 extend exit
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.)
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.
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.
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.
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 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.
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 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.
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.
3. Modify the syslog config with the line below to log all to a remote syslog server:
4. Restart syslog:
/etc/init.d/syslog restart Shutting down kernel logger: Shutting down system logger: Starting system logger: Starting kernel logger: [ OK ] [ OK ] [ OK ] [ OK ]
/usr/sbin/esxcfg-firewall -o 514,udp,out,syslog
7. Check the syslog firewall port UDP 514 is open:
logger testlogmessage1
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..."
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".
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.
Give the user a name (e.g. bob) and a password. Click "Ok".
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.
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.
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".
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.
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...
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...
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...
Set the amount of virtual network cards you want the VM to have and the networks they should be connected to. Click Next...
A task will run named "Create Virtual Machine". When complete you will be able to power on the VM.
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".
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...
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...
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.
Physical NIC
vmnic0 vmnic1 vmnic2 vmnic3 vmnic4 vmnic5 vmnic6 vmnic7
Virtual Switch
vSwitch0 vSwitch0 vSwitch1 vSwitch1 vSwitch2 vSwitch2 vSwitch3 vSwitch3
Port Group(s)
Service Console Service Console VMkernel (IP Storage) VMkernel (IP Storage) VM Network VM Network vMotion vMotion
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 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
vmnic0 vmnic1 vmnic2 vmnic3 vmnic4 vmnic5
Virtual Switch
vSwitch0 vSwitch0 vSwitch1 vSwitch1 vSwitch2 vSwitch2
Port Group(s)
Service Console Service Console vMotion vMotion VM Network VM Network
Physical NIC
vmnic0 vmnic1 vmnic2 vmnic3 vmnic4 vmnic5
Virtual Switch
vSwitch0 vSwitch0 vSwitch1 vSwitch1 vSwitch2 vSwitch2
Port Group(s)
Service Console + vMotion Service Console + vMotion VMkernel (IP Storage) VMkernel (IP Storage) VM Network VM Network
Physical NIC
vmnic0 vmnic1 vmnic2 vmnic3
Virtual Switch
vSwitch0 vSwitch0 vSwitch1 vSwitch1
Port Group(s)
Physical NIC
vmnic0 vmnic1 vmnic2 vmnic3
Virtual Switch
vSwitch0 vSwitch0 vSwitch1 vSwitch1
Port Group(s)
Service Console + vMotion + VMkernel (IP Storage) Service Console + vMotion + VMkernel (IP Storage) VM Network VM Network
Because service console network traffic is typically very small it can be placed on the same vSwitch as vMotion. 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.
Physical NIC
vmnic0 vmnic1 vmnic2
Virtual Switch
vSwitch0 vSwitch0 vSwitch1
Port Group(s)
Physical NIC
vmnic0 Storage) vmnic1 Storage) vmnic2
Virtual Switch
vSwitch0 vSwitch0 vSwitch1
Port Group(s)
Service Console + VM Network + VMkernel (IP Service Console + VM Network + VMkernel (IP 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.
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:
Physical NIC
vmnic0 vmnic1
Virtual Switch
vSwitch0 vSwitch0
Port Group(s)
Service Console + vMotion + VM Network Service Console + vMotion + VM Network
Physical NIC
vmnic0 (IP Storage) vmnic1 (IP Storage)
Virtual Switch
vSwitch0 vSwitch0
Port Group(s)
Service Console + vMotion + VM Network + VMkernel Service Console + vMotion + VM Network + VMkernel
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
vmnic0 vmnic1
Virtual Switch
vSwitch0 vSwitch1
Port Group(s)
Physical NIC
vmnic0 vmnic1
Virtual Switch
vSwitch0 vSwitch1
Port Group(s)
Service Console + vMotion + VMkernel (IP Storage) VM Network
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.
Core hypervisor functionality Virtual SMP VMFS VirtualCenter Agent Update Manager Consolidated Backup High Availability VMotion Storage VMotion DRS DPM
Rdv Rdv Rdv Rdv Rdv Rdv Rdv Rdv Rdv Rdv Rdv
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 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-vswitch esxcfg-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 operation Use ALL to set VLAN IDs on all portgroups -v|--vlan=id Set vlan id for portgroup specified by -p 0 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
NOTE: Useful to remember for esxcfg-vswitch use lower case switch for the switches. Upper case switch for port groups.
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, 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 trunking Make the port a trunk port interface GigabitEthernet1/13 description ESX Server 1 switchport trunk encapsulation dot1q switchport mode trunk switchport nonegotiate spanning-tree portfast trunk end NOTE: You cannot use VLAN 1 in virtual switches with trunking because the traffic is not tagged.
Logon to the ESX Server that was last running the VM.
Dump the log information:
vmkfstools -D /vmfs/volumes/path/to/myvm1
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 4154368 Dec 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-cb2591a3eb657-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
Failing that crash the VM and get the logs (run in a directory with some space to spare):
vm-support -x vm-support -X vmid#
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
Failing that crash the VM and get the logs (run in a directory with some space to spare):
vm-support -x vm-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 that's why testing is important):
Recovered VMFS datastore 'snap-xxxxxxxx' is not visible or not mounted on host 'esxixxxxxx' 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 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.
3. For each vNIC you can change the IP settings, select the appropriate "IP Settings - NIC #" and tick "Customize IP Settings during recovery"
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.
5. Note the protected site IP settings are now populated. Now click "Configure Recovery" which will configure the IP settings for the DR site.
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
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 Windows Windows Windows Windows Windows Windows Windows Windows Windows Windows Windows Windows Windows 2000 Advanced Server (SP4 with Update Rollup #1) 32-bit 2000 Advanced Server (SP3, SP4) 32-bit 2000 Advanced Server 32-bit Server 2003 Datacenter Edition R2 32-bit & 64-bit Server 2003 Datacenter Edition (SP1, SP2) 32-bit & 64-bit Server 2003 Datacenter Edition 32-bit & 64-bit Server 2008 Standard Edition R2 64-bit Server 2008 Standard Edition R2 SP1 64-bit Server 2008 Standard Edition (SP1, SP2) 32-bit & 64-bit Vista Business (SP1, SP2) 32-bit & 64-bit Vista Business 32-bit & 64-bit XP Home Edition (SP1, SP2, SP3) 32-bit XP Home Edition 32-bit XP Professional Edition (SP2) 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.
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)
3. In the VM Recovery Properties dialog for the VM, navigate to "VM Dependencies"
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.
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.
There was an error connecting to the VMware vCenter Update Manager [servername:8084]. : Vmomi.Fault.NotAuthenticated : The session is not authenticated.
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 with Update Manager and the client. C:\Documents and Settings\All vmware-vum-server-log4cpp.log vmware-vum-server-logXcpp.log Users\Application Data\VMware\VMware Update Manager\Logs\
[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
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.
There is a related VMware KB on this error but it did not apply to my issue. http://kb.vmware.com/kb/1011858
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 network and storage drivers into the coldclone.iso
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....
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 machine ERROR: 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\sy stem32\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} [#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 04C8860C5DE4-4917-942D-DC21D35C5431 [2010-07-02 06:00:49.484 'App' 532 verbose] CloseSession called for session id=04C8860C-5DE44917-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 AE86C5F9CF2A-4DB3-8079-1C22BFC0827D [#3] [2010-07-02 16:07:17.328 'App' 1620 info] Stopped impersonating in session AE86C5F9-CF2A4DB3-8079-1C22BFC0827D [2010-07-02 16:07:17.359 'App' 1620 verbose] CloseSession called for session id=AE86C5F9-CF2A4DB3-8079-1C22BFC0827D [2010-07-02 16:07:17.359 'VmdbAdapter' 1620 verbose] Removed vmdb connection /db/connection/#3
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.
Click Next.
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.
Go to the vCenter plugin manager. Right click "VMware Converter Enterprise" plugin and install the client plugin.
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.
Summary P2V Conversion Information Date: 01-01-2008 Start Time: 18:00 Type: Hot Clone (Manual) OS: Windows Server 2003 Standard (Service Pack 1) Role: Domain Member (mydomain.local) Disk Resize: YES
Agent:
Remote
Details of what server is used for: Web server running IIS for website intranet.mydomain.local SOURCE SERVER (PHYSICAL) SPECIFICATION: MAKE: Dell MODEL: PowerEdge 2650 CPU: 2 x 2.4ghz Intel Xeon RAM: 2048mb NETWORK: 2 x Broadcom NetXtreme Nics (NIC1 192.168.2.123, NIC2 disabled) SERIAL PORTS: None PARALLEL PORTS: None STORAGE: Physical Used By Drive(s) Disks Raid Type Disk Speed Total Size (Gb) c, e 2 x 73Gb RAID1 15k 73 Logical Drive c e TOTAL Drive Name OS DATA Used (Gb) 5 2 7 Total (Gb) 12 60 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: None PARALLEL PORTS: None STORAGE: Drive Drive Name Used (Gb) Total (Gb) Datastore RAID Type c OS 5 8 SAN1_LUN2 RAID5 e DATA 2 5 SAN1_LUN2 RAID5 TOTAL 7 13 IMPORT SETTINGS: Create a separate disk for each volume: Ignore page file and hibernation file: Install VMware tools: Customize the identity of the virtual machine: Remove all system restore checkpoints: Power on virtual machine after creation: YES YES YES NO YES NO
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 Reads Max Disk IO Reads Avg Disk IO Writes Max Disk IO Writes Note: 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.
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 .
[#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 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.
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 Imagelevel virtual machine backups. See Filelevel backups. When the backup job is launched, the following steps take place: Step 1 The backup software calls the prebackup script. The prebackup script does the following: 1. Runs a prefreeze script in the VM. The prefreeze 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 postthaw script in the VM. (this is optional) 6. Makes the VM snapshot available to the 3rd party backup software: See Imagelevel VM backups. See Filelevel VM backups. Step 2 The backup software performs a backup of the VM snapshot. Step 3 The backup software runs a postbackup 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.
-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 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\VM1full
View, Start and Stop Remote Tech Support Mode (TSMSSH) 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) { Get-VMHostService -VMHost $VMHost | where {$_.Key -eq "TSM-SSH"} | Stop-VMHostService } } StopServiceSSH
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).
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.
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
Supported Platforms vSphere 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
Set-ExecutionPolicy RemoteSigned Connect-VIServer cmdlet Connect-VIServer at command pipeline position 1 Supply values for the following parameters: Server[0]: vc1.vmadmin.local Server[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 ------vc1.vmadmin.local 443
Example (Get All VMs):
User ---VMADMIN\administrator
PowerState Num CPUs Memory (MB) ---------- -------- ----------PoweredOn 1 512 PoweredOn 1 4096
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.