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