A. Mikkelsen

VMware ESX scripts, commands, tools and other nice to know things that will make your virtualization days easier!!!!

Browsing Posts in Troubleshooting

If you ever need to clear the list of ignored SSL certificates (hosts or vCenters) that you use from the VIclient.

  1. Open the “Registry Editor”
  2. Locate the key named “HKEY_CURRENT_USER\Software\VMware\Virtual Infrastructure Client\Preferences\UI\SSLIgnore”
  3. Delete all certificates needed.

 

Using IBM Blades and Cisco switches to run your ESX enviroment?

If yes, have you tested what happens if you unplug the network cables going into one switch?

If you like me have bundled 2 or more cables going from one switch, to one backbone switch and done the same for the other switch, then your VM’s using that switch will loose network connection (from outside the host).
This is not the way I wanted the setup to work.

After a bit of googling i found a blog from Scott Lowe (http://blog.scottlowe.org/2007/06/22/link-state-tracking-in-blade-deployments/) about the problem and also a solution.
The solution is called Link State Tracking. Many users have tried the solution and have got it to work, so I had to test it…..

I added the following lines to each of the Blade Switches (Port-Channel, group and interfaces may be different on your system).

----------UPLINK to CORE switch------------
interface Port-Channel1
link state group 1 upstream

----------LINK to Blade server------------
interface range GigabitEthernet0/1 - 14
link state group 1 downstream

----------Global command------------
link state track 1

conf t
interface Port-Channel1
link state group 1 upstream
interface range GigabitEthernet0/1 - 14
link state group 1 downstream
link state track 1

Remember to write the changes to memory using

wri

After this was done on both Blade switches, i just had to test it.
I started a ping to a VM that I knew was using Switch1 to communicate with external network traffic.
Then I unplugged the to 2 network cables going into Switch1 and waited to see if the ping command would loose the communication with the VM….
It didn’t loose connection. So the the VM must have switched to Switch2.

So configuring the Blade Switches for Link State Tracking is to proper way to configure the switches.
A big thanks goes to Scott Lowe for the blog on Link State Tracking.

After we upgraded to vSphere 4.1, the SCSI adaptor of all our WINXP guests changed from LSI Logic Parallel  to BusLogic Parallel. This change should normally not create any warnings or problems it VMware Tools are up to date.

But after the upgrade all our WINXP guests got the following warning when powered on in the event log.

Message from esxhost01.labt.local: The guest operating system is Windows XP and you have one or more virtual SCSI devices installed in your virtual machine. Windows XP does not support the BusLogic SCSI adapter that VMware ESX currently uses for its virtual SCSI devices. Select OK to continue or Cancel to cancel. info 22-09-2010 15:55:25 VM name vpxuser
I then changed the SCSI adaptor back to LSI Logic Parallel and I now got almost the same warning.

Message from esxhost01.labt.local: The guest operating system is Windows XP and you have one or more virtual SCSI devices installed in your virtual machine. Windows XP does not support the LSI Logic SCSI adapter that VMware ESX currently uses for its virtual SCSI devices. Select OK to continue or Cancel to cancel. info 22-09-2010 15:55:25 VM name vpxuser

I contacted VMware support and they told me that it was a known “feature”/”bug” and send me the following link to suppress the waring in the Event log.
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1007122

There is two ways to suppress the warning.

Through vSphere Client

  • Using the vSpher Client logon to your vCenter server.
  • Poweroff the VM.
  • Edit the VM’s settings
  • Navigate to Options > Advanced > General
  • Click Configuration Parameters
  • Add the following rows, by using Add Row
    • If you have a BusLogic Parallel SCSI adaptor
      buslogic.noDriver = "FALSE"
    • If you have a LSI Logic Parallel SCSI adaptor
    • lsilogic.noDriver = "FALSE"
  • Click OK twice to close the dialogs and save the changes.
  • PowerOn the VM

Editing the VMX file

  • Open a SSH to the host ex. using Putty
  • Navigate to the VM’s files (relpace with your own path)
    cd /vmfs/volumes/lun01/winxp01/
  • Open the config file  in your favorit editor .
    vi winxp01.vmx
  • Add the following line to the file
    • If you have a BusLogic Parallel SCSI adaptor
    • buslogic.noDriver = "FALSE"
    • If you have a LSI Logic Parallel SCSI adaptor
    • lsilogic.noDriver = "FALSE"
  • Save and close the config file.
  • PowerOn the VM

I haven’t tested if it possible to add the lines to the global config file on each host (/etc/vmware/config) for all VM’s..

I will test this next week.

Yesterday we upgraded one of our vSphere Clusters to 4.1 – it went smoothly 🙂

But today the users reported that they weren’t able to use cut % paste between the guest and their computer using the vSphere Client (Console).

After a quick google we found that VMware has tightened the vSphere security by disabling this feature. See VMware KB 1026437.

If you need the cut & paste functionality you can enable it again on the guest or host level.

For a single VM:

  • Using the vSpher Client logon to your vCenter server.
  • Poweroff the VM.
  • Edit the VM’s settings
  • Navigate to Options > Advanced > General
  • Click Configuration Parameters
  • Add the following rows, by using Add Row
    isolation.tools.copy.disable –  false
    isolation.tools.paste.disable  – false
    
  • Click OK twice to close the dialogs and save the changes.
  • PowerOn the VM

For all VM’s on a host ESX/ESXi

Must be done on all hosts, so you don’t loose the functionality when the VM is migrated to another host.

  • Open a SSH to the host ex. using Putty
  • Open /etc/vmware/config in your favorit editor .
  • Add these lines to the file

    isolation.tools.copy.disable="FALSE"
    isolation.tools.paste.disable="FALSE"
    
  • Save and close the config file. Cut & Paste will work after a VM powerson, reboots or resume.

If you need a good guide to Interpreting the statistic from ESXTOP then take a look at this guide from VMware.

http://communities.vmware.com/docs/DOC-9279

I’m using it to troubleshoot performance issues (poor response times) from clients in different locations, when using the remote console.

Restarting the Management agents on ESX Server 3.x

  1. Login to the ESX host using SSH (or from COS)
  2. Type service mgmt-vmware restart.
    CAUTION
    Before restarting the Management Agent make sure that Automatic Startup/Shutdown is Disabled
    For more info see
    Restarting hostd (mgmt-vmware) on ESX Server Hosts Restarts Hosted Virtual Machines Where Virtual Machine Startup/Shutdown is Enabled (1003312)
  3. Type service vmware-vpxa restart.
  4. Exit the SSH session or logout of COS

Just found this very interesting article http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1013109 describing a problem with Windows 2008 and ESX 4 virtual hardware version 7.

In short the article states that you might have the disks go offline in a Windows 2008 VM if you

  • Upgrade virtual hardware from version 4 to 7
  • Installing a new VM with virtual hardware 7

There is two ways to get around this (taken from the VMware KB 103109)

————————

This can be resolved by changing the SAN Automount Policy on the system. See the Microsoft article http://support.microsoft.com/kb/973834 to change the SAN Policy to online.
The SAN policy is defined within the VDS environment of the system and is represented by the following values:
  • VDS_SP_UNKNOWN = 0x0
  • VDS_SP_ONLINE = 0x1
  • VDS_SP_OFFLINE_SHARED = 0x2
  • VDS_SP_OFFLINE = 0x3
On Windows Server 2008 Enterprise and Windows Server 2008 Datacenter, the default SAN policy is VDS_SP_OFFLINE_SHARED. On all other Windows Server 2008 editions, the default SAN policy is VDS_SP_ONLINE.
To query current SAN policy from the command line, start DISKPART and issue a SAN command:
C:\>DISKPART.EXE
DISKPART> san
SAN Policy : Offline Shared

DISKPART> exit

Alternatively, you can set the disk to Online after the hardware version upgrade.
To set the disk to Online:
  1. Log in to your system as an Administrator.
  2. Click Computer Management > Storage > Disk Management.
  3. Right-click the disk and choose Online.

Yesterday I by mistake extended a disk on a VM that had snapshots.
Using vmkfstools.
Kind of like this thread (http://communities.vmware.com/thread/238035).

This resulted in the following PowerOn error:

Failed to power on Servername on Host in Cluster:

Cannot open the disk ‘/vmfs/volumes/LUN/Folder/VM.vmdk’
Reason: The parent virtual machine disk has been modified since the child was created

The server was a database server so I had no choice than to fix it.

I tried the following with no luck:

  • Reverting to snapshot didn’t help – (Don’t try this if you don’t have a good backup)
  • Shrinking the vmdk again using vmkfstools – (This has not been possible since ESX 3.0)

Then I tried to use VMware Converter to do a V2V and in the first try (all defaults) that didn’t help the VM started with a BSOD.I tried again using the Converter but this time I changed one default parameter.In the “View/Edit Options” tap, remove the check mark in “Reconfigure destination virtual machine” and click YES to the warning.Removing the reconfigure option saved my day.
The VM started and I was able to restore the latest files from backup.


Last week I upgraded a Virtual Center server from Win2003 & MSSQL 2000 (32-bit) to Win2008 & MSSQL 2005 (64-bit).

During the installation of vCenter it asked for a 32-bit ODBC even though all the new systems was running 64-bit.
After a some time on Google i found that Windows 64-bit also includes a 32-bit version of the ODBC.

To set up a 32-bit DSN launch the 32-bit version of the Data Source Administrator. It is located at:
%systemdrive%\Windows\SysWoW64\Odbcad32.exe

Also se
http://www.vmwarewolf.com/32-bit-odbc-dsn-for-vsphere/

Over the past few months we have seen a few Windows servers with a black screen.
Meaning

  • You can’t see the logon promt
  • You get a black screen when you connect with RDP

We found that the problem was caused by a change in the Windows color scheme.

The solution is to copy the color scheme from a simular Windows servers registry and add it the VM/server that has the problem using registry to connect to a remote server.

  1. On a simular windows server locate “[HKEY_USERS\.DEFAULT\Control Panel\Colors]” and export it to a file.
  2. Using the same Registry Editor connect to the remote server.
  3. Import the registry file just created or change the color scheme manually.
  4. Reboote the affected server to change the color scheme.

Default color scheme for a Windows 2003 server.
Default color scheme for a Windows XP.
Default color scheme for a Windows 2000 server.
Default color scheme for a Windows 2008 server.

Powered by WordPress Web Design by SRS Solutions © 2018 A. Mikkelsen Design by SRS Solutions