Just migrated my UniFi controller to a Ubuntu box today.
Chose Ubuntu because they have package updating for it. To go the CentOS route would require manual downloading and extracting of tar files.
Having problems with the UAP at one site not wanting to update and stay online.
Prior to migrating, I updated the Windows controller from 3.2.10 to 4.6.6 and updated all the AP's connected to it.
I downloaded the config backup from the existing controller GUI and then shut down the machine.
Then I spun up the new VM and restored the back on the first startup wizard screen. all up and happy.