Articles in this section

How to remove Compute Resource and all VPS from it?

Applicable to:

  • SolusVM 2

Question

How to remove a whole CR with all VPS inside?

Answer

  1. Create a backup:

    # /usr/local/solus/bin/installer -backup

  2. Connect to the Postgres docker:

    # 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. Then manually remove the VM

    # delete from compute_resource_vms where id=48;

  4. And after all VMs are removed, we can remove the CR:

    # delete from compute_resources where id=ID;

  5. If the VMs are many:

    # delete from compute_resource_vms where compute_resource_id=ID;

Note: It is possible for the Virtual Machines page from the UI to not show anything at all. 
The VMs to be accessible and visible through the Compute Resource page only. -> This happens if the CR was removed without removing the VMs from the DB first

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.