My VMware blog

To help others as others have helped me

Unable to connect to host with vSphere Client or vCenter

Symptoms

I had an issue today where I could not connect to one of my ESXi hosts via the vSphere Client or vCenter. I also noticed that when I logged on to the console it was very sluggish accessing the configuration menu (This might be a red herring). All my VMs were running and I could ping the host.

 The Fix

I began by first using the ESXi console to restart the management agents. This process which would normally take just a few minutes lasted over 5 so I soon realised there was something wrong and further investigation was needed.

I decided to enable the ESXi shell (follow this link for a how to) so I could restart the management agents via the command line to see what was happening.

To restart them via the command line type /sbin/services.sh restart

Again the restart took over 5 minutes but gave me some useful errors with regards to the VMFS volumes. These errors included

  • Not all VMFS volumes were updated; the error encountered was ‘Timeout’.
  • Not all VMFS volumes were updated; the error encountered was ‘IO was aborted’.
  • Rescan complete,  however some dead paths were not removed because they were in use by the system. Please use the ‘storage core device world list’ command to see the VMkernel worlds still using these paths.
  • Error while scanning interfaces, unable to continue. Error was Not all VMFS volumes were updated; the error encountered was ‘Timeout’.

It was at this point I remembered I had been experimenting with some software to present iSCSI storage to the ESXi host but as I could not access the host I could not simply right click and remove them I would need to do this via the command line.

To remove the iSCSI target via the command I performed the following

First I needed to list all the SCSI devices on the system and used the following command to do so

esxcfg-scsidevs –l

It returned the following

~ # esxcfg-scsidevs -l

mpx.vmhba0:C0:T0:L0

Device Type: CD-ROM

Size: 0 MB

Display Name: Local TSSTcorp CD-ROM (mpx.vmhba0:C0:T0:L0)

Multipath Plugin: NMP

Console Device: /vmfs/devices/cdrom/mpx.vmhba0:C0:T0:L0

Devfs Path: /vmfs/devices/cdrom/mpx.vmhba0:C0:T0:L0

Vendor: TSSTcorp  Model: DVD-ROM SN-108BB  Revis: D150

SCSI Level: 5  Is Pseudo: false Status: on

Is RDM Capable: false Is Removable: true

Is Local: true  Is SSD: false

Other Names:

vml.0005000000766d686261303a303a30

VAAI Status: unsupported

naa.600144f0a2a30b000000506ff3790001

Device Type: Direct-Access

Size: 20480 MB

Display Name: NEXENTA iSCSI Disk (naa.600144f0a2a30b000000506ff3790001)

Multipath Plugin: NMP

Console Device: /vmfs/devices/disks/naa.600144f0a2a30b000000506ff3790001

Devfs Path: /vmfs/devices/disks/naa.600144f0a2a30b000000506ff3790001

Vendor: NEXENTA   Model: NEXENTASTOR       Revis: 1.0

SCSI Level: 5  Is Pseudo: false Status: DEAD

Is RDM Capable: true  Is Removable: false

Is Local: false Is SSD: false

Other Names:

vml.0200000000600144f0a2a30b000000506ff37900014e4558454e54

VAAI Status: supported

It was the naa.600144f0a2a30b000000506ff3790001 device that I was interested in and next to the section “SCSI Level: 5  Is Pseudo: false Status: DEAD” confirmed it

Now I knew which device was causing the error I then needed to find the name of the target. If I had access to vCenter or the vSphere client this would be easy but again I needed to do this via the command line.

The following command lists all the HBA listed on the host

esxcfg-scsidevs –a

which returned

~ # esxcfg-scsidevs -a

vmhba0  ata_piix          link-n/a  sata.vmhba0                             (0:0:31.2) Intel Corporation 2 port SATA IDE Controller (ICH9)

vmhba1  megaraid_sas      link-n/a  unknown.vmhba1                          (0:3:0.0) LSI / Symbios Logic Dell PERC 6/i Integrated

vmhba2  mptspi            link-n/a  pscsi.vmhba2                            (0:6:8.0) LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI

vmhba32 ata_piix          link-n/a  sata.vmhba32                            (0:0:31.2) Intel Corporation 2 port SATA IDE Controller (ICH9)

vmhba33 iscsi_vmk         online    iqn.1998-01.com.vmware:EXESXI02-68277278iSCSI Software Adapter

In my case the host uses vmhba33 as the HBA for iSCSI

Next I needed to all the iSCSI targets listed on the host and the following command performs this task

vmkiscsi-tool  -S vmhba33 (note this might be different on your host).

which returned

~ # vmkiscsi-tool  -S vmhba33

STATIC DISCOVERY TARGET

NAME     : iqn.1986-03.com.sun:02:126e0251-a843-ecd1-c5b3-c7e390515da6

ADDRESS  : 192.168.155.27:3260

BOOT     : No

LAST ERR : LOGIN: No Errors

I now had all the information I need to remove the iSCSI target from the system and to remove it I used the following command

vmkiscsi-tool  -S -r “192.168.155.27 iqn.1986-03.com.sun:02:126e0251-a843-ecd1-c5b3-c7e390515da6″ vmhba33

The final thing left to do is restart the management agents

/sbin/services.sh restart

This then resolved the issue for me and I was able to login to the host with vSphere Client and vCenter.

Hope it helps.

, , , , ,

One thought on “Unable to connect to host with vSphere Client or vCenter

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>