Changing SolusVM 2 Compute Resource Host address

0
63
SolusVM 2

There are many people who want to change the SolusVM 2 “Compute Resource Host address”, but as we know, there is no direct way to change “Compute Resource Host address”, but it can be done through some commands.

Computer Resource address must be resolve to IP of the Computer Resource, else it breaks the communication between Management server and Computer Resource. So you better ensure the new FQDN resolving to the CR IP or it would be better if you use the CR IP there.

Follow the below instructions to update the Computer Resource address in Database.

1) Take the database backup.

Connect to SolusVM 2 management node via SSH and Run the command:

# docker exec -it $(docker ps -q -f name=solus_postgres | head -n1) pg_dump -U$(docker exec $(docker ps -q -f name=solus_postgres | head -n1) env | grep POSTGRES_USER | awk -F "=" {'print $2'}) $(docker exec $(docker ps -q -f name=solus_postgres | head -n1) env | grep POSTGRES_DB | awk -F "=" {'print $2'}) > /path/to/solusvm2.sql

where /path/to/solusvm2.sql – is path to the database dump

2) Access the database backup.

Access SolusVM 2 management node via SSH and Run the command:

# docker exec -it $(docker ps -q -f name=solus_postgres | head -n1) psql -U$(docker exec $(docker ps -q -f name=solus_postgres | head -n1) env | grep POSTGRES_USER | awk -F "=" {'print $2'}) $(docker exec $(docker ps -q -f name=solus_postgres | head -n1) env | grep POSTGRES_DB | awk -F "=" {'print $2'})

3) Change the host address by running this command.

update compute_resources set host='XXX.XXX.XXX.XXX' where id = 7;
  • XXX.XXX.XXX.XXX = your host address

Replace the IP or hostname of the CR and ID of the CR in the above command.

LEAVE A REPLY

Please enter your comment!
Please enter your name here