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

3 useful tricks with VMware vCenter Server Appliance

  • December 29, 2016
  • 7 min read
Virtualization Architect. Alex is a certified VMware vExpert and the Founder of VMC, a company focused on virtualization, and the CEO of Nova Games, a mobile game publisher.
Virtualization Architect. Alex is a certified VMware vExpert and the Founder of VMC, a company focused on virtualization, and the CEO of Nova Games, a mobile game publisher.

As is well-known, VMware has released a new version of virtual VMware vCenter Server Appliance 6.5 in the new version of vSphere 6.5 platform. Now vCSA is Photon OS-based. It works faster; it is provided with built-in high availability tools and has a ready-to-use vCenter Update Manager (VUM).

Due to the numerous changes, many familiar features don’t work anymore, and the information below will help you to get back to the normal use of vCSA.

  1. How to turn on Bash Shell and use WinSCP for vCSA

If you try to access vCSA server with WinSCP to download or upload files there, you won’t be able to do that:

vCSA server with WinSCP

The reason is that instead of Bash Shell, Appliance Shell is launched on vCSA. It has its own commands and interfaces, which WinSCP doesn’t understand. To switch to Bash Shell, access vCSA host with SSH and type the following commands:

shell.set –enabled true

shell

With this, you will temporarily switch to Bash Shell. To be switched to it permanently, type the following command:

chsh -s /bin/bash root

After the logout, you can access the host through WinSCP and easily copy the files. To be switched back to Appliance Shell, input the following in the SSH console:

chsh -s /bin/appliancesh root

  1. Increase of disk partitions in vCSA

Disk partition size can be changed in VM settings. Then, from vCSA guest OS the partition should be extended to the resulting free disk space. The changes in vSphere 6.5 version in these terms are as follows:

  • To extend the logical volume, instead of the vpxd_servicecfg command, the following script must be used:
    /usr/lib/applmgmt/support/scripts/autogrow.sh
  • Apart from the extension of partition from SSH, this can be done through Virtual Appliance Management Interface (VAMI) REST API, which can be activated remotely by POST /appliance/system/storage/resize.

Let’s run df -h command to display partitions table on vCSA:

df -h command on vCSA

Now, go to vCSA VM settings in vSphere Client and change to the disk management section to increase 9th virtual disk size (for example, volume highlighted above netdump_vg-netdump) from 1 GB to 10 GB.

Next, click through https://[VCSA-HOSTNAME]/apiexplorer in the browser, select “appliance” in Select API section and press Login button. Enter login/password for vCenter Server.

Then, scroll to operation POST /appliance/system/storage/resize and open it to see the details:

vSphere Client to the disk management

Now, press “Try it out!” button. If completion is successful, the Response Code will be 200. In the end, the result will be seen in df command output – the partition together with VMDK disk will increase to 10 GB.

  1. How to recover root password on VMware vCenter Server Appliance

Now virtual vCSA is based on Photon OS, which is VMware own OS. This means all previous ways of password recovery won’t work. Before password recovery, make sure to back up the virtual appliance or at least make a snapshot of it.

 

To reset root password on vCenter Server Appliance:

  1. After the loading, press <e> button to enter GNU GRUB Edit Menu.
  2. Find the section where Linux start is initialized (it begins with “linux”) and add the following line at the end of it:
    rw init=/bin/bash

reset root password on vCenter Server Appliance

  1. Then, press <F10> to continue the download.
  2. Next, input passwd command to the command line and set root password.
  3. Then, unmount the file system with the following command:
    umount /
  1. Restart vCenter Server Appliance 6.5 with the following command:
    reboot -f
  1. Afterwards, root password on vCenter Server Appliance will be reset. Don’t forget to delete snapshot (if any) after you make sure the new password is set.

I hope these three small but useful tips will help you in everyday use of virtual vCSA.

 

 

Hey! Found Alex’s insights useful? Looking for a cost-effective, high-performance, and easy-to-use hyperconverged platform?
Taras Shved
Taras Shved StarWind HCI Appliance Product Manager
Look no further! StarWind HCI Appliance (HCA) is a plug-and-play solution that combines compute, storage, networking, and virtualization software into a single easy-to-use hyperconverged platform. It's designed to significantly trim your IT costs and save valuable time. Interested in learning more? Book your StarWind HCA demo now to see it in action!