• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Yellow Bricks

by Duncan Epping

  • Home
  • ESXTOP
  • Stickers/Shirts
  • Privacy Policy
  • About
  • Show Search
Hide Search

esxcli

How do I set an advanced setting which is not listed through esxcli on the commandline?

Duncan Epping · Jul 4, 2022 · Leave a Comment

Someone asked this question recently, and it is a valid point, it seems that some namespaces are not available through esxcli when it comes to the advanced settings. Now you can of course set the advanced settings via the UI, but in some cases you may need/want to script them. This is possible when you use one of the older CLIs available on your host, namely “vim-cmd”. Now, vim-cmd was never really intended to be used by administrators so I would urge caution. However, in some cases it is very difficult to get around it, and for instance, setting “Config.HostAgent.ssl.keyStore.allowSelfSigned” to “true” is one of those. You can’t, to my knowledge, currently do this via esxcli. You can, however, simply do this via vim-cmd. The syntax is as follows:

vim-cmd hostsvc/advopt/update name.option type value

In my particular case, that means the command would look like this:

vim-cmd hostsvc/advopt/update Config.HostAgent.ssl.keyStore.allowSelfSigned bool "true"

Where “update” is used to update the value for the advanced setting. If you just want to list all settings first you could use the following command:

vim-cmd hostsvc/advopt/settings

I hope that helps someone out there!

Enabling maintenance mode via esxcli

Duncan Epping · Jan 7, 2020 ·

I have been having to place my lab host into maintenance mode a few times now via the command-line, for whatever reason I just keep forgetting the command that I should use to place my host into maintenance mode using esxcli, so I figured I would dump it here so I can find it easily. Hopefully, now it sticks…

enter maintenance mode:

esxcli system maintenanceMode set --enable true

exit maintenance mode:

esxcli system maintenanceMode set --enable false

vSphere Flash Read Cache and esxcli

Duncan Epping · Sep 13, 2013 ·

As most features these days in vSphere you can configure them using the awesome esxcli command. I’ve already mentioned esxcli in my vSphere Flash Read Cache FAQ blog but I wanted to call it out explicitly here as I found it very useful. You can get some nice details using the esxcli command. So where do we start?

First thing would be:

esxcli storage vflash

This will return that there are 3 namespaces: cache, module and device. Lets start top down with device. The command “esxcli storage vflash device list” will show you a list of all flash devices and whether it has been configured for vFRC or not. The module namespace can provide you some more details around for instance cache blocksizes etc. If you run the command this is what the output looks like:

~ # esxcli storage vflash module get
 Min Supported Module Version: 1.0.0.0
 Revision: 1.0.0.0
 Supported Cache Block Size Max: 1048576
 Supported Cache Block Size Min: 4096
 Supported Cache Size Max: 214748364800
 Supported Cache Size Min: 4194304
 Supported Disk Size Max: 17592186044416
 Supported Mode Mask: WriteThru

[Read more…] about vSphere Flash Read Cache and esxcli

Pinging from different VMkernel NICs using esxcli?

Duncan Epping · May 27, 2013 ·

Today I had a network issue in my lab, I still don’t have a clue what the issue was but I did discover something useful. I had 3 different VMkernel’s setup and I wanted to make sure each of the three had network connection to a specific destination address. After going through the esxcli command I bumped in to the following command which I found very helpful:

esxcli network diag ping -I vmk0 -H 10.27.51.132

In this case I use VMkernel Interface “vmk0” to ping to the address “10.27.51.132”. If I want to use a different VMkernel Interface I just specify it, so swap “vmk0” with “vmk1” for instance. Useful right?!

How to change the IP Address of ESXi through the commandline

Duncan Epping · May 27, 2013 ·

I was building out my virtualized lab and instead of re-installing ESXi over and over again I figured I would just quickly clone them. Now of course this leads to a “minor” problem as the virtualized ESXi hosts will all boot with the same IP-Address. As I don’t have DHCP to my disposal I needed to change them manually, so how do you change the IP address of ESXi through the commandline?

It is actually pretty straight forward with esxcli these days. First thing I did was listing all VMkernel NICs:

esxcli network ip interface ipv4 get

This will give you the list of all VMkernel interfaces with their details (See screenshot below). Changing the IP address is just a matter of adding some parameters:

esxcli network ip interface ipv4 set -i vmk1 -I 10.27.51.143 -N 255.255.255.0 -t static

In your situation you will need to replace “vmk1” with the appropriate VMkernel NIC of course and change the IP details.

change ip address of esxi

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Go to Next Page »

Primary Sidebar

About the author

Duncan Epping is a Chief Technologist in the Office of CTO of the Cloud Platform BU at VMware. He is a VCDX (# 007), the author of the "vSAN Deep Dive", the “vSphere Clustering Technical Deep Dive” series, and the host of the "Unexplored Territory" podcast.

Upcoming Events

May 24th – VMUG Poland
June 1st – VMUG Belgium

Recommended Reads

Sponsors

Want to support Yellow-Bricks? Buy an advert!

Advertisements

Copyright Yellow-Bricks.com © 2023 · Log in