Académique Documents
Professionnel Documents
Culture Documents
However vSphere Web Client since its 5.0 release though 5.1 and including the latest version at time
of writing 5.5 U2, if you install vSphere Web Client to any directory other than the default installation
directory you will get the following error when browsing to the vSphere Web Client page.
I've seen this problem for a while now and just tried latest release 5.5 U2b hoping it had been
resolved (I couldn't find a reference in the release notes).
Unfortunately it is still a problem and while the rest of the components such as Single Sign On,
Inventory Services and vCenter Server can be installed to another drive letter or directory, the
vSphere Web Client must still be installed to the default directory of C:\Program
Files\VMware\Infrastucture
If you've installed vSphere Web Client to anything other than the default directory and getting the
error above, the only way to resolve this is to uninstall and re-install to the default installation
directory provided by the wizard.
First and foremost it's worth pointing out this is completed unsupported by VMware. VMware's
advise and supported method is to reinstall SSO.
The first options is to simply check the password for the SSO DB in clear text which may be the
same as the SSO admin user password.
The second is to update the SSO SQL database admin users password hash, to essentially change
the password hash to a password has we know and will change later.
Option A - If your lucky you might be able to find the password this way..
1. Check this file to see if the password used for the SSO SQL database user was the same as the
password used for "admin@System-Domain"
C:\Program Files\VMware\Infrastructure\SSOServer\webapps\lookupservice\WEB-
INF\classes\config.properties
Note: You will need to change the drive letter to where you install vCenter SSO to if different to C:
2. The password used for the SQL Server database is on this line "db.pass="
## Jdbc Url
db.url=jdbc:jtds:sqlserver://;serverName=;portNumber=1433;databaseName=sqldb1sso
## DB Username
db.user=svcvc1sso
## DB password
db.pass=Password123
## DB type
db.type=Mssql
## DB host
db.host=sqldb1.vmadmin.co.uk
Option B - This should work if you do not know the SSO master password for
"admin@System-Domain" and wish to reset it..
1. Open SQL Server Management Studio and connect to SQL server hosting SSO (RSA) database
2. Backup the SSO RSA database so you can restore it if there is a problem
3. Run the following SQL script on the SSO RSA database to set the "admin" users password hash
to "VMware1234!"
Note: You can change the password later, for now we will set it to the above password to save re-
installing SSO.
UPDATE
[dbo].[IMS_PRINCIPAL]
SET
[PASSWORD] = '{SSHA256}KGOnPYya2qwhF9w4xK157EZZ/RqIxParohltZWU7h2T/VGjNRA=='
WHERE
LOGINUID = 'admin'
AND
PRINCIPAL_IS_DESCRIPTION = 'Admin';
3. If you try to login to vSphere Web Client at this point you may get the following message about
your password has expired.
5. Navigate to the ssolscli directory (change to the directory you installed vCenter SSO to)
cd "C:\Program Files\VMware\Infrastructure\SSOServer\ssolscli"
9. Now you can logon to the vSphere Web Client with the following credentials:
admin@System-Domain
VMware1234!
10. Change the password for the account and keep a record of it!
11. It would also be adventageous to add a domain user or group to the SSO administrators group.
I just had an issue with vCenter 5.5 and ESXi 5.5 where I was unable to power on a VM.
The error which I was faced with was a relatively generic message based on the host connection
status.
"The operation is not allowed in the current connection state of the host"
The ESXi server itself was connected to vCenter and had a number of VMs already powered on and
working correctly.
However I noticed that the CPU and Memory utilisation statistics for the ESXi server were showing
as zero "0" used, odd because there were 3 VMs already powered on using CPU and memory
resources.
With my running VMs still powered on, I disconnected this host from vCenter (waited about 1 min),
then connected the host back to vCenter.
The ESXi server CPU and memory statistics were now showing correctly for my powered on VMs.
This is the first time I have seen this host connection issue with vCenter 5.5, if it happens any more I
will update my comment here and report a bug to VMware.
Host Profile - HA DRS Cluster Non
Compliant - FT logging is not enabled
Compliance of a cluster is checked based on various factors, depending on if you have HA enabled,
DRS enabled or both!
HA and DRS
FT logging NIC speed is at least 1000 Mbps.
At least one shared datastore exists.
FT logging is enabled.
VMotion NIC speed is at least 1000 Mbps.
All the hosts in the cluster have the same build for Fault Tolerance.
The host hardware supports Fault Tolerance.
VMotion is enabled.
DRS only
VMotion NIC speed is at least 1000 Mbps.
VMotion is enabled.
At least one shared datastore exists.
HA only
FT logging NIC speed is at least 1000 Mbps.
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..
Storage of course is an important part of this, as we need to ensure all hosts can see the same
datastores, the same pathing policy configured etc.
If not we want an alert to tell us this so we can correct - even perhaps automagically with host
profiles!
However local SAS drives within the ESXi server can be detected as remote storage devices, which
as you can imagine can cause an issue with this compliance checking.
If this is the case the local SAS drive "naa.xxxxx ID" needs to be presented to each ESXi server to
tick the compliance box, but thats not possible as it's a local disk.
In such case you wll come across the following errors in your host profile checks. Attempting to
remediate will not resolve the problem.
Specification state absent from host: device '<datastore>' state needs to be set to 'on'
Host state doesn't match specification: device '<datastore>' needs to be reset
Specification state absent from host: device '<datastore>' Path Selection Policy needs to be set to
'VMW_PSP_FIXED'
Host state doesn't match specification: device '<datastore>' Path Selection Policy needs to be set to
default for claiming SATP
To my knowledge there is no way of getting the local SAS to disk not show as remote storage so all
you can do is disable this part of the check in the host profile.
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.
Removing the Cisco Nexus 1000V vSwitch
This is a guide to removing the Cisco Nexus 1000V DVS and VSM virtual machine cleanly from your
hosts and vCenter Server.
DO NOT TRY TO DELETE THE NEXUS DVS OR VSM VM DIRECTLY!! This needs to be
performed in a specific way (very strightforward when you know how), the DVS is removed via the
the Nexus VSM so this is the last part to be deleted - Don't do it first!
2. If you have not done so already ensure they are no VMs connected to the Nexus DVS port
groups.
If there are still VMs connected to the Nexus 1000V port groups you need to migrate them all to
another vSwitch/dvSwitch port group now.
Of course you will need to make sure the the new port groups are configured as required and any
physical uplinks have the correct settings such as allowed VLANs etc (but thats out the scope of this
article).
3. Remove the ESXi hosts from the Nexus vSphere Distributed vSwitch.
This is a pretty simple step and performed the same way as a normal dvSwitch.
Provided there are no VMs connected to the dvSwitch then this remove operation will complete
successfully, if not you will need to see whats still connected.
7. If you try to right-click remove the Nexus dvSwitch from vCenter at this point you will get
the following error message:
Don't get ahead of yourself! We need to unrelate the Cisco Nexus 1000V VSM from vCenter first,
which then removes all the dvSwitch port groups, uplinks and switch automatically for us.
8. Connect to the Cisco Nexus 1000V VSM either via SSH or VM console
9. Check that the Cisco Nexus 1000V VSM is connected to vCenter Server
If the VSM is not connected to vCenter the next operations will fail to remove the DVS.
Ensure that the operational status and sync status are "connected" and "complete" by running "sh
svs connections"
If its not connected try pinging, checking the vNIC is connected, reboot the VSM to see if it
reconnects at boot etc.
NEXUS1000V-VSM# conf t
Enter configuration commands, one per line. End with CNTL/Z.
NEXUS1000V-VSM(config)# svs connection vcenter
NEXUS1000V-VSM(config-svs-conn)# no vmware dvs
This will remove the DVS from the vCenter Server and any associated port-groups. Do you really
want to proceed(yes/no)? [yes] yes
Note: Command execution in progress..please wait
NEXUS1000V-VSM(config-svs-conn)# exit
NEXUS1000V-VSM(config)# exit
NEXUS1000V-VSM#
11. After running the above commands you will see vCenter Server kick off a number of
tasks, removing the port groups and finally the Cisco Nexus 1000V DVS.
13. Now we are almost there but there is still a plugin showing in plug-in manager that needs
removing. Note down the unique plug-in name e.g. "Cisco_Nexus_1000V_590855575"
14. Open up IE and browse to the vCenter MOB (Managed object browser)
21. Close and re-login to vCenter with the vSphere Client, you will now also see the plug-in
has been removed from plug-in manager.
And there we have it - The Cisco Nexus 1000V dvSwitch and VSM have been successfully removed
correctly, including the vSphere plug-in.
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.
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!)
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.
Error Applying Host Profile - IP address is
used for multiple virtual nics
I had created a host profile from an identical server (NICs etc) and applied to a fresh install of ESX 4.
However it failed for a couple of reasons half way though applying. At this point it had converted
the standard virtual switch (SVS) to several DVS distributed virtual switches (DVS), and moved the
pNICs as part of this. After correcting the problem I went back to continue to apply the profile to the
server to complete the remaining parts (firewall etc) however I received the following error:
"IP Address <ip.add.re.ss> is used for multiple virtual nics"
There was little to no information about this occuring for anyone so this is what I did...
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.
When powering on a virtual machine you may get the following error relating to resources:
Aside from having enough physical memory and options for overcommitment, page sharing etc...
Resource pools are a very common cause of this issue.
To power on the VM the resource pool needs at least enough memory the VM is configured for (in
this case the VM is set to 512 MB Memory).
To solve this problem two different routes can be taken.
Expandable reservation can be turned on for the resource pool and this will then use the parent or
root resource pool.
Configure the correct amount of resource reservation (with surplus if required) for the virtual
machines that are to be powered on in the resource pool.
After configuring the correct resources for the resource pool and hence the virtual machines within it,
the virtual machine can now be powered on.
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>]
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
By doing so will ensure the "VMware VirtualCenter Server" service starts after its required services
have started.
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.
However it can be configured so that you get email alerts when these alerts trigger between a
certain status.
Choose the Alarm you want to setup and email notification for right click "Edit Settings".
In the Alarm Settings dialog go to the "Actions" tab.
Add an action to "Send a notification email" and set an email address as the value.
Tick the status changes you want to be emailed about. Click Ok.
Now when there is a status change in the defined trigger you will receive an email alert.
Note: Be sure you have set an SMTP server in the virtualcenter configuration under the
administration menu.
Say you have a test server that you are constantly deploying to test various senarios.
Installing the OS, applications and configuring it can be very time consuming. After a while even
though you have done it a thousand times you forget to do something in the right order and have to
start over.
This is where templates will make you sane again.
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.
Configure the network settings. Click Next.
You can also save this specification for deploying these settings without having to enter them again.
Click Next.
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.
I was checking the current licensing numbers via VirtualCenter and the FlexLM license server. It was
showing there were 8 x 1/cpu for each product (ESX, HA, DRS etc). This is double what it actually
shows in the license portal.
I double checked what I was supposed to have and it is indeed 4 x 1/cpu licenses. I have found that
each time a license file is generated via the vmware portal, if the license file is added with the old
one and reloaded, it adds the licenses together, hence 8.
Now I know the cause, I have removed all the files and just have the one generated license file now
which is correct (4 x 1/cpu).
I made VMware support aware, as anyone out there who is not so honest may be able to take
advantge of this licensing flaw.but it took some explaining to two different people. One first said that
it is supposed to show as double in VirtualCenter! Anyway if you inherit a VI from anyone and see
more licenses than you thought you had, its probably not right, check it.
When a virtual machine is created and not powered on, these are its files:
When a virtual machine is powered on ans has a snapshot, these are its files:
1. Login to the VMware website and download the license file (.lic) from the account area.
2. Login to the vCenter Server or server running the FlexLM license service. If updating the licenses
save the current license file in C:\program files\vmware\vmware license
server\licenses\vmwarelicense.lic to a backup directory such as C:\program files\vmware\vmware
license server\licenses-backup\
4. Open Flex License Manger (Start -->Programs --> VMWare --> VMWare License Server -->
VMware License Server Tools)
9. You will see your license file information in the "Server Status" tab, review this for correctness.
12. Log into Virtual Center with VI client. Go to Administration --> VirtualCenter Management Server
Configuration. Untick "Evaluate VirtualCenter Server". Set the location of your license server and if
you want these setting to apply to all ESX hosts. Click "OK".
You might want to do this if you have a microsoft cluster in virtual machines and want to ensure that
both cluster node VMs are always on different physical servers. In the meantime you can also
benefit from vmotion using DRS of these virtual machines to other physical ESX servers, provided
that they are seperate.
1. Right click on the DRS cluster that contains the VMs you want to keep together or seperate.
4. If any rules already exist you will see them here. To create a rule click "Add".
5. A dialog box will then be displayed. Enter a name for the rule.
5. Choose the type of rule "Seperate virtual machines/Keep virtual machines together".
6. Click "Add" to select the virtual machines the rule applies, then click ok then ok again.
7. You will now see your new rule. Click ok to save and exit the settings.
The default pathing policy for a LUN can be changed (for example from Fixed to Round Robin). This
can be a LUN on an iSCSI or FC array (or FCoE for that matter).
When I refer to pathing policy I'm refering to what you may have seen if you've ever clicked manage
path's on a VMFS datastore and see it set to Fixed, Round Robin (RR) or Most Recently Used
(MRU).
In this example I will be changing the default pathing policy for an EqualLogic array from Fixed to
Round Robin.
Before I get into how to change the multi-pathing policy, it's important to understand the below 3
plugins (NMP, SATP and PSP):
NMP (Native Multipathing Plugin) is an extensible multipathing module within ESXi. "esxcli storage
nmp" can be used to manage devices associated with NMP and to set path policies. SATPs and
PSPs are plugins within the NMP plugin.
SATP (Storage Array Type Plugin) determines how path failover is handled for a specific storage
array.
PSP (Path Selection Plugin) determines which physical path is used to issue an I/O request to a
storage device.
The PSP as shown below can be set manually per LUN and per ESXi server. Note the SATP is
shown and not changeable (e.g. VMW_SATP_EQL for a Dell EqualLogic iSCSI array in this case).
Of course changing it this way is a very slow and tedious process, and does not account for new
LUNs created in the future.
So we need a way to change the PSP for all the LUNs on an ESXi server and set it to default for any
new ones we create in the future. Enter "esxcli" ta-da!
With "esxcli storage nmp satp" commands we can list and set the PSP used for specific SATP's.
1. Run the following command to list all the SATP's and their default PSP
The following command changes the default PSP for all LUNs using that SATP. So in this case all
EqualLogic LUNs will be changed to use the Round Robin PSP.
4. For the change to take affect, the ESXi server must be restarted.
Ensure your host is in maintenance mode and VMs are either powered off or vMotioned to another
host before doing do.
5. Once the server has restarted if you go back to view "Manage Paths" on the LUN you will see it
has now changed to Round Robin.
6. Now you can repeat process this for all your remaining ESXi servers.
OR
Why not use power of host profiles to use this as a reference host and apply this as the default PSP
for the SATP on other hosts and monitor them for compliance in case someone changes it in the
future or rebuilds a host and forgets!
Disk Consolidation Needed - Unable to
access file since it is locked
After deleting snapshots on a VM either by deleting an individual snapshot or selecting "Delete All"
snapshots, you may see the following warning for the VM, stating that disk consolidation is needed.
This can occur when a snapshot has been deleted and removed from snapshot manager, but the
consolidation of the VMDKs on disk have failed.
You can initiate a consolidation of the VMDKs manually by right clicking on the VM and
selecting Snapshot --> Consolidate.
However the consolidate operation may fail again, if the issue which caused the snapshot deletion
operation to fail disk consolidation previously has not been cleared.
It has been a good 6 months or more since I've last seen this issue, but today I found a VM with this
issue in another customers environment.
Shutdown guest OS and power off VM (it's not always possible to do this but I could here)
Create a new snapshot
"Delete All" snapshots
vMotion to another host
Try VM -> Snapshot -> Consolidate
But this did not clear the locked file error as shown below:
Keen to locate the problem I SSH'd to the ESXi server and checked the hostd.log
Even with the VM still powered off, I could see it was having a problem locking one of the VMDKs
when tying to run the Snapshot -> Consolidate task.
tail -f /var/log/hostd.log
I then ran the following command to locate which host(s) had the lock on the VMDK stated in
hostd.log
vmkfstools -D /vmfs/volumes/yourvolume/yourVM/yourlockedVM.vmdk
I could see a single entry for "RO Owner" which had the lock and the MAC address ending in "69a0".
This is the ESXi server which has the lock on the VMDK file.
Next locate which ESXi host has a network adaptor with that MAC address.
Once confirmed I placed the host in maintenance mode, DRS vMotioned all VMs to another host in
the cluster and restarted the hostd service.
/etc/init.d/hostd restart
Once the hostd service had restarted I performed a Snapshot -> Consolidate on the VM and it
completed successfully.
This issue can often occur when a virtual machine backup solution creates a lock on a VMDK and
fails to correctly release it.
In this case the snapshot which had been deleted, was left over from an automated backup
snapshot which had not been removed by the backup solution once it had completed.
1. Use vSphere Client to connect to your ESXi host (or vCenter server)
2. Browse a VMFS datastore (e.g. the local ESXi VMFS datastore if it has one)
3. Upload your VMware ESXi update/patch (.zip file) to the VMFS datastore
4. Put your host in maintenance mode (VMs will need to be powered off or vMotioned to other hosts
if in a cluster)
Note: You may need to start the SSH service (under Configuration --> Security Profile)
reboot
9. Power on and/or vMotion the VMs back (if DRS is not enabled).
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.
I havent managed to get to the bottom of it yet as it occurs only now and again, maybe its something
particular to that server and driver signing?!
However its fixable just by manually going through (Next --> Continue Anyway) 32 times to install the
driver. It will stop after 32 times, check device manager (devmgmt.msc) to confirm all drivers are
installed.
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.
Share this blog post on social media:
Tweet
inShare
Intresting ESX Error on PCIE NIC Fail -
Dazed and confused ESX
Today I found an intresting error on an ESX server service console. The ESX 4.0 U1 server
displayed for following error...
Pressing F12 on the ESX service console to view the log displayed the following:
Which also confirms the cause to some VMs losing network connection due to a physcial PCI-E NIC
failure.
Even though a NIC had failed the ESX server continued to run but there were no reports of the
failure in the hardware tab or via an email from vCenter. It was only highlighted from the orange
flashing light on the physical server being noticed by a colleague.
vMotion
iSCSI
NFS
Fault Tolerance
Without a VMkernel port none of these services can be used on the ESX server.
This is a prequisite before Configuring iSCSI Storage (Basic) or Configuring iSCSI Storage
(Advanced with CHAP) and Creating a VMFS Datastore.
This is how to create and configure a VMkernel port on an ESX server using a standard vSwitch (the
process is the same on a distributed vSwitch - its just under the DVS view in the same section).
This assumes you already have a vSwitch (standard or distributed) with pNICs and appropriate
connections the the physical network.
2. On a specific host, navigate to the "Networking" section within the "Configuration" tab .
3. On the desired vSwitch (with pNICs and appropriate connections the the physical network), Click
"Properties".
Enter the VLAN ID if the pNICs connected to the vSwitch are trunk ports and you have a specific
VLAN for this traffic (e.g. a dedicated storage VLAN).
Now if the port will only be used for storage services (iSCSI and NFS), Click Next.
If the port will be used for all VMkernel services (iSCSI, NFS, vMotion and FT), tick the additional
boxes to allow this port to be used also for those services, Click Next.
7. Enter an IP address to assign to the VMkernel port (this is in addition to the service console).
Typically the VMkernel and service console networks are on different subnets (seperated using
VLANs)
Click Next.
8. Review the settings for the VMkernel port. Click Finish to create the port.
9. The port is created and visible within the vSwitch properties. They can be edited here if required.
Click Close.
10. The VMkernel port is now visble in the networking view of the ESX server "Configuration" tab
along with its IP address.
Now the VMKernel port has been created iSCSI can now be used. This is a
prequisite before Configuring iSCSI Storage (Basic) or Configuring iSCSI Storage (Advanced with
CHAP) and Creating a VMFS Datastore (on SANs).
There is an issue with a Guest OS of either Windows Server 2008 R2 or Windows 7 running on
VMware ESX/ESXi 4.x with VMware Tools installed. The display driver SVGA-II freezes
intermittently and sometimes permanently requiring reset of the VM.
This is a display driver issue which is resolved in the latest VMware Tools in ESX/ESXi 4.0 Update
1.
However manual intervention is also required after updating to the latest VMware Tools to
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.
However if you know what your doing it can be useful for getting to the bottom of a problem before
calling VMware about an issue.
And there you are, so blindingly obvious its unsupported! So use with caution. It runs a very light
version of Linux called Busybox.
If you are not using vCenter or only want to give a specific person access to an ESX server to do a
specific task then here is how to do it...
First connect to the ESX server with VI client (it will need to have full admin right e.g. root).
If you want the user to only do certain tasks then we first need to create a role.
The roles can be found under the "Administration" button and the "Roles" tab.
Click on the ESX server in the inventory and navigate to the "User & Groups" tab.
Right click in the users list and select "Add..."
Give the user a name (e.g. bob) and a password. Click "Ok".
The user will now appear in the list of users.
The next step is to give the user a role. This is done under the "Permissions" tab.
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).
Click "Ok".
The new permission can now be seen in the list of permissions, and is effective immediatley.
You may want to do this for example in a test environment where vCenter is in a VM.
Rather than connecting to the ESX server and starting the vCenter VM then connecting to vCenter,
you could connect straight to vCenter.
Click on the "Configuration" tab of the ESX server and go to the "Virtual Machine Startup/Shutdown"
section.
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.
List all VMs on that ESX Server (Check you VM is listed here):
vmware-cmd -l
/usr/lib/vmware/bin/vmkload_app -k 9 vmid#
Failing that crash the VM and get the logs (run in a directory with some space to spare):
vm-support -x
vm-support -X vmid#
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vSwitch0 64 9 64 1500 vmnic2,vmnic0
PortGroup Name VLAN ID Used Ports Uplinks
Server Network 41 5 vmnic0,vmnic2
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vSwitch1 64 6 64 1500 vmnic3,vmnic1
PortGroup Name VLAN ID Used Ports Uplinks
Service Console 35 1 vmnic1,vmnic3
VMkernel 35 1 vmnic1,vmnic3
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vSwitch2 64 1 64 1500
PortGroup Name VLAN ID Used Ports Uplinks
Internal 0 0
Identify disks attached to the ESX server including SAN LUNs (in human readable format):
vdf -h
Read Metadata from VMFS volumes (version, capacity and file block size):
vmkfstools -P /vmfs/volumes/LUN-A1
Add and extent to a datastore (Each LUN can be max 2TB. 32 extents can be added to reach
64TB):
[vmkfstools -Z addthislun tothislun]
vmkfstools -Z vmhba1:0:12:1 vmhba1:0:11:1
ln -s /vmfs/volumes/477c7-634968-3c1a-001... /vmfs/volumes/newname
Disable a service:
esxcfg-firewall -d [servicename]
esxcfg-firewall -d sshClient
Open a port:
esxcfg-firewall -o 465,tcp,out,out-smtps
Close a port:
esxcfg-firewall -c 465,tcp,out
Connect-VIServer localhost
Get-VM | Select Name, @{N="IP Address";E={@($_.guest.IPAddress[0])}}
Name IP Address
---- ----------
ABWEB1v 172.16.100.1
ABWEB2v 172.16.100.2
ABWEB3v 172.16.100.3
ABWEB4v 172.16.100.4
ABWEB5v 172.16.100.5
ABWEB6v 172.16.100.6
ABWEB7v 172.16.100.7
ABWEB8v 172.16.100.8
ABWEB9v 172.16.100.9
ABWEB10v 172.16.100.10
ABWEB11v 172.16.100.11
ABAPP1v 172.16.101.20
ABDOM1v 172.16.102.20
Getting a little more complicated here we are getting all the VMs in any cluster starting with "Web-
Cluster-" and then returning the VM Name, ESXi host and IP address:
Due to the way the IP address is referenced and a VM can have more than one IP, you can list
additional IPs by adding or changing the array pointer from 0 to 1 and so on, in this part of the
command "$_.guest.IPAddress[1]"
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
Name
Template
DestinationHost
CustomSpec
NumCpu
MemoryMB
You will need an existing template you have created prior and also a guest OS customisation
specification.
Connect-VIServer vcenter1.vmadmin.co.uk
$VirtualMachinesCSV = "C:\VMsFromTemplate.csv"
$strDescription = "Created from template and CSV by Andy Barnes"
So you've just created an additional LUN/volume and presented it to all your ESXi servers?
Now you want to rescan the HBAs on the servers so you can start using the storage, but you dont
fancy manually doing this on say 10 or maybe even 100 servers.
Here is a very handy piece of VMware PowerCLI that will connect to your vCenter Server, get the list
of clusters and hosts, then rescan all the HBAs on those hosts (ESX/ESXi).
Connect-VIServer vcenter.domain.local
Get-Cluster | Get-VMHost | Get-VMHostStorage -RescanAllHBA
Before performing a piece of network maintenance I wanted ensure I had an up-to-date list of
network information for all ESXi servers.