from what I understand of UFM is an embedded install option for Fujitsu.
both the options you mentioned are viable and can be performed.
the upgrade guide is good doc to start
https://docs.vmware.com/en/VMware-vSphere/6.5/vsphere-esxi-vcenter-server-65-upgrade-guide.pdf