Search
StarWind is a hyperconverged (HCI) vendor with focus on Enterprise ROBO, SMB & Edge

VMware vCenter Server 7 tips

  • August 4, 2020
  • 12 min read
IT and Virtualization Consultant. Vladan is the founder, and executive editor of the ESX Virtualization Blog at vladan.fr. He is a VMware VCAP-DCA and VCAP-DCD, and has been a vExpert from 2009 to 2023.
IT and Virtualization Consultant. Vladan is the founder, and executive editor of the ESX Virtualization Blog at vladan.fr. He is a VMware VCAP-DCA and VCAP-DCD, and has been a vExpert from 2009 to 2023.


While this post will cover some cool tips for VMware vCenter Server 7, it won’t be limited to vCenter only. There will be some tips for managing vSphere 7 too. There has been several months now since vSphere 7 has been released and so far, many businesses stayed away for different reasons.

One of the first one is the fact that not many backup/monitoring products were compatible with this release, and also because simply there were no new deployments with new hardware compatible with vSphere 7. Now let’s jump into some tips for vCenter server and vCSA 7.

Not all tips are recommended to use in production environment, but it’s good to know that they exists and in case of need, you can use them.

Increase Shell Session Timeout

When you jump back and forth to manage different systems, you need to re-enter your credentials each time instead of being already authentified ?

By default, vCenter server logs you out after 15 min of inactivity. This is a security feature that prevents unauthorized person to access the VCSA UI when you have left the computer.

You can check the current settings via this command:

Will show you the current settings. You need to login via an SSH client and enable the bash shell by typing “shell”.

Verify the timeout settings of VCSA

Verify the timeout settings of VCSA

Why not to increase shell session timeout? You might have different requirements from the defaults.

  1. Go ahead and edit /etc/profile.d/tmout.sh this file with VI editor.
  2. Then you’ll need to change the line TMOUT=900 to other value. (for example, with much higher number)
  3. Next, you’ll need to save and close the file (with WQ! I believe).
  4. Then log out and log back in to validate the settings.

Note: You have a possibility to completely disable timeout for your sessions by deleting a tmount.sh script from this location with this command:

Before you do that, make sure that you create a VMware snapshot or create a full VM backup via your backup software.

VMware Datacenter CLI (DCLI)

This is a new CLI introduced by VMware for managing VCSA. It Is not very known feature outside a small circle of initiated admins, but you can find more through VMware communities.

However it’s already in its 3rd release. DCLI was first introduced about 3 years ago as tech preview first and then as a standalone product. When it was added as a Python package Index to ease the installation, DCLI become part of the VCSA but also is able to connect ot VMware Cloud on AWS and SDDC’s NSX-T instances.

DCLI is using vSphere REST API which allows you to monitor and manage different which are available for the REST API.

DCLI can now also create a JSON files and even use them for input allowing you to work with some automation or SDK tools as well.

You can start the interactive mode with dcli +i and start typing to see possible commands:

VMware Datacenter CLI – DCLI

VMware Datacenter CLI – DCLI

We won’t go into details here, but you get the idea. Just type –help for more if you want to learn.

Reset VCSA Password

This tip is based on VMware KB2147144 and allows us to reset VCSA root password. Its useful

Take a snapshot of the vCSA to be able to roll back in case of any problems during password recovery.

Connect to the ESXi Host that runs the vCSA and open a remote console via your web browser or via VMware Remote Console Software (VRMC).

Note: additional possibility is to use VMware Workstation.

Reboot the vCSA and when you’ll see the Photon logo, press e immediately. The latest vCSA 7 is based on Photon OS v3.0 and the screenshot looks like this.

Press e now

Press e now

You’ll be presented with this black screen where you can append this command:

Press F10 to continue booting and then run this command:

Enter the command passwd and provide a new root password (twice for confirmation):

Unmount the filesystem by typing this:

to unmount the file system.

Reboot the vCenter Server Appliance and you’re done. Now you know that if you’re in front of a system which you don’t have a password, you are able to enter.

vCSA Backup

I know that it’s been already covered elsewhere, but you should really create a file-level backup of your VCSA.

Create a VCSA file-level backup

Create a VCSA file-level backup

When you click the Configure button, you’ll be able to specify a couple of things. But before you must set a remote server where you will store your backups. The protocols supported for backup are FTPS, HTTPS, SFTP, FTP, NFS, SMB and HTTP. It’s very simple to create a file share on your file server.

Here are the things needed for the configuration:

Backup location: Protocol, FQDN or IP address of the Photon OS VM & the SCP port & the backup directory

So in my example, we are using smb protocol.

Note: Previous releases of VCSA used smb1 and 2.0, but VCSA 7.0 uses SMB v2.1 and SMB v3

So in our example, simply put:

smb://192.168.1.7/d$/backups

Enter the path to the backup server

Enter the path to the backup server

User name & Password: The credentials of the backup user we created earlier. I simply created a share on a D: drive on my file server.

Schedule: When you would like to backup the VCSA

Encrypt backup: Optional, but can encrypt the backup files for compliance purposes, if necessary.

Number of backups to retain: Just change it to Retain last x backups and put some reasonable number. You don’t need to keep All backups. After this, the VCSA will automatically delete old backups according to this retention policy.

Data: Choose if you need events and tasks. I simply uncheck this for my lab purposes.

Final Words

When working with VMware infrastructures, there are problems or challenges which you must overcome from time to time. When you’re learning towards VMware certification exams, it’s also good to know what to do when you’re in front of a system where you can’t login.

Year after year, the IT is becoming more complex and more demanding concerning the skill set. It’s up to you to overcome those daily difficulties and work tasks to learn new product installation, management and monitoring.

The IT evolves daily and VMware product portfolio too. Many new compagnies are acquired by VMware to become perhaps the next flagship product. VMware virtualization is however, the base brick which knowledge is needed to build any virtual infrastructure.

Found Vladan’s article helpful? Looking for a reliable, high-performance, and cost-effective shared storage solution for your production cluster?
Dmytro Malynka
Dmytro Malynka StarWind Virtual SAN Product Manager
We’ve got you covered! StarWind Virtual SAN (VSAN) is specifically designed to provide highly-available shared storage for Hyper-V, vSphere, and KVM clusters. With StarWind VSAN, simplicity is key: utilize the local disks of your hypervisor hosts and create shared HA storage for your VMs. Interested in learning more? Book a short StarWind VSAN demo now and see it in action!