MENU

3 useful tricks with VMware vCenter Server Appliance

Posted by Alex Samoylenko on December 29, 2016
Share on Facebook0Share on Google+0Share on LinkedIn6Share on Reddit19Tweet about this on Twitter0
5/5 (1)
5/51

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.

Related materials:

 

 

Views All Time
14
Views Today
22

Please rate this

Return to all posts

VMware Horizon FLEX. The architecture and the key features
The following two tabs change content below.
Alex Samoylenko
Alex Samoylenko
Virtualization technology professional. 10 years ago he built #1 website on virtualization in Russia. Alex runs his own virtualization-focused company VMC. He is a CEO of a mobile game publisher Nova Games and a CEO of an international dating site