WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple
You are here: Home / Uncategorized / vSphere Tips and Tricks Part 1

vSphere Tips and Tricks Part 1

05.30.2010 by William Lam // 3 Comments

Disclaimer: Ensure these changes have been thoroughly tested and confirmed with VMware support prior to rolling out into production. Most of these changes and tips may be undocumented by VMware, test at your own risk!

Map Service Console/COS VMDK to specific ESX host (useful if you boot from SAN):

grep -i "hostname" /vmfs/volumes/[datastore]/[esxconsole-datastore-uuid]/logs/sysboot-vmkernel-late.log
[[email protected] ~]# grep -i "hostname" /vmfs/volumes/everest-local-storage/esxconsole-49a095a4-204d-c7ba-9bb8-001f29c7b048/logs/sysboot-vmkernel-late.log
0:00:00:06.289 cpu1:4105)Config: 363: "HostName" = "everest.primp-industries.com", Old value: "localhost" (Status: 0x0)

Retrieve VmId from vmware-cmd similiar to that in vimsh/vmware-vim-cmd (only available on classic ESX, not sure why it's not in vCLI):

vmware-cmd /vmfs/volumes/[datastore]/[path_to_vm]/vm.vmx getid
[[email protected] ~]# vmware-cmd /vmfs/volumes/d32c5a97-e039bdbf/vCenter-ESX4.02172009/vCenter-ESX4.02172009.vmx getid
getid() = 32

VMware FT statistics and debugging utility
Available after some patch set, generally 4.0u1+

[[email protected] ~]# ft-stats
Usage: ft-stats [-hvf] [-c ] [-l] [-n ] [-d ] [-s ] [-w ]
-h, --help Show this message
-v, --verbose verbose output
-f, --force Continue even if version check fails
-c, --cache Use VSI cache file
-l, --list list FT VMs
-n, --iterations Print stats for n iterations
-d, --delay Print stats every n secs (default:5)
-s, --snapshot Collect stats for n secs
-w, --world Print stats for worldID

Note: This tool is intended to assist in troubleshooting and should only be used
with direction by VMware support. All other use of this tool is unsupported.

esxupdate - Query for installed/retired packages with undocumented "--vib-view" option

esxupdate --vib-view query
[[email protected] ~]# esxupdate --vib-view query
--------------------------------------VIB ID------------------------------------- Package State -----------Timestamp------------
rpm_[email protected]x86_64 installed 2010-01-06T12:24:38.100201-05:00
[email protected]_64 installed 2010-04-02T17:09:44.566014+00:00
[email protected]_64 installed 2010-04-02T17:09:44.171847+00:00
[email protected]_64 installed 2010-04-02T17:09:41.148547+00:00
[email protected]_64 installed 2010-04-02T17:09:36.911452+00:00

Change default COW (copy on write) disk growth value
Query (Default is 16MB):

[[email protected] ~]# esxcfg-advcfg -g /COW/COWDiskSizeIncrement
Value of COWDiskSizeIncrement is 32768

Set (e.g. 256MB):

[[email protected] ~]# esxcfg-advcfg -s 524288 /COW/COWDiskSizeIncrement
Value of COWDiskSizeIncrement is 524288

The input value for changing COWDiskSizeIncrement is in sectors

UNIT SECTORS COW GROWTH SIZE
32768 16MB
65536 32MB
131072 64MB
262144 128MB
524288 256MB
2097152 1024MB
.... ....

Easy formula is (SIZE_IN_MB)*(1024)*(2) = SECTOR VALUE

More from my site

  • How to Create Custom Roles on Standalone ESX(i) Host
  • esxcli Part3 - Automating esxcli using PowerShell
  • esxcli Part2 - Automating esxcli using vMA
  • esxcli Part1 - What is esxcli?
  • Logging into vCenter when vCenter Cloud Gateway (VCGW) is disconnected from vSphere+ Cloud Service

Categories // Uncategorized Tags // cos, cow, esx4, vimsh, vSphere

Comments

  1. NiTRo says

    06/13/2010 at 9:13 am

    William, is the COW value only stand for snapshot ?

    Reply
  2. William says

    06/14/2010 at 11:53 pm

    @NiTRO,

    This applies to snapshots and thinly provisioned disks, basically any "sparse" disks will be using the default COW value of 16MB as I understand it.

    Here are more details regarding COW disks - http://kb.vmware.com/Platform/Publishing/attachments/1001175_fLinked%20Clone%20Managment.htm

    Reply
  3. Anonymous says

    10/02/2010 at 5:43 am

    How to use ft-stats ?
    Log = Stats not available, FT probably not active
    GL

    Reply

Thanks for the comment! Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • How to disable the Efficiency Cores (E-cores) on an Intel NUC? 03/24/2023
  • Changing the default HTTP(s) Reverse Proxy Ports on ESXi 8.0 03/22/2023
  • NFS Multi-Connections in vSphere 8.0 Update 1 03/20/2023
  • Quick Tip - How to download ESXi ISO image for all releases including patch updates? 03/15/2023
  • SSD with multiple NVMe namespaces for VMware Homelab 03/14/2023

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2023