Reset vRA Appliance Root Password and Restart vRA Appliance(s)

Mindwatering Incorporated

Author: Tripp W Black

Created: 04/27/2022 at 02:39 PM

 

Category:
VMWare
vRA

Issue:
Something has locked the root account. (Typically, an add-on service for logging, etc.) VAMI access

Resolution:
1. Connect to the VMs Host or vCenter and login to its vSphere Web Client.

2. Locate the VM and Restart it:
a. Right-click, choose Edit Settings.
- - Under the VM Options tab, and the Boot section, click the checkbox to have the VM boot into BIOS on the next restart.
- - This will give time to exit the BIOS and already be in the console to click the "e" boot option to escape/pause the boot.
b. Right-click and choose: VM --> Power --> Restart Guest OS
c. Exit w/o Saving from the BIOS.

3. Boot into a command shell:
a. As soon as the GNU GRUB window is visible, click 'e' (for edit). Click 'e' again to see the boot root/kernel/initrd menu.
b. Make sure the kernel / boot/vmlinuz-... line is selected. (Arrow up/down to it, if not selected.)
c. Click 'e" again, to edit the selected command.
d. Add to the end of the line a space and init=/bin/bash
e. Click <enter> to return to the root/kernel/initrd menu.
f. Click 'b' to boot.

4. At the shell root prompt:
Make the password to never expire and clear the history. (That's a number 1 below, if typing by hand.)
# chage -M -1 root; echo "" > /etc/security/opasswd

Check the error tally:
# pam_tally2 -u root
<read output - root should be listed>

If so, reset with:
# pam_tally2 -u root --reset

If you need to reset the password, do:
# passwd
<enter new password twice>

# exit

5. Reboot the appliance again from the vSphere client.

vRA 8 Shutdown Steps:
Note: These also are the steps for an cluster appliance.
a. SSH into the appliance as root:
$ ssh root@myvrappliance.mydomain.com
<enter pwd if not using certs>

b. Shutdown the vRA services and containers
Enter the following on the appliance:
# /opt/scripts/svc-stop.sh
<watch script execute>
# sleep 120
(or wait a couple minutes)
# /opt/scripts/deploy.sh --onlyClean
<watch script -- this will take more than a couple minutes as this script has a sleep 120 w/in it.>

c. shutdown the appliance OS itself
# shutdown -h now

Note: If you want to do a restart, you can also perform:
# shutdown -r now

vRA 8 Restart Steps:
a. In vSphere/vCenter locate and start the appliance.
Wait until you see the blue login screen in the web console. At this point you can login here, or perform a SSH remote login.

b. SSH into the appliance as root:
$ ssh root@myvraappliance.mydomain.com
<enter pwd if not using certs>

c. Startup the container services
# /opt/scripts/deploy.sh
<watch script execute, and this will take a good 15 minutes>

d. Verify that the container pods are running:
# kubectl get pods --all-namespaces

or, since they are all prelude namespace,
# kubectl -n prelude get pods

e. Verify that all the containers are running.
(e.g. make sure none say 0/1 or 2/3, etc.)








previous page