OnApp Update Hostname in MySQL
This guide is to help you update the hostname of an OnApp virtual machine. OnApp doesn’t provide the ability to update a vm’s hostname through the graphical user interface (GUI). To update a hostname you will need to access the MySQL database and manually change the table.
Get to the MySQL prompt:
mysql> use onapp;
In the GUI, get to the virtual machine you are wanting update. Grab the last part of the URL as it is the identifier of the vm.
Example: https://myonappgrid.com/virtual_machines/yo3aldp5zhvm06
mysql> select * from virtual_machines where identifier = 'yo3aldp5zhvm06';
This should pull up the info about that VM. Please make sure it’s the one you are looking at and want to update.
Update the hostname and use your identifier:
mysql> UPDATE virtual_machines SET hostname="my.newhostname.com" WHERE identifier = 'yo3aldp5zhvm06' LIMIT 1;
Now just refresh your GUI page and see if it’s set correctly.