Hello guys,
is it possible (allowed) to do a cleanup of deleted VMs from database? Currently, each VM that has ever run in Nebula has its record in database. Additionally there is a history table witch records for each VM as well. And the contextualization data are stored in oneadmin’s home in ‘vms’ directory also.
Because our environment is quite dynamic, we have only about 1000 VMs, but their IDs are around 530k - what means there are more than 500k non-needed entries in DB. It makes the DB big and slows down the queries.
Could I delete the records from DB and from the ‘vms’ directory or does Nebula need them (because of generating next VM ID or stuff like that)? I’m not worried about accounting since I don’t need it at all.
you can safely delete them (both files in log folder and entries in vm_monitoring table… if you want to hardcore clean you can delete all entries also in host_monitoring and history too) ,
the “next id” is stored in the pool_control table
just have a backup before doing this, just in case
stop one
backup
delete records in tables and logs in folder
start one
test
enjoy
PS: this is something I do on regular basis in production environments… but may not be a best practice. Never had a problem with it anyway.