Recently I has migrated MOSS 2007 to SharePoint 2010. Then tried
creating User Profile service application but was not successful.

For User Profile service application we require following service
in the services.msc.

-  Forefront Identity Manager Service.
-  Forefront Identity synchronization Manage

The above service gets provisioned when we services are provisioned.
I my case I found both the Forefront services was missing.

Later after further research found that following registry
keys were missing from the SharePoint box, due to this Forefront services was
missing from the services.msc.

Missing registry Key:







Exported the above registry Keys from working SharePoint
2010 box and imported in to the Problematic SharePoint 2010 box were we have
issue starting User Profile service application.

Note:- Before making any registry changes ensure we take a backup of the registry.

After importing the registry key reboot the machine and then
you would find the both the Forefront services

-  Forefront Identity Manager Service.

-  Forefront Identity synchronization Manage

Later I could create a User Profile service application