Applicable to:
- SolusVM 2
Symptoms
After changing the hostname of SolusVM 2 Management node the icons are not displayed properly at SolusVM 2 > Virtual Servers page for existing VPSes
Cause
Property icon
contains URL with old hostname in SolusVM 2 database
Resolution
- Create a backup of SolusVM 2 database using this article
- Access SolusVM 2 database using this article
- List settings for VPSes using query below and verify that old URL is in use for
icon
property
# select id,settings from compute_resource_vms \gx
- Update URL for each VPS. Here is an example of procedure below for one VPS with ID 364:
- List current settings for VPS
Show PGSQL query
# select id,settings from compute_resource_vms \gx
-[ RECORD 1 ]-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
id | 364
settings | {"vnc": {"port": 5900, "password": "kpwLx7PA"}, "os_image": {"url": "https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img", "icon": "https://OLD.HOST.NAME/shared/icons/mariadb.svg", "name": "MariaDB", "type": "application", "cloud_init_version": "v2", "application_login_link": {"type": "info", "content": "<h2>MariaDB</h2>\nYour MariaDB installation can be reached via :3306.\n<ul>\n <li>\n User: root\n </li>\n <li>\n Initial Password: \n </li>\n</ul>"}}, "user_data": "#cloud-config\nwrite_files:\n - { path: /var/lib/cloud/instance/scripts/mariadb.sh, permissions: '0755', content: \"#!/usr/bin/env bash\\nexport DEBIAN_FRONTEND=\\\"noninteractive\\\"\\nexport PASSWORD=\\\"\\\"\\n\\napt-get install software-properties-common\\napt update\\napt install -yq mariadb-server\\n\" }\n - { path: /var/lib/cloud/instance/scripts/mariadbvars, permissions: '0755', content: \"\\nY\\n\\n\\nY\\nn\\nY\\nY\\n\" }\nruncmd:\n - 'apt update'\n - 'export DEBIAN_FRONTEND=noninteractive'\n - 'apt -yq upgrade'\n - 'ufw enable'\n - 'ufw allow 22'\n - 'ufw allow 3306'\n - 'chmod +x /var/lib/cloud/instance/scripts/mariadb.sh'\n - /var/lib/cloud/instance/scripts/mariadb.sh\n - 'cat /var/lib/cloud/instance/scripts/mariadbvars | mysql_secure_installation'\n - 'sed -i ''s/127\\.0\\.0\\.1/0\\.0\\.0\\.0/g'' /etc/mysql/mariadb.conf.d/50-server.cnf'\n - 'mysql -uroot -e ''USE mysql; UPDATE `user` SET `Host`=\"%\" WHERE `User`=\"root\"; DELETE FROM `user` WHERE `Host` != \"%\" AND `User`=\"root\"; GRANT ALL PRIVILEGES ON *.* TO \"root\"@\"%\" IDENTIFIED BY \"\" WITH GRANT OPTION; FLUSH PRIVILEGES;'''\n - 'service mysql restart'\n - 'rm -r /var/lib/cloud/instance/scripts/*'\n", "mac_address": "52:54:00:77:c9:b9", "ssh_password": "eyJpdiI6Ik82UEFwY0xaajF3UURFUFRRUXRmYUE9PSIsInZhbHVlIjoiYkhNaGFHbHBCS2d5dElQeUxZaGhXNUU0WFc4ajlESTgxWjk2NXNIN0FOMD0iLCJtYWMiOiI0MTE0YjQxNWFjZWEzMzdmY2Q5NDM5MTJjMzM4ODA0YTJkMGEzMjQ3YTYxYzk0NjI0MTEyYzBkMTk0MWQwZjM1In0=", "network_bridge": {"name": "br-int", "type": "bridged"}, "pwd_change_flag": "5ff56141499f6", "application_data": "eyJpdiI6ImdmaHFjV3ozRXlEdlF0R2ZIMnpaWUE9PSIsInZhbHVlIjoiYkdEdFEyWnFKVW8zMzJCNTUySGl0dz09IiwibWFjIjoiYjJhMDI1YTExZjA0MzNiYTJkYzZmYjMxMDFiMGMwNDg1NDQzZDRlMDg2NjZlMWI0NThmOTYwZGQ4ZWU2MTEyNSJ9", "application_login_link": {"type": "info", "content": "eyJpdiI6IjdUQlNnWnoyMTNleHpnVHlBM1B2M0E9PSIsInZhbHVlIjoiOE5DYlhzUHkyV2xwcEZxQkJqUG5pSWY3N1Zibi9OcTk5dFdENWFuem5BOTNjWW14U1ZGd0JxeGcwUlluaUo2OXRYVkdleEV4NCt0ckdIYUtVK0RxNERGbitNL1BTcVBNYUszMTM3MHRONVJuKzlTRjJsVmNPd1VodzVHWlN2aE1YL1ZqZnpjRnpRQVZwMC9FYmp2ZTVrdTZrcVFIc2Y2TjlINzFkNVpGT000WU5SUXU1UzlQODMrUHRrODIvK29JQnovcVlZOGlmcEFhSlQ3dzhmYWVQLzdBakdxNVNmNHVpTWhxMnp4c3NDdlZFNHRMVjJxNGViSnVhT0lJMUxFSiIsIm1hYyI6ImU1Zjg2YmY0ZTZmZDdhMjAyZWFiNTRjODA0Y2JkMWNkZTc5Yjc0ZTU2MDc4NjI0Mzk3MjQ4ZDE1MjM1NjFiNmQifQ=="}}icon
property which is part ofos_image
JSON entry - Update whole
os_image
entry with modifiedicon
property:Show PGSQL query# update compute_resource_vms set settings=settings||'{"os_image": {"url": "https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img", "icon": "https://NEW.HOST.NAME/shared/icons/mariadb.svg", "name": "MariaDB", "type": "application", "cloud_init_version": "v2", "application_login_link": {"type": "info", "content": "<h2>MariaDB</h2>\nYour MariaDB installation can be reached via :3306.\n<ul>\n <li>\n User: root\n </li>\n <li>\n Initial Password: \n </li>\n</ul>"}}}' where id=364;
- List current settings for VPS
Comments
0 commentsPlease sign in to leave a comment.