Tuesday, September 22, 2020

Connecting to VC6.7 postgresql database with pgadmin4

 

A quick guide on how to connect to vCenter vPostgresql with pgadmin4.


PGAdmin4 download

https://www.postgresql.org/ftp/pgadmin/pgadmin4/v4.26/windows/


Replace IPV4. Opening up everything. Cautious with this option. In the pg_hba.conf 

host     all               all         0.0.0.0/0                trust

Go back to psql and reload


select pg_reload_conf()

Note: If this do not work, stop and start all vCenter services.

/usr/bin/service-control --stop --all
/usr/bin/service-control --start vpostgres

Event hough the server is pingable, the port 5432 may be blocked. . To enable incoming traffic to 5432. This step is required or it will error out "Unable to Connect to server" during the Create server process.

 



iptables -I INPUT -p tcp --destination-port  5432 -j ACCEPT

Users can either connect with "vc" or "postgres" user. 

All the connectivity parameters for vc user can be found in "/etc/vmware/service-state/vpxd/vcdb.properties". As for connecting with postgres user, password can be located in "$HOME/.pgpass"





Make sure the VC.net is pingable.










Friday, July 10, 2020

Installing VCSA 6.7 on VMware Workstation


A quick guide to set up my own VCSA lab for testing.



Download the VCSA image from the following link. You need your own login obviously.

https://my.vmware.com/web/vmware/downloads/details?downloadGroup=VC67U1&productId=742&rPId=27401


Mount the iso





From VMware Workstation. Open the OVF under the ISO image - vcsa directory


























Accept the license and move on. Note: it doesn't give any option to choose the sizing and how the network is being set up.



































When it is completed, it will create the following disk layouts.


























Click Power on this virtual machine.,


If you are getting this error or it simply would not start, then you can modify the vmx file




2020-07-10T11:29:59.173-06:00| vmx| I125: [msg.vmciWin32.noVersion] Could not get vmci driver version: The handle is invalid.
2020-07-10T11:29:59.173-06:00| vmx| I125: [msg.vmciWin32.badDriver] You have an incorrect version of driver 'vmci.sys'. Try reinstalling VMware Workstation.
2020-07-10T11:29:59.173-06:00| vmx| I125: [msg.moduletable.powerOnFailed] Module 'DevicePowerOn' power on failed.
2020-07-10T11:29:59.173-06:00| vmx| I125: [msg.vmx.poweron.failed] Failed to start the virtual machine.




Search for the following and change it to FALSE. My failed Workstation is 12.5.5 build-5234757. Version 12.7 has no such issue.

vmci0.present = "TRUE"




Important steps.
I am not sure what's going on with the version of VCSA that the password has to change it the first time in the terminal then change it again in the setup screen later to get it to work. This may have something to do that, that it no longer prompting users the type of set up in the early stage of the installation.











Do it before the DCUI starts.











Notice, it says Root password is not set. You will need to set it again by hitting F2. Make sure it is the same as the new password above. Also, the HTTP://photon-machine does not provide port number 5480 as yet.

























Type in the password as before.


















Now that it will provide the port number of 5480 once the new password is set.


























Open a browser and type in the https://ip-address:5480

Almost done. Continue with Set up.
















Type in the password that has been changed twice earlier.


























Click Next.


























Continue with SSH enabled.



































The access is under this link
https://photon-machine:443












That's it.


Accessing vCenter Appliance Management

root

Accessing to vSphere Web Client
administrator@vsphere.local



One interesting thing with the database size. The Backup UI is showing different size than querying the database directly.




























Note: 

This installation will likely end up with IPv4 as DHCP. After some reboots, the IP might changed that resulting in the SSO going out of synch with the new IP address. The SSO status will be unknown. In that case, the vSphere Web Client will not be accessible until both vSphere Web Client and the vCenter Management IPs the same. This may have to do with all the roles and sso setting defined on the IP address it first setup.

Error will look like this "500 sso error failed to connect to vmware lookup service - <IP Address>/lookupservice/sdk" or some bogus web server errors.

With that, I would recommend going into the vCenter Console and change it to static by retyping the same IP address.

/opt/vmware/share/vami/vami_config_net

<0> remember the IP address
<6> change the IP address for IPv4 to static