Saturday, May 30, 2020

vsantop command

What is vsantop?

vsantop is a new vSAN related command that first appeared on vSphere 6.7U3. Similar to the esxtop command, vsantop has lots of interesting options that can show all sorts of vSAN related information.
This utility can be run in batch mode by using the "-b" option combined with the "-d" option to specify the delay plus the "-n" option to specify the number of iterations.

1. putty into an esxi host and type "vsantop" to see the default "host-domclient" view (entity).


2. type "h" or "?" to get help



3. type "s" to change the seconds to delay (refresh rate)




4. type "E" to change entieties/views



5. Type "f" or "F" to potentially add or remove columns




6. type "o" to potentially change the order of the columns



Examples:

system-pmem option:



cache-disk option (the host has 1 cache disk):


capacity-disk option (the host has 2 capacity disks):


vsan-pnic-net option (the host is using 1 nic):


disk-group option (the host has 1 disk group):


6. Type "q" for quit

Friday, May 22, 2020

The psql command

1. Use to psql command to start using postgres commands



2. Use \h to view all sql commands



3. Use the \h option followed by a command to learn how to use such command



4. Use \? to view all postgres commands


5.  Type \l+ to check the sizes of the databases



6. Connect to the vCenter database and verify connectivity



7.  Use \dt to list all tables



8. Use \z to view all tables, views and sequences



9. Use the following command to view the size of a particular table


10. Use \du to view all users and their roles



11 . Use \s to view previously executed commands


12.  Use \q to quit




service-control examples

service-control examples

1. Use the --help option to view available subcommands


 2. Use the --list option to learn about what these services are for


3. Use the --status option to view which ones are running

 4. Use the following options to learn about dependencies and start the services


Thursday, March 19, 2020

vSAN 7.0 File Services

vSAN 7.0 File Shares

One of the new features of vSAN 7.0 is the ability to create NFS shares inside of the vSAN datastore. This is done using agents, which are deployed via ovf. Below are the steps.

Step 1: Select your vSAN cluster and go to Configure. Enable File Service.




Step 2: Go through the wizard to configure your NFS file shares.


Step 3: Download the ovf from the Internet (automatic approach)



Step 4: Specify your authentication method (auth_sys) and provide domain information.



Step 5: Specify the port group for your agent appliances.



Step 6: Wait for the appliances to be configured. Be patient and monitor the recent tasks.









Step 7: Monitor the Recent Tasks and make sure they finish before proceeding.



Step 8: Click on ADD to configure your first share.



Step 9: Select the size and policy of the share.



Step 10: Specify who can access the share.



Step 11: Click on Finish.



Step 12: Notice who the owner of the share is.



Step 13: Verify the health of the setup.



Step 14: Use the cmmds-tool command to view attributes.



Step 15: Mount the file system from an nfs client.









Tuesday, October 29, 2019

Some cool esxcli iscsi commands

1. Is iSCSI enabled?

# esxcli iscsi software get
true

2. Which vmhba is used for iSCSI?

# esxcli iscsi adapter list
Adapter  Driver     State   UID                                         Description
-------  ---------  ------  ------------------------------------------  ----------------------
vmhba65  iscsi_vmk  online  iqn.1998-01.com.vmware:sa-esxi-02-400f0480  iSCSI Software Adapter

3. Which vmkernel port is used for iSCSI?

# esxcli iscsi networkportal list
vmhba65
   Adapter: vmhba65
   Vmknic: vmk3
   MAC Address: 00:50:56:01:c1:ba
   MAC Address Valid: true
   IPv4: 172.20.13.52
   IPv4 Subnet Mask: 255.255.255.0
   IPv6:
   MTU: 1500
   Vlan Supported: true
   Vlan ID: 0
   Reserved Ports: 63488~65536
   TOE: false
   TSO: true
   TCP Checksum: false
   Link Up: true
   Current Speed: 10000
   Rx Packets: 2888785
   Tx Packets: 838121
   NIC Driver: nvmxnet3
   NIC Driver Version: 2.0.0.27
   NIC Firmware Version: NA
   Compliant Status: compliant
   NonCompliant Message:
   NonCompliant Remedy:
   Vswitch: dvs-SA-Datacenter
   PortGroup: DvsPortset-0
   VswitchUuid: 50 2b 40 6e 00 70 b4 d4-66 93 6e 79 fa 6b bb c4
   PortGroupKey: dvportgroup-55
   PortKey: 8
   Opaque Network Id:
   Opaque Network Type:
   External Id:
   Duplex:
   Path Status: active

Some cool esxcli system commands

1. How to view your vSphere version

# esxcli system version get
   Product: VMware ESXi
   Version: 6.7.0
   Build: Releasebuild-8169922
   Update: 0
   Patch: 0

2. To view hostname and domain name

# esxcli system hostname get
   Domain Name: vclass.local
   Fully Qualified Domain Name: sa-esxi-02.vclass.local
   Host Name: sa-esxi-02

3. To view local users

# esxcli system account list
User ID  Description
-------  -------------------------------------------
root     Administrator
dcui     DCUI User
vpxuser  VMware VirtualCenter administration account

4. To view permissions for local users

# esxcli system permission list
Principal  Is Group  Role   Role Description
---------  --------  -----  ------------------
dcui          false  Admin  Full access rights
root          false  Admin  Full access rights
vpxuser       false  Admin  Full access rights

5. To view specific advanced settings

# esxcli system settings advanced list -t UserVars | more
   Path: /UserVars/ActiveDirectoryPreferredDomainControllers
   Type: string
   Int Value: 0
   Default Int Value: 0
   Min Value: 0
   Max Value: 0
   String Value:
   Default String Value:
   Valid Characters: *
   Description: Preferred Domain Controllers for Active Directory

   Path: /UserVars/ActiveDirectoryVerifyCAMCertificate
   Type: integer
   Int Value: 1
   Default Int Value: 1
   Min Value: 0
   Max Value: 1
   String Value:
   Default String Value:
   Valid Characters:
   Description: Enable or disable verification of SSL certificate for vSphere Authentication Proxy server

   Path: /UserVars/ESXiShellTimeOut
   Type: integer
   Int Value: 0
   Default Int Value: 0
   Min Value: 0
   Max Value: 86400
   String Value:
   Default String Value:
   Valid Characters:
   Description: Time before automatically disabling local and remote shell access (in seconds, 0 disables).  Takes effect after the services are restarted.
...

Wednesday, June 5, 2019

NSX-T 2.4 Test Drive

Log in as admin using the NSX Manager Simplified UI after deploying the first NSX Manager Node via ovf/ova. These can also be installed using KVM.


Register the Computer Managers (vCenters) with NSX:





Create a Management Cluster with 3 nsx appliances and configure the Virtual IP:


Verify the state of your cluster:



Get Comfortable with the Simplified AND Advanced user Interfaces. Be aware that the terminology varies depending on the Interface you are using.



Add Transport Nodes, Transport Zones, IP Pools and N-VDSs:






If you enable SSH, learn about commands:






Take a look at the Dashboards: