Differences between revisions 23 and 24
Revision 23 as of 2019-05-06 05:35:40
Size: 7003
Editor: localhost
Comment:
Revision 24 as of 2019-07-02 14:12:22
Size: 7176
Editor: 10
Comment:
Deletions are marked like this. Additions are marked like this.
Line 188: Line 188:

== Find vmx by displayName ==
{{{
find /vmfs/volumes/BGYBH-HX-PRD/ -iname "*.vmx" -type f -print0 | time xargs -0 egrep -il "displayName.*ehrmaster03" 2>/dev/null
}}}

ESXi

Grub boot ESXi6.5u2

  • grub.cfg add ESXi6

set root=(hd0,gpt1)
search --set=root --file /efi/VMware/safebt64.efi
chainloader /efi/VMware/safebt64.efi

Build Customizer ISO

https://www.v-front.de/p/esxi-customizer-ps.html#download

ESXi-Customizer-PS-v2.6.0.ps1 -v65 -pkgDir c:\net-r816X -izip update-from-esxi6.5-6.5_update02.zip

Show Memory

smbiosDump | grep -A 12 -B 1  'Location: "DIMM' | egrep 'Location:|Bank:|Part Number:|Size:|Speed:|--'

ESXi 5.0

show arp

esxcli network ip neighbor list

show FRU

Get the source from sourceforge & unpack it

# curl "http://liquidtelecom.dl.sourceforge.net/project/ipmitool/ipmitool/1.8.15/ipmitool-1.8.15.tar.bz2" > ipmi.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  729k  100  729k    0     0   260k      0  0:00:02  0:00:02 --:--:--  260k

# bzip2 -dc ipmi.tar.gz | tar -xf -

compile

# cd ipmitool-1.8.15/
# ./configure CFLAGS=-m32 LDFLAGS=-static
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
.
.
.
#make

Scp the file and run tool from ESX host

# scp src/ipmitool root@192.168.39.12:~

RUN IT

esxcfg-scsidevs -l | egrep -i 'display name|vendor|size' | head -20

/vmfs/volumes/view-2/ipmitool fru | head

References

To power on a virtual machine from the command line:

    List the inventory ID of the virtual machine with the command:

    vim-cmd vmsvc/getallvms |grep <vm name>

    Note: The first column of the output shows the vmid.

    Check the power state of the virtual machine with the command:

    vim-cmd vmsvc/power.getstate <vmid>

    Power-on the virtual machine with the command:

    vim-cmd vmsvc/power.on <vmid> 

for vmid in `vim-cmd /vmsvc/getallvms | tail -n+2 | awk '{print $1}' | grep -o '[0-9]*'`; do vim-cmd vmsvc/power.getstate $vmid; done

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1038043

Troubleshooting

Permanent Device Loss (PDL) and All-Paths-Down (APD) in vSphere 5.x and 6.x (2004684)

Permanent Device Loss (PDL):

    A datastore is shown as unavailable in the Storage view
    A storage adapter indicates the Operational State of the device as Lost Communication

All-Paths-Down (APD):

    A datastore is shown as unavailable in the Storage view.
    A storage adapter indicates the Operational State of the device as Dead or Error.

To clean up an unplanned PDL:

    All running virtual machines from the datastore must be powered off and unregistered from the vCenter Server.
    From the vSphere Client, go to the Configuration tab of the ESXi host, and click Storage.
    Right-click the datastore being removed, and click Unmount.
    The Confirm Datastore Unmount window displays. When the prerequisite criteria have been passed, the OK button appears.
    If you see this error when unmounting the LUN:

    Call datastore refresh for object <name_of_LUN> on vCenter server <name_of_vCenter> failed

    You may have a snapshot LUN presented. To resolve this issue, remove that snapshot LUN on the array side.

    Perform a rescan on all of the ESXi hosts that had visibility to the LUN.

    Note: If there are active references to the device or pending I/O, the ESXi host still lists the device after the rescan. Check for virtual machines, templates, ISO images, floppy images, and raw device mappings which may still have an active reference to the device or datastore.

    If the LUN is still being used and available again, go to each host, right-click the LUN, and click Mount.

    Note: One possible cause for an unplanned PDL is that the LUN ran out space causing it to become inaccessible

Unable to open MKS: Internal Error” when opening virtual machine console

https://kb.vmware.com/s/article/2116542

http://noor2122.blogspot.com/2015/12/open-vm-console-unable-to-connect-to.html

Failed to log into NFC server

While looking for causes I found these possibilities:

  1. Not enough space in the datastore
  2. Port 901/902 not open between the VI Client to the source of the file (and/or VC Server, could not find if that is also a factor)
  3. DNS configuration for the host servers

As a possible solution I also found that restarting the VC Server service could help.

Deprecated VMFS volume(s)found on the host. Please consider ....

services.sh restart

how to upgrade

vim-cmd hostsvc/maintenance_mode_enter

esxcli --server=server_name software vib update --depot=/path_to_vib_ZIP/ZIP_file_name.zip

vim-cmd hostsvc/maintenance_mode_exit

How to upgrade ESXi 6.0 to ESXi 6.5 via Offline Bundle – The Steps:

# esxcli software sources profile list -d /vmfs/volumes/NEW-HX-TEST01/HX-Vmware-ESXi-6.5U1-5969303-Cisco-Custom-6.5.1.1-Bundle.zip
Name                                               Vendor  Acceptance Level
-------------------------------------------------  ------  ----------------
Vmware-ESXi-6.5.0-HX-5969303-Custom-Cisco-6.5.1.1  CISCO   PartnerSupported

[root@BGY-HX-13:/vmfs/volumes/b897e8ce-f4ee56e5] esxcli software profile update -d /vmfs/volumes/NEW-HX-TEST01/HX-Vmware-ESXi-6.5U1-5969303-Cisco-Custom-6.5.1.1-Bundle.zip -p Vmware-ESXi-6.5.0-HX-5969303-Custom-Cisco-6.5.1.1
Update Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true

esxcli software profile update -p ESXi-6.5.0-4564106-standard -d /vmfs/volumes/your_datastore/VMware-ESXi-6.5.0-4564106-depot.zip

Interpreting SCSI sense codes in VMware ESXi and ESX

  • SCSI events that can trigger ESX server to fail a LUN over to another path

https://kb.vmware.com/selfservice/search.do?cmd=displayKC&docType=kc&docTypeID=DT_KB_1_1&externalId=1003433

vim-cmd how to

For HBA information only

vmware-vim-cmd hostsvc/summary/hba

For datastore information only

vmware-vim-cmd hostsvc/summary/fsvolume

esxcfg-scsidevs -l

show hba controller

  • Dell PERC

/opt/lsi/perccli/perccli /c0 show

Find vmx by displayName

find /vmfs/volumes/BGYBH-HX-PRD/ -iname "*.vmx" -type f -print0 | time xargs -0 egrep -il "displayName.*ehrmaster03" 2>/dev/null

désert/VMware/ESXi (last edited 2025-04-02 06:32:20 by merlyn)