Esxcli: Difference between revisions

From VI-Toolkit
Jump to navigation Jump to search
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:


[http://pubs.vmware.com/vsphere-60/index.jsp?topic=%2Fcom.vmware.dcli.cmdref.doc%2Fintro.html vSphere 6.0 official esxcli reference]


=== Disable the firewall ===
=== Disable the firewall ===
Line 17: Line 18:


=== enable 2GB Sparse disks ===
=== enable 2GB Sparse disks ===
By default the 2GB Sparse disk format is disabled since -I think- ESXi version 5.x
By default the 2GB Sparse disk format is disabled since ESXi version 5.1 and higher.
If you try to import a disk in 2GB disk format you'll get the following error:
If you try to import a disk in 2GB disk format you'll get the following error:
  # vmkfstools -i /vmfs/volumes/storage/myVM/myVM.vmdk -d thin myVM.vmdk
  # vmkfstools -i /vmfs/volumes/storage/myVM/myVM.vmdk -d thin myVM.vmdk
  Failed to open '/vmfs/volumes/storage/myVM/myVM.vmdk': The system cannot find the file specified (25).
  Failed to open '/vmfs/volumes/storage/myVM/myVM.vmdk': The system cannot find the file specified (25).
Test if you have sparse format enabled:
esxcli system module list | grep multiextent
If sparse format is not enabled you get no output, if it is enabled, the output is like:
  # esxcli system module list | grep multiextent
multiextent                        true        true


You can enable the 2GB disk format by using:
You can enable the 2GB disk format by using:
  esxcli system module load -m multiextent
  esxcli system module load -m multiextent
=== advanced settings list ===
Remind yourself of your changed system advanced settings by using:
esxcli system settings advanced list -d
from: https://twitter.com/AtherBeg/status/481743367957934080
=== Getting UUID ===
There are two main UUID’s in ESXi, well technically more but let’s just stick to these two :) System and Hardware UUID
from: https://twitter.com/lamw/status/570971985871654913
==== System UUID ====
UUID shown in esxcfg-info & esx.conf is the "System” UUID
You can easily get ESXi “System” UUID via
esxcli system uuid get
==== Hardware UUID ====
UUID shown from vSphere API including PowerCLI is showing the "Hardware" UUID
You can easily get ESXi “Hardware” UUID via
esxcli hardware platform get
==== setup 64-Node VSAN 6.0 Cluster ====
If you want to setup 64-Node VSAN 6.0 Cluster, make sure to run following & reboot:
esxcli system settings advanced set -o /VSAN/goto11 -i 1
source: https://twitter.com/lamw/status/568095961156689920


=== resources ===
=== resources ===

Latest revision as of 10:37, 7 April 2015

vSphere 6.0 official esxcli reference

Disable the firewall

Disable the firewall completely.

esxcli network firewall set --enabled false

Install a patch bundle

esxcli software vib install -d /vmfs/volumes/yourvolumename/patch/patch.zip


install a vib file

esxcli software vib install -v /vmfs/volumes/yourvolumename/patch/patch.vib


enable 2GB Sparse disks

By default the 2GB Sparse disk format is disabled since ESXi version 5.1 and higher. If you try to import a disk in 2GB disk format you'll get the following error:

# vmkfstools -i /vmfs/volumes/storage/myVM/myVM.vmdk -d thin myVM.vmdk
Failed to open '/vmfs/volumes/storage/myVM/myVM.vmdk': The system cannot find the file specified (25).

Test if you have sparse format enabled:

esxcli system module list | grep multiextent

If sparse format is not enabled you get no output, if it is enabled, the output is like:

 # esxcli system module list | grep multiextent 
multiextent                         true        true

You can enable the 2GB disk format by using:

esxcli system module load -m multiextent

advanced settings list

Remind yourself of your changed system advanced settings by using:

esxcli system settings advanced list -d

from: https://twitter.com/AtherBeg/status/481743367957934080

Getting UUID

There are two main UUID’s in ESXi, well technically more but let’s just stick to these two :) System and Hardware UUID

from: https://twitter.com/lamw/status/570971985871654913

System UUID

UUID shown in esxcfg-info & esx.conf is the "System” UUID

You can easily get ESXi “System” UUID via

esxcli system uuid get

Hardware UUID

UUID shown from vSphere API including PowerCLI is showing the "Hardware" UUID

You can easily get ESXi “Hardware” UUID via

esxcli hardware platform get

setup 64-Node VSAN 6.0 Cluster

If you want to setup 64-Node VSAN 6.0 Cluster, make sure to run following & reboot:

esxcli system settings advanced set -o /VSAN/goto11 -i 1

source: https://twitter.com/lamw/status/568095961156689920

resources

VMware Front Experience:

How to write your own esxcli plugin

esxcli plugin to run shell commands