Wednesday, 24 July 2013

srm database table showing users

SRM service wont start after upgrade to 5.1 (SSO)


log in to sql manager
select the srm db and find the tables below
right click on table and edit top 200 rows

dbo.pd_acedata
dbo.pd_authorization


this is part of vmware kb 2038046

how to test sql server connection udl file

create a text file but change the extention from .txt to .udl

Tuesday, 23 July 2013

dell / ibm esxi 5 upgrade "error could not obtain module order from esximage db" oem.xml /etc/vmware/support




from dell blog

http://en.community.dell.com/techcenter/b/techcenter/archive/2012/06/28/upgrade-from-dell-customized-vmware-esxi-5-0-to-a-later-update-using-dell-customized-esxi-5-iso-fails.aspx

this worked once the roll back had completed and the host rebooted

~# esxcli software vib remove –n Dell-Configuration-VIB
~# esxcli software vib remove –n Dell-License-VIB


also from vmware kb 2036167
maybe i should have also done

esxcli software vib remove -n Dell-esx-boot-options


same for IBM hosts:
http://www-01.ibm.com/support/docview.wss?uid=isg3T1019361

Monday, 8 July 2013

Remove VIB from ESXi host - vCLI

Remove the Cisco Nexus 1V from ESX host cisco-vem-v152-esx C:\Program Files\VMware\VMware vSphere CLI>esxcli --server=greenesxi3 software vib list Enter username: root Enter password: Name Version Vendor Acceptance Level Install Date ---------------------- ------------------------------------ -------- ---------------- ------------ misc-cnic-register 1.72.1.v50.2-1OEM.500.0.0.472560 Broadcom VMwareCertified 2013-04-29 net-bnx2 2.2.3e.v50.1-1OEM.500.0.0.472560 Broadcom VMwareCertified 2013-04-29 net-bnx2x 1.74.19.v50.1-1OEM.500.0.0.472560 Broadcom VMwareCertified 2013-04-29 net-cnic 1.74.04.v50.1-1OEM.500.0.0.472560 Broadcom VMwareCertified 2013-04-29 net-tg3 3.124c.v50.1-1OEM.500.0.0.472560 Broadcom VMwareCertified 2013-04-29 scsi-bnx2fc 1.74.02.v50.2-1OEM.500.0.0.406165 Broadcom VMwareCertified 2013-04-29 scsi-bnx2i 2.74.07.v50.1-1OEM.500.0.0.472560 Broadcom VMwareCertified 2013-04-29 net-bna 3.2.0.0-1OEM.500.0.0.472560 Brocade VMwareCertified 2013-04-29 scsi-bfa 3.2.0.0-1OEM.500.0.0.472560 Brocade VMwareCertified 2013-04-29 cisco-vem-v152-esx 4.2.1.2.1.1a.0-3.0.1 Cisco PartnerSupported 2013-05-23 OpenManage 7.2-0000 Dell VMwareAccepted 2013-05-23 dell-configuration-vib 5.0-2A00 Dell PartnerSupported 2013-04-29 ima-be2iscsi 4.2.324.12-1OEM.500.0.0.472629 Emulex VMwareCertified 2013-04-29 net-be2net 4.2.327.0-1OEM.500.0.0.472560 Emulex VMwareCertified 2013-04-29 scsi-be2iscsi 4.2.324.12-1OEM.500.0.0.472629 Emulex VMwareCertified 2013-04-29 scsi-lpfc820 8.2.4.141.55-1OEM.500.0.0.472560 Emulex VMwareCertified 2013-04-29 net-igb 4.0.17-1OEM.500.0.0.472560 Intel VMwareCertified 2013-04-29 net-ixgbe 3.11.32-1OEM.500.0.0.472560 Intel VMwareCertified 2013-04-29 scsi-mpt2sas 15.00.01.00.1vmw-1OEM.500.0.0.472560 LSI VMwareCertified 2013-04-29 ima-qla4xxx 500.2.01.31-1vmw.0.0.060523 QLogic VMwareCertified 2013-04-29 net-qlcnic 5.0.750-1OEM.500.0.0.472560 QLogic VMwareCertified 2013-04-29 scsi-qla4xxx 634.5.7.0-1OEM.500.0.0.472560 QLogic VMwareCertified 2013-04-29 ata-pata-amd 0.3.10-3vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 ata-pata-atiixp 0.4.6-3vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 ata-pata-cmd64x 0.2.5-3vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 ata-pata-hpt3x2n 0.3.4-3vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 ata-pata-pdc2027x 1.0-3vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 ata-pata-serverworks 0.4.3-3vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 ata-pata-sil680 0.4.8-3vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 ata-pata-via 0.3.3-2vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 block-cciss 3.6.14-10vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 ehci-ehci-hcd 1.0-3vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 esx-base 5.0.0-2.33.1117897 VMware VMwareCertified 2013-05-23 esx-tboot 5.0.0-2.26.914586 VMware VMwareCertified 2013-04-29 ipmi-ipmi-devintf 39.1-4vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 ipmi-ipmi-msghandler 39.1-4vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 ipmi-ipmi-si-drv 39.1-4vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 misc-drivers 5.0.0-2.26.914586 VMware VMwareCertified 2013-04-29 net-e1000 8.0.3.1-2vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 net-e1000e 1.1.2-3vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 net-enic 1.4.2.15a-1vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 net-forcedeth 0.61-2vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 net-nx-nic 4.0.557-3vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 net-qlge 2.0.0.54-1vmw.500.0.0.472560 VMware VMwareCertified 2013-04-29 net-r8168 8.013.00-3vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 net-r8169 6.011.00-2vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 net-s2io 2.1.4.13427-3vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 net-sky2 1.20-2vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 ohci-usb-ohci 1.0-3vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 sata-ahci 3.0-6vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 sata-ata-piix 2.12-4vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 sata-sata-nv 3.5-3vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 sata-sata-promise 2.12-3vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 sata-sata-sil 2.3-3vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 sata-sata-svw 2.3-3vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 scsi-aacraid 1.1.5.1-9vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 scsi-adp94xx 1.0.8.12-6vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 scsi-aic79xx 3.1-5vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 scsi-fnic 1.5.0.3-1vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 scsi-hpsa 5.0.0-17vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 scsi-ips 7.12.05-4vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 scsi-megaraid-mbox 2.20.5.1-6vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 scsi-megaraid-sas 5.34-1vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 scsi-megaraid2 2.00.4-9vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 scsi-mptsas 4.23.01.00-5vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 scsi-mptspi 4.23.01.00-5vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 scsi-rste 2.0.2.0088-1vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 uhci-usb-uhci 1.0-3vmw.500.2.26.914586 VMware VMwareCertified 2013-04-29 vmware-fdm 5.1.0-1123961 VMware VMwareCertified 2013-07-05 tools-light 5.0.0-2.32.1024429 VMware VMwareCertified 2013-05-15 scsi-qla2xxx 934.5.6.0-1OEM.500.0.0.472560 qlogic VMwareCertified 2013-04-29 C:\Program Files\VMware\VMware vSphere CLI>esxcli --server=greenesxi3 software vib remove --vibname=cisco-vem-v152-esx Enter username: root Enter password: Removal Result Message: Operation finished successfully. Reboot Required: false VIBs Installed: VIBs Removed: Cisco_bootbank_cisco-vem-v152-esx_4.2.1.2.1.1a.0-3.0.1 VIBs Skipped: C:\Program Files\VMware\VMware vSphere CLI>

Friday, 5 July 2013

Prerequisites for the vCenter Server Upgrade - Remove it from the linked mode group

except the vcenter server linked mode configuration wizard shows the "Isolate this vCenter Server instance from linked mode group" shaded or greyed out.
Fix: right click on vcenter server linked mode configuration and run as administrator

Monday, 10 June 2013

Enabling Changed Block Tracking (CBT) for VMs in order for Tivoli Storage Manager (TSM) to perform an incremental backup of VMs

Enabling Changed Block Tracking (CBT) for VMs that have been migrated from ESX3.
In order for Tivoli Storage Manager TSM to perform an incremental backup of VMs.
Until these changes are made the backups will perform, but will be entire fulls each time.
With ref to these 2 KBs
Changed Block Tracking (CBT) on virtual machines
Enabling Changed Block Tracking (CBT) on virtual machines
As part of the migration process it is recommended to follow these steps:
1.       VM is located on the vSphere4 host ready to be migrated to vSphere5. Power down VM.
2.       Migrate VM to new vSphere5 host and datastore.
3.       Leave the VM powered off on the new host and edit its settings adding the line ctkEnabled = "TRUE"
4.       Power on VM and upgrade the VM Tools – this will reboot the VM.
5.       Power off VM and upgrade the VM H/W
Step 3 Details:
The easiest way to add the extra line is to do it from the GUI when the VM is powered off: Click on the "Configuration Parameters..." button in the VM Edit Settings - Options - General...






Now Power on the VM…

Additional Information:
The actions above are editing the vmx file which can be found in the the VM’s working location
Eg
[DATASTORE_004] XPIE8_1/
 


With the VM powered off you can putty in to the VMs datastore location and manually edit the vmx file:
vmfs/volumes/4ba56729-6dd5tg6u-6194-001e6yh79a10/XPIE8 # cd /vmfs/volumes/DATASTORE004/XPIE8/

make a backup of the vmx file
cp *.vmx original.vmx
Edit the vmx
/vmfs/volumes/4ba56729-6dd5tg6u-6194-001e6yh79a10/XPIE8 # vi XPIE8.vmx

And add the line
ctkEnabled = "TRUE"
(now use vi commands:  shift G for bottom of file,  i for insert new text,  type ctkEnabled = "TRUE"    , then ESC, type :wq )
Power on the VM
If you have been successful you will see ctk files have been created….     
You can check this using the following commands , in this example vm003prod is used as the example::
/vmfs/volumes/51b888a4-97643c51-e5r2-94r33c0f4359/vm003prod # grep -i ctk vm003prod.*
vm003prod.vmdk:changeTrackPath="vm003prod-ctk.vmdk"
vm003prod.vmx:scsi0:0.ctkEnabled = "true"
vm003prod.vmx:scsi0:1.ctkEnabled = "true"
vm003prod.vmx:scsi0:2.ctkEnabled = "true"
vm003prod.vmx:ctkEnabled = "true"
/vmfs/volumes/51b888a4-97643c51-e5r2-94r33c0f4359/vm003prod # ls -l
-rw-------    1 root     root                 13 Jun  7 09:36 vm003prod-aux.xml
-rw-------    1 root     root            3932672 Jun  7 09:40 vm003prod-ctk.vmdk
-rw-r--r--    1 root     root                 78 Jun  7 09:39 vm003prod-ee17dbd8.hlog
-rw-------    1 root     root         8589934592 Jun  7 09:36 vm003prod-ee17dbd8.vswp
-rw-------    1 root     root        64424509440 Jun  7 10:07 vm003prod-flat.vmdk
-rw-------    1 root     root               8684 Jun  7 09:40 vm003prod.nvram
-rw-------    1 root     root                591 Jun  7 09:39 vm003prod.vmdk
-rw-r--r--    1 root     root                  0 Jun  7 09:36 vm003prod.vmsd
-rwxr-xr-x    1 root     root               3739 Jun  7 09:40 vm003prod.vmx
-rw-r--r--    1 root     root                269 Jun  7 09:36 vm003prod.vmxf
-rw-------    1 root     root            1310592 Jun  7 09:40 vm003prod_1-ctk.vmdk
-rw-------    1 root     root        21464350720 Jun  7 09:39 vm003prod_1-rdm.vmdk
-rw-------    1 root     root                559 Jun  7 09:40 vm003prod_1.vmdk
-rw-------    1 root     root            1310592 Jun  7 09:40 vm003prod_2-ctk.vmdk
-rw-------    1 root     root        21464350720 Jun  7 09:39 vm003prod_2-rdm.vmdk
-rw-------    1 root     root                559 Jun  7 09:39 vm003prod_2.vmdk
-rw-r--r--    1 root     root            1760385 Jun  7 09:39 vmware-0.log
-rw-------    1 root     root             152182 Jun  7 09:36 vmware-16.log
-rw-------    1 root     root             152185 Jun  7 09:36 vmware-17.log
-rw-------    1 root     root             152756 Jun  7 09:36 vmware-18.log
-rw-------    1 root     root             152937 Jun  7 09:36 vmware-19.log
-rw-------    1 root     root             153280 Jun  7 09:36 vmware-20.log
-rw-------    1 root     root            1711582 Jun  7 09:36 vmware-21.log
-rw-r--r--    1 root     root             129214 Jun  7 09:41 vmware.log
-rw-------    1 root     root           52428800 Jun  7 09:36 vmx-vm003prod-3994541016-1.vswp


Wednesday, 29 May 2013

configure snmp on an esxi host

Configure SNMP for ESXi
based on this www

http://pubs.vmware.com/vsphere-50/topic/com.vmware.vsphere.monitoring.doc_50/GUID-8EF36D7D-59B6-4C74-B1AA-4A9D18AB6250.html

numbers in brackets indicate the step is optional

0
download and install the vsphere cli to desktop - from the vcli command prompt:

1
Display snmp agent configuration
**********
vicfg-snmp.pl --server esxi001.domain.com -s
**********
C:\>vicfg-snmp.pl --server esxi001.domain.com -s
Enter username: root
Enter password:
Current SNMP agent settings:
Enabled  : 0
UDP port : 161
Communities :
Notification targets :
Options :
EnvEventSource=indications

2
Configure SNMP Communities
**********
vicfg-snmp.pl --server esxi001 --username root --password Secret!! -c public1
**********
C:\>vicfg-snmp.pl --server esxi001 --username root --password Secret!! -c public1
Changing community list to: public1...
Complete.
C:\>vicfg-snmp.pl --server esxi001.domain.com -s
Enter username: root
Enter password:
Current SNMP agent settings:
Enabled  : 0
UDP port : 161
Communities :
public1
Notification targets :
Options :
EnvEventSource=indications

3
If the SNMP agent is not enabled, enable it by typing
**********
vicfg-snmp.pl --server esxi001 --username root --password Secret!! --enable
**********
C:\>vicfg-snmp.pl --server esxi001 --username root --password Secret!! --enable
Enabling agent...
Complete.
C:\>vicfg-snmp.pl --server esxi001.domain.com -s
Enter username: root
Enter password:
Current SNMP agent settings:
Enabled  : 1UDP port : 161
Communities :
public1
Notification targets :
Options :
EnvEventSource=indications

4
Configure the SNMP Agent to Send Traps
**********
vicfg-snmp.pl --server esxi001 --username root --password Secret!! -t solarwinds.domain.com@162/public1
**********
C:\>vicfg-snmp.pl --server esxi001 --username root --password Secret!! -t solarwinds.domain.com@162/public1
Changing notification(trap) targets list to: solarwinds.domain.com@162/public1...
Complete.

5
Send a test trap to verify that the agent is configured correctly by typing
**********
vicfg-snmp.pl --server esxi001 --username root --password Secret!! --test
**********
C:\>vicfg-snmp.pl --server esxi001 --username root --password Secret!! --test
Sending test nofication(trap) to all configured targets...
Complete. Check with each target to see if trap was received.

(6)
Configure the SNMP Agent for Polling (- not necessary - already done by default)
**********
vicfg-snmp.pl --server esxi001 --username root --password Secret!! -p 161
**********
C:\>vicfg-snmp.pl --server esxi001 --username root --password Secret!! -p 161
Changing udp port to 161...
Complete.

C:\>vicfg-snmp.pl --server esxi001.domain.com -s
Enter username: root
Enter password:
Current SNMP agent settings:
Enabled  : 1
UDP port : 161
Communities :
public1
Notification targets :
solarwinds.domain.com@162/public1
Options :
EnvEventSource=indications

(7)
Configure the Source used by the SNMP Agent for Hardware Events (- not necessary - already done by default)
**********
for vsphere4
vicfg-snmp.pl --server hostname --username username --password password -y sensors
for vsphere5
vicfg-snmp.pl --server esxi001 --username root --password Secret!! -y indications
**********
C:\>vicfg-snmp.pl --server esxi001 --username root --password Secret!! -y indications
Changing source of hardware event source: indications...
Complete.
C:\>vicfg-snmp.pl --server esxi001.domain.com --username root --password Secret!! -s
Current SNMP agent settings:
Enabled  : 1
UDP port : 161
Communities :
public1
Notification targets :
solarwinds.domain.com@162/public1
Options :
EnvEventSource=indications

8
Configure SNMP Management Client Software

After you have configured a vCenter Server system or a host to send traps, you must configure your management client software to receive and interpret those traps.

(9)
Configure the SNMP Agent to Filter Traps
vicfg-snmp.pl --server hostname --username username --password password -n oid_list

From the vSphere CLI, vicfg-snmp.pl --server hostname --username username --password password -n oid_list
oid_list is a list of OIDs for the traps to filter, separated by commas. This list replaces any OIDs that were previously specificed using this command.
For example, to filter out coldStart (OID 1.3.6.1.4.1.6876.4.1.1.0) and warmStart (OID 1.3.6.1.4.1.6876.4.1.1.1) traps, type vicfg-snmp.pl --server hostname --username username --password password -n 1.3.6.1.4.1.6876.4.1.1.0,1.3.6.1.4.1.6876.4.1.1.1
To clear all trap filters, typevicfg-snmp.pl --server hostname --username username --password password -n reset

Thursday, 23 May 2013

vmware tools install upgrade error how to force uninstall

force uninstall of vmtools / vmware tools

mount the vmtools cdrom in the vm using VM -> Guest -> Install / Upgrade VMware Tools - choose interactive install

from the VM command prompt cd to the cdrom drive and run the command
setup64 /c
this does the uninstall - no reboot needed

then run setup64 (from gui) to reinstall
error when trying to upgrade = isolation.tools.guestInitiatedUpgrade.disable = "FALSE"

Wednesday, 22 May 2013

service mgmt-vmware stop start restart -ash: service: not found - Usage: /etc/init.d/hostd {start|stop|restart}

KB: 2030663

~ # service mgmt-vmware restart
-ash: service: not found

~ # /etc/init.d/hostd status
Usage: /etc/init.d/hostd {start|stop|restart}
~ # ps -s | grep hostd
16978 16978 hostd-worker         WAIT   UFUTEX 0-31 hostd
16979 16978 hostd-poll           WAIT   UPOL   0-31 hostd
16980 16978 hostd-worker         WAIT   USLP   0-31 hostd17006 16978 vix-high-p           WAIT   UPOL   0-31 hostd
17007 17007 nssquery             WAIT   UPIPER 0-31 /usr/libexec/hostd/nssquery
17008 16978 hostd-worker         WAIT   UFUTEX 0-31 hostd
17010 16978 hostd-worker         WAIT   UFUTEX 0-31 hostd
17011 16978 hostd-worker         WAIT   UFUTEX 0-31 hostd
17087 16978 vix-poll             WAIT   UPOL   0-31 hostd
17275 16978 hostd-worker         WAIT   UFUTEX 0-31 hostd
17390 16978 hostd-worker         WAIT   UFUTEX 0-31 hostd
17506 16978 hostd-worker         WAIT   UFUTEX 0-31 hostd


~ # /etc/init.d/vpxa status
-ash: /etc/init.d/vpxa: not found

~ # ps -s | grep vpxa
16987 16987 vpxa                 WAIT   UFUTEX 0-31 /opt/vmware/vpxa/vpx/vpxa
16997 16987 vpxa                 WAIT   UPOL   0-31 /opt/vmware/vpxa/vpx/vpxa
16998 16987 vpxa                 WAIT   USLP   0-31 /opt/vmware/vpxa/vpx/vpxa
16999 16987 vpxa                 WAIT   UFUTEX 0-31 /opt/vmware/vpxa/vpx/vpxa
17001 16987 vpxa                 WAIT   UFUTEX 0-31 /opt/vmware/vpxa/vpx/vpxa
17002 16987 vpxa                 WAIT   UFUTEX 0-31 /opt/vmware/vpxa/vpx/vpxa
17003 16987 vpxa                 WAIT   UFUTEX 0-31 /opt/vmware/vpxa/vpx/vpxa
17004 16987 vpxa                 WAIT   UFUTEX 0-31 /opt/vmware/vpxa/vpx/vpxa
17005 16987 vpxa                 WAIT   UFUTEX 0-31 /opt/vmware/vpxa/vpx/vpxa
17271 16987 vpxa                 WAIT   UFUTEX 0-31 /opt/vmware/vpxa/vpx/vpxa
17278 16987 vpxa                 WAIT   UFUTEX 0-31 /opt/vmware/vpxa/vpx/vpxa
17279 16987 vpxa                 WAIT   UFUTEX 0-31 /opt/vmware/vpxa/vpx/vpxa
17282 16987 vpxa                 WAIT   UFUTEX 0-31 /opt/vmware/vpxa/vpx/vpxa
17293 16987 vpxa                 WAIT   UFUTEX 0-31 /opt/vmware/vpxa/vpx/vpxa
17294 16987 vpxa                 WAIT   UFUTEX 0-31 /opt/vmware/vpxa/vpx/vpxa
17295 16987 vpxa                 WAIT   UFUTEX 0-31 /opt/vmware/vpxa/vpx/vpxa
17296 16987 vpxa                 WAIT   UFUTEX 0-31 /opt/vmware/vpxa/vpx/vpxa
17297 16987 vpxa                 WAIT   UFUTEX 0-31 /opt/vmware/vpxa/vpx/vpxa

great post on how to change vmnic numbering

http://www.virten.net/2012/09/esxi-change-vmnic-vmhba-numbering/


cp /etc/vmware/esx.conf /etc/vmware/esx.conf.old

vi /etc/vmware/esx.conf

Search for “vmnic” (press /vmnic<ENTER>)
press n for next occurance and N for previous.

/device/000:000:26.0/owner = "vmkernel"
/device/000:000:29.0/owner = "vmkernel"
/device/000:000:31.2/vmkname = "vmhba0"
/device/000:001:00.0/vmkname = "vmnic0"
/device/000:001:00.1/vmkname = "vmnic1"
/device/000:001:00.2/vmkname = "vmnic2"
/device/000:001:00.3/vmkname = "vmnic3"
/device/000:001:00.4/vmkname = "vmnic4"
/device/000:001:00.5/vmkname = "vmnic5"
/device/000:003:00.0/vmkname = "vmnic6"
/device/000:003:00.1/vmkname = "vmnic7"
/device/000:067:00.0/vmkname = "vmhba1"
/device/000:068:00.0/vmkname = "vmhba2"

Change the vmnic label. (Move the cursor to the label, press r for “replace” and enter the new number)


Search again for “vmnic” (press /vmnic<ENTER>) until you find something like this

/net/pnic/child[0000]/duplex = "full"
/net/pnic/child[0000]/mac = "90:b1:1c:0f:7a:fb"
/net/pnic/child[0000]/name = "vmnic0"
/net/pnic/child[0000]/speed = "10000"
/net/pnic/child[0000]/virtualMac = "00:50:56:5f:7a:fb"
/net/pnic/child[0001]/duplex = "full"
/net/pnic/child[0001]/mac = "90:b1:1c:0f:7a:fd"
/net/pnic/child[0001]/name = "vmnic1"
/net/pnic/child[0001]/speed = "10000"
/net/pnic/child[0001]/virtualMac = "00:50:56:5f:7a:fd"
/net/pnic/child[0002]/mac = "90:b1:1c:0f:7a:ff"
/net/pnic/child[0002]/name = "vmnic2"
/net/pnic/child[0002]/virtualMac = "00:50:56:5f:7a:ff"
/net/pnic/child[0003]/mac = "90:b1:1c:0f:7b:01"
/net/pnic/child[0003]/name = "vmnic3"
/net/pnic/child[0003]/virtualMac = "00:50:56:5f:7b:01"
/net/pnic/child[0004]/mac = "90:b1:1c:0f:7b:03"
/net/pnic/child[0004]/name = "vmnic4"
/net/pnic/child[0004]/virtualMac = "00:50:56:5f:7b:03"
/net/pnic/child[0005]/mac = "90:b1:1c:0f:7b:05"
/net/pnic/child[0005]/name = "vmnic5"
/net/pnic/child[0005]/virtualMac = "00:50:56:5f:7b:05"

Move the cursor to the line and press dd for each line you want to delete.

reboot

Tuesday, 21 May 2013

configuring LLDP and cdp

esxcfg-vswitch vSwitch0 -b
shows current status - which is listen


esxcfg-vswitch vSwitch0 -B both
sets esx host to broadcast and listen

use
esxcli network vswitch standard set -c both -v vSwitch0
for esxi5


command to run on the switch:

show lldp info remote-device



thanks to http://rickardnobel.se/vswitch-cdp-with-hp-switches/

Friday, 17 May 2013

echo to stdout all the commands in a script

put this at the top of the file
#!/bin/bash -x

for esxi
#!/bin/ash -x

Wednesday, 15 May 2013

change uplink / nic settings from the command line - esxcfg-nics

esxcfg-nics -l
esxcfg-nics -s 100 -d full vmnic0


esxi5
esxcli network nic set -n vmnic# -S speed -D duplex

maintenance mode cli

maintenance mode cli esxi4 & 5


vim-cmd hostsvc/maintenance_mode_enter

vim-cmd hostsvc/maintenance_mode_exit

Wednesday, 8 May 2013

Network/Storage firmware and recommended driver version in ESXi/ESX 4.x and 5.x - VID DID SVID and SDID

KB: 1027206
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1027206
Determining Network/Storage firmware and driver version in ESXi/ESX 4.x and 5.x

******************
EXTRACT for NIC
To determine the recommended driver for the card, we must obtain the Vendor ID (VID), Device ID (DID), Sub-Vendor ID (SVID), and Sub-Device ID (SDID) using the vmkchdev command:
# vmkchdev -l |grep vmnic0
002:01.0 8086:100f 15ad:0750 vmkernel vmnic0
In this example, the values are:

◦VID = 8086
◦DID = 100f
◦SVID = 15ad
◦SDID = 0750
5.You can now search the VMware Compatibility Guide for the Vendor ID (VID), Device ID (DID), Sub-Vendor ID (SVID), and Sub-Device ID (SDID). In some cases, you may need to do a text search to narrow down the particular card.

******************

Resolution
Note: In ESXi 5.x, the swfw.sh command is supplied with the vm-support support bundle collection tool. The swfw.sh command can be used to identify the firmware and driver versions of hardware connected to the host. To run this command, use this path:
# /usr/lib/vmware/vm-support/bin/swfw.sh

Obtaining Host Bus adapter driver and firmware information
To determine the driver and firmware version of a Host Bus Adapter:
•To determine the firmware version of a Host Bus Adapter, see Identifying the firmware of a Qlogic or Emulex FC HBA (1002413).

•To obtain the driver version of a Host Bus Adapter on an ESXi/ESX host:

1.Open a console to the ESXi/ESX host. For more information, see Unable to connect to an ESX host using Secure Shell (SSH) (1003807) or Using Tech Support Mode in ESXi 4.1 and ESXi 5.x (1017910).

2.Obtain the driver type that the Host Bus Adapter is currently using:
# esxcfg-scsidevs -a
You see output similar to:
vmhba0  ata_piix   link-n/a  ide.vmhba0    (0:7.1) Intel Corporation Virtual Machine Chipset
vmhba1  mptspi     link-n/a  pscsi.vmhba1  (0:16.0) LSI Logic / Symbios Logic LSI Logic Parallel SCSI Controller
vmhba32 ata_piix   link-n/a  ide.vmhba32   (0:7.1) Intel Corporation Virtual Machine Chipset
Note: The second column shows the driver that is configured for the HBA.

3.To view the driver version in use, run the command:
# vmkload_mod -s HBADriver |grep Version
For example, to check the mptspi driver:
# vmkload_mod -s mptspi |grep Version
Version: Version 4.00.37.00.30vmw, Build: 721907, Interface: 9.0, Built on: May 18 2012
In this example, the driver version is 4.00.37.00.30vmw.
To obtain the driver version for all HBAs in the system with a single command, use:
# for a in $(esxcfg-scsidevs -a |awk '{print $2}') ;do vmkload_mod -s $a |grep -i version ;done

4.To determine the recommended driver for the card, we must obtain the Vendor ID (VID), Device ID (DID), Sub-Vendor ID (SVID), and Sub-Device ID (SDID) using the vmkchdev command:
# vmkchdev -l |grep vmhba1
000:16.0 1000:0030 15ad:1976 vmkernel vmhba1
In this example, the values are:

■VID = 1000
■DID = 0030
■SVID = 15ad
■SDID = 1976
To obtain vendor information for all HBAs in the system using a single command:
# for a in $(esxcfg-scsidevs -a |awk '{print $1}') ;do vmkchdev -l |grep $a ;done

5.You can now search the VMware Compatibility Guide for the Vendor ID (VID), Device ID (DID), Sub-Vendor ID (SVID), and Sub-Device ID (SDID). In some cases, you may need to do a text search to narrow down the particular card.
Note: You can check the ESXi/ESX host version with the command:

# vmware -v
Obtaining Network card driver and firmware information
To determine the version information for a physical network interface card in vSphere ESXi/ESX 4.x and 5.x:

1.Open a console to the ESXi/ESX host. For more information, see Unable to connect to an ESX host using Secure Shell (SSH) (1003807) or Using Tech Support Mode in ESXi 4.1 and ESXi 5.x (1017910).

2.Obtain a list of network interface cards and names.
In ESXi/ESX 4.x, run this command:
# esxcfg-nics -l
For example:
# esxcfg-nics -l
Name    PCI         Driver Link Speed    Duplex MAC Address
vmnic0  00:02:04.00 ACME   Up   1000Mbps Full   01:23:45:67:89:AB
vmnic1  00:02:05.00 ACME   Up   1000Mbps Full   01:23:45:67:78:AC
In ESXi 5.x, run this command:
# esxcli network nic list

3.Use the ethtool -i command to display available information for one of the network interfaces, specifying its name from step 2:
# ethtool -i VMNic_name
For example:
# ethtool -i vmnic0
driver: ACME
version: 1.2.3a-1vmw
firmware-version: 7.8.9
bus-info: 0000:02:04.00
To obtain information from ethtool -i for all network adapters at once, you can run the following command:
for a in $(esxcfg-nics -l|awk '{print $1}'|grep [0-9]) ;do ethtool -i $a;done

4.To determine the recommended driver for the card, we must obtain the Vendor ID (VID), Device ID (DID), Sub-Vendor ID (SVID), and Sub-Device ID (SDID) using the vmkchdev command:
# vmkchdev -l |grep vmnic0
002:01.0 8086:100f 15ad:0750 vmkernel vmnic0
In this example, the values are:

◦VID = 8086
◦DID = 100f
◦SVID = 15ad
◦SDID = 0750
To obtain vendor information for all NICs in the system using a single command:
# for a in $(esxcfg-nics -l |awk '{print $1}' |grep [0-9]) ;do vmkchdev -l |grep $a ;done

5.You can now search the VMware Compatibility Guide for the Vendor ID (VID), Device ID (DID), Sub-Vendor ID (SVID), and Sub-Device ID (SDID). In some cases, you may need to do a text search to narrow down the particular card.
Note: You can check the ESXi/ESX host version with the command:
# vmware -v

6.From both the ESXi/ESX version and the network type, you then know the version of the driver to use. Any driver updates are available on the VMware downloads page.

Friday, 3 May 2013

ESXi4 mount idrac iso and update nic drivers vmkload_mod

Driver versions Before:
~ # vmkload_mod -s bnx2x | grep Version
 Version: Version 1.72.54.v41.1, Build: 00000, Interface: ddi_9_1 Built on: May  9 2012
~ #
~ # vmkload_mod -s cnic | grep Version
 Version: Version 1.72.50.v41.1, Build: 00000, Interface: ddi_9_1 Built on: May  2 2012
~ # vmkload_mod -s bnx2i | grep Version
 Version: Version 2.72.10.v41.2, Build: 00000, Interface: ddi_9_1 Built on: Apr  2 2012
~ # vmkload_mod -s bnx2 | grep Version
 Version: Version 2.2.1l.v41.1, Build: 00000, Interface: ddi_9_1 Built on: Apr 19 2012
~ #
Driver versions After:
~ # vmkload_mod -s bnx2x | grep Version
 Version: Version 1.74.22.v41.1, Build: 00000, Interface: ddi_9_1 Built on: Dec 20 2012
~ # vmkload_mod -s cnic | grep Version
 Version: Version 1.74.04.v41.3, Build: 00000, Interface: ddi_9_1 Built on: Dec 20 2012
~ # vmkload_mod -s bnx2i | grep Version
 Version: Version 2.74.07.v41.1, Build: 00000, Interface: ddi_9_1 Built on: Sep 6 2012
~ # vmkload_mod -s bnx2 | grep Version
 Version: Version 2.2.3e.v41.1, Build: 00000, Interface: ddi_9_1 Built on: Aug 28 2012
~ #


To update or add drivers on existing ESX installations using esxupdate:
   (for ESX only)
1. Power on the ESX host and log into an account with administrator capability.
2. Place the driver CD in the CD-ROM drive of the ESX host.
3. Mount the driver CD.
4. Navigate to <cd mount point>/offline-bundle/ and locate the
   <offline-bundle>.zip file.
5. Run the esxupdate command to install drivers using the offline bundle.
   esxupdate --bundle=<offline-bundle>.zip update

dev # vmkload_mod iso9660
Module iso9660 loaded successfully
/dev # ls /dev/cdrom
mpx.vmhba40:C0:T0:L0                  vml.0005000000766d68626134303a303a30
mpx.vmhba42:C0:T0:L0                  vml.0005000000766d68626134323a303a30
/dev # /sbin/vsish -e set /vmkModules/iso9660/mount mpx.vmhba40:C0:T0:L0
VSISHCmdSet():Set failed: Not supported
/dev # /sbin/vsish -e set /vmkModules/iso9660/mount mpx.vmhba42:C0:T0:L0
/dev # ls -al /vmfs/volumes/cdrom
ls: /vmfs/volumes/cdrom: No such file or directory
/dev # ls -al /vmfs/volumes/CDROM
lrwxr-xr-x    1 root     root                 20 May  3 17:57 /vmfs/volumes/CDROM -> mpx.vmhba42:C0:T0:L0
/dev # cd /vmfs/volumes/CDROM
/vmfs/volumes/mpx.vmhba42:C0:T0:L0 # ls
DOC          DRIVERS.XML  OFFLINE_     SOURCE       TRANS.TBL    _RPM


/vmfs/volumes/mpx.vmhba42:C0:T0:L0 # ls
DOC          DRIVERS.XML  OFFLINE_     SOURCE       TRANS.TBL    _RPM
/vmfs/volumes/mpx.vmhba42:C0:T0:L0 # cd OFFLINE_/
/vmfs/volumes/mpx.vmhba42:C0:T0:L0/OFFLINE_ # pwd
/vmfs/volumes/CDROM/OFFLINE_
/vmfs/volumes/mpx.vmhba42:C0:T0:L0/OFFLINE_ # esxupdate --bundle=BCM_B000.ZIP update
Unpacking cross_vmware-esx-dr.. ######################################## [100%]
Removing packages :vmware-esx.. ######################################## [100%]
Installing packages :cross_vm.. ######################################## [100%]
Running [vmkmod-install.sh]...
ok.
Running [/sbin/esxcfg-secpolicy -p /etc/vmware/secpolicy]...
ok.
The update completed successfully, but the system needs to be rebooted for the
changes to be effective.
/vmfs/volumes/mpx.vmhba42:C0:T0:L0/OFFLINE_ #

Tuesday, 30 April 2013

How to find HBA WWN via ESXi Shell / CLI

with thanks to http://www.vstrong.info

How to find HBA WWN via ESXi Shell / CLI:
  • Connect to ESXi shell either via putty/SSH or DCUI (Direct Console User Interface) / server console
  • Run ‘ls /proc/scsi/‘ and check the folder names:
    ?
    1
    2
    ~ # ls /proc/scsi/
     mptsas   qla2xxx
  • Look for a folder like ‘qla2xxx‘ – QLogic HBA, ‘lpfc820‘ – Emulex HBA, ‘bnx2i” – Brocade HBA;
  • Run ‘ls /proc/scsi/qla2xxx’. You will get a list of files, named by a number. Each file contains information about one HBA;
    ?
    1
    2
    ~ # ls /proc/scsi/qla2xxx/
    6  7
  • Now run ‘cat /proc/scsi/qla2xxx/6‘ to get full info on the HBA. Alternatively, run the following commands:
    • Run ” cat /proc/scsi/qla2xxx/6 | grep -A3 ‘SCSI Device Information:’  ” to get WWNN and WWPNs:
      ?
      1
      2
      3
      4
      ~ # cat /proc/scsi/qla2xxx/6 | grep -A3 'SCSI Device Information:'
      SCSI Device Information:
      scsi-qla0-adapter-node=20000024ff31f0c8:000000:0;
      scsi-qla0-adapter-port=21000024ff31f0c8:000000:0;
    • Run “ cat /proc/scsi/qla2xxx/6 | grep ‘Host Device Name’ ” to get vmhba number:
      ?
      1
      2
      ~ # cat /proc/scsi/qla2xxx/6 | grep 'Host Device Name'
      Host Device Name vmhba3

Monday, 29 April 2013

vsphere client download url

vsphere viclient client download url

VMware vSphere Client v5.0 Update 2
"http://vsphereclient.vmware.com/vsphereclient/9/1/3/5/7/7/VMware-viclient-all-5.0.0-913577.exe"
from:
http://chall32.blogspot.co.uk/2011/10/vmware-vsphere-client-download-url.html

setting Round Robin storage defaults in ESXi 4 / 5 for falconstor

Add new rules in ESXi4:esxcli nmp satp addrule -s VMW_SATP_ALUA -V FALCON -M "IPSTOR DISK" -c tpgs_on
esxcli nmp satp setdefaultpsp --psp="VMW_PSP_RR" --satp="VMW_SATP_ALUA"


The whole thing in ESXi4 including checks before and after adding each rule:
# esxcli nmp satp list
Name                 Default PSP       Description
VMW_SATP_SYMM        VMW_PSP_FIXED     Placeholder (plugin not loaded)
VMW_SATP_SVC         VMW_PSP_FIXED     Placeholder (plugin not loaded)
VMW_SATP_MSA         VMW_PSP_MRU       Placeholder (plugin not loaded)
VMW_SATP_LSI         VMW_PSP_MRU       Placeholder (plugin not loaded)
VMW_SATP_INV         VMW_PSP_FIXED     Placeholder (plugin not loaded)
VMW_SATP_EVA         VMW_PSP_FIXED     Placeholder (plugin not loaded)
VMW_SATP_EQL         VMW_PSP_FIXED     Placeholder (plugin not loaded)
VMW_SATP_DEFAULT_AP  VMW_PSP_MRU       Placeholder (plugin not loaded)
VMW_SATP_ALUA_CX     VMW_PSP_FIXED_AP  Placeholder (plugin not loaded)
VMW_SATP_CX          VMW_PSP_MRU       Supports EMC CX that do not use the ALUA protocol
VMW_SATP_ALUA        VMW_PSP_MRU       Supports non-specific arrays that use the ALUA protocol
V
MW_SATP_DEFAULT_AA  VMW_PSP_FIXED     Supports non-specific active/active arrays
VMW_SATP_LOCAL       VMW_PSP_FIXED     Supports direct attached devices
#
# esxcli nmp satp addrule -s VMW_SATP_ALUA -V FALCON -M "IPSTOR DISK" -c tpgs_on
# esxcli nmp satp setdefaultpsp --psp="VMW_PSP_RR" --satp="VMW_SATP_ALUA"
Default PSP for VMW_SATP_ALUA is now VMW_PSP_RR
 #
 # esxcli nmp satp list
Name                 Default PSP       Description
VMW_SATP_SYMM        VMW_PSP_FIXED     Placeholder (plugin not loaded)
VMW_SATP_SVC         VMW_PSP_FIXED     Placeholder (plugin not loaded)
VMW_SATP_MSA         VMW_PSP_MRU       Placeholder (plugin not loaded)
VMW_SATP_LSI         VMW_PSP_MRU       Placeholder (plugin not loaded)
VMW_SATP_INV         VMW_PSP_FIXED     Placeholder (plugin not loaded)
VMW_SATP_EVA         VMW_PSP_FIXED     Placeholder (plugin not loaded)
VMW_SATP_EQL         VMW_PSP_FIXED     Placeholder (plugin not loaded)
VMW_SATP_DEFAULT_AP  VMW_PSP_MRU       Placeholder (plugin not loaded)
VMW_SATP_ALUA_CX     VMW_PSP_FIXED_AP  Placeholder (plugin not loaded)
VMW_SATP_CX          VMW_PSP_MRU       Supports EMC CX that do not use the ALUA protocol
VMW_SATP_ALUA        VMW_PSP_RR        Supports non-specific arrays that use the ALUA protocol
VMW_SATP_DEFAULT_AA  VMW_PSP_FIXED     Supports non-specific active/active arrays
VMW_SATP_LOCAL       VMW_PSP_FIXED     Supports direct attached devices
/vmfs/volumes/518d09a9-8aab988c-fc03-90b11c0f66d2/TEST RDM #

ESXi5 error using above command:~ # esxcli nmp satp addrule -s VMW_SATP_ALUA -V FALCON -M "IPSTOR DISK" -c tpgs_on
Error: Unknown command or namespace nmp satp addrule

Correct ESXi 5 commands:esxcli storage nmp satp rule add -s VMW_SATP_ALUA -V FALCON -M "IPSTOR DISK" -c tpgs_on
esxcli storage nmp satp set --default-psp="VMW_PSP_RR" --satp="VMW_SATP_ALUA"


The whole thing in ESXi5 including checks before and after adding each rule:
~ # esxcli storage nmp satp rule list | grep -i FALCON
~#
~ # esxcli storage nmp satp rule add -s VMW_SATP_ALUA -V FALCON -M "IPSTOR DISK" -c tpgs_on
~#
~ # esxcli storage nmp satp rule list | grep -i FALCON 
VMW_SATP_ALUA    FALCON    IPSTOR DISK    user    tpg                                                             
~ #
~ # esxcli storage nmp satp list
Name                 Default PSP    Description
-------------------  -------------  -------------------------------------------------------
VMW_SATP_ALUA        VMW_PSP_MRU    Supports non-specific arrays that use the ALUA protocol
VMW_SATP_MSA         VMW_PSP_MRU    Placeholder (plugin not loaded)
VMW_SATP_DEFAULT_AP  VMW_PSP_MRU    Placeholder (plugin not loaded)
VMW_SATP_SVC         VMW_PSP_FIXED  Placeholder (plugin not loaded)
VMW_SATP_EQL         VMW_PSP_FIXED  Placeholder (plugin not loaded)
VMW_SATP_INV         VMW_PSP_FIXED  Placeholder (plugin not loaded)
VMW_SATP_EVA         VMW_PSP_FIXED  Placeholder (plugin not loaded)
VMW_SATP_ALUA_CX     VMW_PSP_FIXED  Placeholder (plugin not loaded)
VMW_SATP_SYMM        VMW_PSP_FIXED  Placeholder (plugin not loaded)
VMW_SATP_CX          VMW_PSP_MRU    Placeholder (plugin not loaded)
VMW_SATP_LSI         VMW_PSP_MRU    Placeholder (plugin not loaded)
VMW_SATP_DEFAULT_AA  VMW_PSP_FIXED  Supports non-specific active/active arrays
VMW_SATP_LOCAL       VMW_PSP_FIXED  Supports direct attached devices

~ # esxcli storage nmp satp set --default-psp="VMW_PSP_RR" --satp="VMW_SATP_ALUA"
Default PSP for VMW_SATP_ALUA is now VMW_PSP_RR
~ # esxcli storage nmp satp list
Name                 Default PSP    Description
-------------------  -------------  -------------------------------------------------------
VMW_SATP_ALUA        VMW_PSP_RR     Supports non-specific arrays that use the ALUA protocol
VMW_SATP_MSA         VMW_PSP_MRU    Placeholder (plugin not loaded)
VMW_SATP_DEFAULT_AP  VMW_PSP_MRU    Placeholder (plugin not loaded)
VMW_SATP_SVC         VMW_PSP_FIXED  Placeholder (plugin not loaded)
VMW_SATP_EQL         VMW_PSP_FIXED  Placeholder (plugin not loaded)
VMW_SATP_INV         VMW_PSP_FIXED  Placeholder (plugin not loaded)
VMW_SATP_EVA         VMW_PSP_FIXED  Placeholder (plugin not loaded)
VMW_SATP_ALUA_CX     VMW_PSP_FIXED  Placeholder (plugin not loaded)
VMW_SATP_SYMM        VMW_PSP_FIXED  Placeholder (plugin not loaded)
VMW_SATP_CX          VMW_PSP_MRU    Placeholder (plugin not loaded)
VMW_SATP_LSI         VMW_PSP_MRU    Placeholder (plugin not loaded)
VMW_SATP_DEFAULT_AA  VMW_PSP_FIXED  Supports non-specific active/active arrays
VMW_SATP_LOCAL       VMW_PSP_FIXED  Supports direct attached devices
~ #

Wednesday, 13 February 2013

SNMP Trap Receiver - Free


SNMP Trap Receiver is simple enough. What it does, it does well. Its ease is brilliant. Its efficiency is unparalled. Its operation, flawless. That is why Trap Receiver is used in thousands of organization in over 40 countries.
http://www.trapreceiver.com/
Trap Receiver User Manual
http://www.trapreceiver.com/trapreceivermanual.html

Wednesday, 9 January 2013

vsphere replication operation error: vm is in an invalid state

vsphere replication operation error: vm is in an invalid state
IGNORE THIS "ERROR" MESSAGE - ACCORDING TO VMWARE SUPPORT IT SHOULD BE AN INFORMATIONAL MESSAGE

Installing, Status and Starting VMware Tools in a Solaris VM

Installing, Status and Starting VMware Tools in a Solaris VM
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1023956

from vmware KB 1023956

Check if VMware tools service is running with the command:

# /etc/init.d/vmware-tools statusThe output is similar to:

vmtoolsd is running

to start the tools - as root:
# /etc/init.d/vmware-tools start