WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple

Quick Tip - "poor mans" history command in ESXi

02.19.2015 by William Lam // 1 Comment

When I am logged into the ESXi Shell, I often forget that history command is not implemented in ESXi which can be helpful when recalling the list of operations that had been executed in the past. I especially rely on the history command when I am tinkering around with things and once I am successful with the end result, I can easily go back and see the exact steps I took. Recently, I tried running history command only to be let down again as I forgot it was not implemented 🙁

I was thinking there had to be a way on ESXi and then it hit me! Starting with ESXi 5.1, all operations executed in ESXi Shell and Console were automatically logged to /var/log/shell.log. The information I was looking was there but instead of having to manually view the contents of the log, I could simply create an "alias" to  a history command which could display the last N-number of entries using the tail command.

Here is an example alias to "history" command to view the last 50 lines in /var/log/shell.log:

alias history="tail -50 /var/log/shell.log"

To make the alias permanent and persist across reboots, we just need to add the entry to /etc/profile.local

Now, I can run the history command on ESXi and get exactly what I want.

Screen Shot 2015-02-18 at 9.29.41 PM
Note: Entries in /var/log/shell.log contain more operations executed by all users. You can further refine the aliased command to search only for the current user, such as the root account.

Categories // ESXi Tags // alias, cli, ESXi, history, shell

List of VMware CLIs, SDKs & DevOps Tools

01.05.2015 by William Lam // 1 Comment

A frequent question that I get asked from customers and new developers that are looking to get started with VMware Automation is what CLIs (command-line interfaces) or SDKs (programing/scripting specific languages) are available for them to use? I know it is not always easy to find out what is available on the VMware.com website and some times I even have trouble browsing for all the right information as it is located in many different places. I figure it would be helpful not only for myself but also for others if I put together a list of the various VMware CLIs, SDKs and even some of the new DevOps Tools that VMware has been working on that are available to our customers/developers and partners. I have also included a couple of community tools that I think are pretty interesting. If there are others that you think I should add to the list, feel free and leave a comment.

Note: This is by no means a comprehensive list of every single VMware product/toolkit as there are many many more, including gated SDKs specifically for our partner eco-system. For more details on those API/SDKs, be sure to check out the VMware Developer Center.

UPDATE (4/20) - VMware now has an Open Source page on Github http://vmware.github.io/

VMware Cloud Native Apps:

  • VMware Photon
  • VMware Lightwave

VMware DevOps Tools:

  • VMware Docker Machine
  • VMware boot2docker
  • Packer vmware-ovf post processor
  • open-vmdk
  • Vagrant plugin for Photon

vCloud Air:

  • CLIs
    • RaaS (Recovery as a Service) CLI
    • vCloud Air CLI
  • SDKs
    • vCloud Air SDK for Go
    • vCloud Air SDK for Python
  • DevOps Tools
    • Vagrant vCloud Air Provider

vCloud Director:

  • CLIs
    • vCloud Director Tenant and Provider PowerCLI
  • SDKs
    • vCloud Director SDK for .NET
    • vCloud Director SDK for Java
    • vCloud Director SDK for PHP
  • DevOps Tools
    • Vagrant vCloud Director Provider

vSphere:

  • CLIs
    • govc CLI
    • vSphere CLI
    • vSphere PowerCLI
    • vSphere RVC CLI
    • vSphere ovftool CLI
    • vSphere PVC CLI
  • SDKs
    • vSphere SDK for .NET
    • vSphere SDK for Go (govmomi)
    • vSphere SDK for Java
    • vSphere SDK for Perl
    • vSphere SDK for Python (pyvmomi)
    • vSphere SDK for Ruby (rbvmomi)
    • vSphere SDK for JavaScript
    • VSAN Management SDK for .NET
    • VSAN Management SDK for Java
    • VSAN Management SDK for Python
    • VSAN Management SDK for Ruby
  • DevOps Tools
    • VMware Library Puppet Module
    • VMware vCNS Puppet Module
    • VMware vCenter Server Appliance Puppet Module
    • VMware vCenter Server Puppet Module
    • Vagrant Rbvmomi Provider
    • Vagrant vCenter Server Provider

vRealize Management Suite:

  • CLIs
    • vRealize Cloud Client CLI
    • vRealize Automation Center CLI
  • SDKs
    • vRealize Automation SDK for Java
    • vReazlie Orchestrator Plug-In SDK

VMware Community Tools:

  • Vagrant vCenter Simulator Provider
  • Docker Plugin for VMware vRealize Orchestrator
  • VMware VIX API in Go
  • vcloud-tools

Categories // Automation, Cloud Native, vCloud Air, vRealize Suite, vSphere Tags // api, cli, DevOps, Docker, Packer, sdk, Vagrant

Disabling IPv6 via Command-Line For ESXi 5.1 (Without Automatic Host Reboot)

09.14.2012 by William Lam // 16 Comments

IPv6 for the VMkernel interface is now automatically enabled by default for the latest release of ESXi 5.1 and you may have also noticed the additional IP Address in DCUI after the host boots up.

IPv6 support has been around for awhile now and you can enable IPv6 by using the old vSphere C# Client or the new vSphere Web Client. If you enable or disable IPv6, you will need to perform a system reboot for the changes to go into effect. You also have the ability to enable/disable it via the DCUI, which also has been around for awhile as well.

UPDATE: 07/20/15 - For ESXi 6.0, the VMkernel module is name is now tcpip4 instead of tcpip3.

There is one very important thing to note if you do enable/disable IPv6 on the DCUI, after you made your changes and you wish to apply, there is a very important confirmation box that is displayed.

Carefully read the last sentence which is underline in red "In case IPv6 has been enabled or disabled this will restart your host". If you are not careful in reading the confirmation screen, you may hit yes and your host will issue a reboot. If you are going to use the DCUI to enable or disable IPv6, make sure you do not have any running VMs on your host and you should already have your host maintenance mode when making configuration changes to your host.

In addition to the two methods listed above (vSphere Web Client/C# CLient and DCUI) you can easily enable/disable IPv6 using ESXCLI (my preferred method) and restart the ESXi host when you get a chance.

To view whether IPv6 is currently enabled, run the following ESXCLI command (ESXi 5.5 Update 1 the VMkernel module is now called tcpip4):

esxcli system module parameters list -m tcpip3

As you can see from the screenshot above, ipv6 property is set to 1 which means it is enabled.

To disable IPv6, you just need to set the property to 0, run the following ESXCLI command:

esxcli system module parameters set -m tcpip3 -p ipv6=0

We can now reconfirm by re-running our list operation to ensure the changes were made successfully. All that is left is to perform a system reboot, you can either type in "reboot" or use the new ESXCLI 5.1 command:  

esxcli system shutdown reboot -d 60 -r "making IPv6 config changes"

Note: You can run the ESXCLI command locally on the ESXi Shell or you can run the same command remotely by specifying additional connection options & proxy through vCenter Server if you wish. Take a look here for additional connection options for ESXCLI.

Categories // ESXi, vSphere 5.5, vSphere 6.0 Tags // cli, esxcli, ESXi 5.0, ESXi 5.1, ipv6, vSphere 5.0, vSphere 5.1

  • 1
  • 2
  • 3
  • Next Page »

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

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 © 2025

 

Loading Comments...