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

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

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

Getting started with vMA

05.30.2010 by William Lam // 4 Comments

Documentation

What is vMA?

  • Here is a video explaining vMA on VMware KBTV

Visit the vMA Home Page:

  • VMware vMA

vMA Forum:

  • VMware vSphere Management Assistant (vMA)

You will find latest Downloads, Reference Documentation and Community Discussions and links to resources.

Downloads

  • vMA 4.x Download - Supports ESX(i) 3.5u2/4.x and vCenter 2.5/4.x
  • VIMA 1.0 Download - Supports ESX(i) 3.5u2+

Tutorials

    Setting up vMA video by David Davis

    • Using the new VMware vSphere Management Assistant (vMA)

    Setting up vMA to be a syslog server by Simon Long

    • Using vMA As Your ESXi Syslog Server

    vi-fastpass

    • vMA 4.1 - Authentication Policy (fpauth vs adauth)
    • How to configure and use vMA's vi-fastpass with fpauth and adauth on vSphere 4.1
    • How to automate & cron vi-fastpass scripts on vMA 4.1

    Upgrade vMA:

    • Why you should upgrade from vMA 4.0 to vMA 4.1

    How to clone vMA:

    • Cloning vMA still not supported?

    Backup & Restore vMA + vi-fastpass DB:

    • How to backup/restore vMA's config + vi-fastpass DB

    Scripts and Tools

    vGhetto Script Repository:

    • vGhetto Script Repository

    New tools and scripts to add/manage ESX(i) and vCenter targets on vMA 4.x:

    • http://www.virtuallyghetto.com/p/vmware-vma-vima.html

    vMA Compatible Agent/Scripts(Third Party) Community List:

    • vMA Compatible Agent/Scripts(Third Party) Community List

    Health check reports on your VMware environment:

    • VMware vSphere Health Check Report - vMA 4.x
    • VMware Health Check Report - VIMA 1.0

    Taking screenshots of your VM using vMA 4.x:

    • takeVMScreenshot.pl using vMA 4.x

    Host and VM shutdown with UPS integration using vMA:

    • ghettoUPSHostShutdown.pl

    Backup VMs using vMA:

    • ghettoVCBg2 - Free alternative for backing up VMs in ESX(i) 3.5 and 4.x (no SSH console required!)

    Utilize vi-fastpass On vMA to run Perl script without clear text password:

    • useVIFastpassOnvMAToRunPerlScriptWithoutClearTextPassword.pl

    Tweaks

    Hot add memory to vMA or other supported Linux guestOSes using vSphere ESX(i) 4.x:

    • Hot add memory to vMA or other supported Linux guestOSes using vSphere ESX(i) 4.x

    How to increase/resize vMA Disks:

    • How to increase/resize vMA 4.0 Disks
    • How to increase/resize vMA 4.1 Disks

    Offline patching of vMA 4.x:

    • Update vMA without internet access

    How to install VMware VDDK on vMA:

    • How to install VDDK 1.1 on vMA 4.0 (libfuse.so.2 fix)

    Reconfigure networking on vMA:

    • vmware-vima-netconf.pl

    vMA & Active Directory:

    • vMA 4.1 - Active Directory IntegrationTip

    Removing stale targets from vMA:

    • How to remove stale targets from vMA

    Enable root account:

    Edit /etc/passwd using vi

    sudo vi /etc/passwd

    Change

    root:x:0:0:root:/root:/sbin/nologin

    to


    root:x:0:0:root:/root:/bin/bash

    Categories // Uncategorized Tags // vma, vSphere

    Getting started with the vSphere SDK for Perl

    05.30.2010 by William Lam // 8 Comments

    Step 1. Visit the vSphere SDK for Perl Home Page

    • vSphere SDK for Perl

    You will find latest Downloads, Reference Documentation and Community Discussions and links to resources.

    Step 2. Become familiar with vSphere SDK for Perl Resources:

    • Support Information: vSphere, VI 3.x SDK - Support Information
    • VMware Code Central (Sample Code) : vSphere SDK for Perl
    • Take a look at Getting Started with vSphere SDKs document

    Step 3. Explore new ways of managing your vSphere Platform using the remote CLI

    • Try some of the esxcfg-* commands bundled with the vCLI/RCLI

    Additional utilities bundled with vCLI/RCLI installation

    • vSphere SDK for Perl utility documentation
    • VI Perl Toolkit utility documentation

    Step 4. Develop and create your own scripts and utlities using the vSphere SDK for Perl
    Become familiar vSphere 4.0 API Reference documentation

    • vSphere 4.0 API Reference
    • VI 3.5 API Reference

    Step 5. Learn how to get started with writing your own Perl script using vSphere SDK for Perl

    • This VMware document is a little out dated but it still all applies to writing your own Perl scripts using the vSphere SDK for Perl

    Step 6. For more scripts developed against the vSphere SDK for Perl, check out the vGhetto Script Repository for more examples!
    I think the easiest way to learn this is to start playing with some of the canned scripts and to make it even easier to have an environment that's all setup for you with both the vCLI and vSphere SDK for Perl, you can download VMware vMA.

    Categories // Uncategorized Tags // api, perl, sdk, vma, vSphere

    • « Previous Page
    • 1
    • …
    • 471
    • 472
    • 473
    • 474
    • Next Page »

    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

    • Automated ESXi Installation with a USB Network Adapter using Kickstart 02/01/2023
    • How to bootstrap ESXi compute only node and connect to vSAN HCI Mesh? 01/31/2023
    • Quick Tip - Easily move or copy VMs between two Free ESXi hosts? 01/30/2023
    • vSphere with Tanzu using Intel Arc GPU 01/26/2023
    • Quick Tip - Automating allowed and not allowed Datastores for use with vSphere Cluster Services (vCLS) 01/25/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