I was having some difficulty setting up User Profile imports from AD recently and it took me a while to figure out what I was doing wrong. Because I was working on a VM, that also gave me a headache. Although Virtual Machines are great (if you make a disastrous mistake and need to revert back), they also, for some reason, cuts off the connection to AD when it is reverted back. So each time I reverted, I needed to re-set the connection to the domain.
I'm not sure if this would help, but here's what I had to do to get the user profile synchronization service started in SP 2010 and to import users from AD.
When you initially installed SharePoint, make sure you use a service account that has access to AD. Let's call this account DOMAIN\svc-spadaccess (short for SharePoint Active Directory Acess). Make sure that this user is in the Farm Administrators group (in Central Admin).
Once SharePoint is installed, in Central Admin, click on Security > Configure Service Accounts.
Where it says Select one..., choose Windows Service - User Profile Synchronization Service. Where it says Select an account for this component, select DOMAIN\svc-spadaccess. If you don't see it there, then you need to click on Register new managed account to register it.
Click OK. If for some reason you get an error that looks like "An object of the type Microsoft.SharePoint.Administration.SPWindowsServiceCredentialDeployment JobDefinition named "windows-service'credentials-FIMSynchronizationService" already exists under the parent Microsoft.Office.Server.Administration.ProfileSynchronizationService named "FIMSynchronizationService". Rename your object or delete the existing object." then you need to do what it says and remove it. Click on Monitoring > Review job definitions (under Timer Jobs) and look for "Windows Service "FIMSynchronizationService" Credential Deployment". Click on it and click on Delete. Then try again.
Once you have done that, you need to set the Farm Account (from the same Select one... dropdown in the image above) to use DOMAIN\svc-spadaccess and click OK.
When I do that, I would get a 503 error. When you changed the farm administrator, the Application Pool identity for the SharePoint Central Administration v4 app pool also changes. For some reason, this causes the application pool to stop and refuse to start. I'm not sure if this is the best fix, but I found that when I clicked on Advanced Settings for that application pool and edit the Identity by re-entering the username and password again, then trying to start the app pool, it actually starts.
Next, we need to start the User Profile Synchronization Service. Click on Application Management > Manage services on server. The status for the User Profile Synchronization Service should be Stopped. Click on Start and you are prompted to log in to DOMAIN\svc-spadaccess. Once you log in, it should start after a few minutes (could take about 10 minutes). I find that this isn't the case and it hangs on "Starting" indefinitely. On checking the event logs, I see this error:
Error provisioning the local timer service instance during deploying of administration application pool credentials, please provision manually. The password for the account DOMAIN\svc-spadaccess, as currently stored in SharePoint, is not the same as the current password for the account within Active Directory. To fix this with PowerShell, run Set-SPManagedAccount -UseExistingPassword.
To fix, I had to go to Start > Administrative Tools > Services and select the SharePoint 2010 Timer. It wasn't started in my case and when I try to start it, I get the login error. As with the application pool, I had to re-enter my password and start the service in order to get it to run.
Now when I go back to Central Admin the status is still stuck on "Starting" and there is no way for me to stop it. So I had to start the SharePoint 2010 Management Shell, type in get-spserviceinstance to get a list of all the GUIDs. Copy the GUID for the User Profile Synchronization Service (which should have its Status as Provisioning) and enter stop-spserviceinstance <GUID> to stop the service. Once you have done that, you can go back into Central Admin and you'll notice that you can try to Start the service again.
Click on Start, enter your password and 10 minutes later, it should be running.
After the service starts, you can go ahead and configure the AD import. Click on Application Management > Manage Service Applications > User Profile Service Application > Configure Synchronization Connections and Create New Connection. If you are getting an Unknown Error when you try to do this, then do an iisreset before coming back here. You might have to wait a couple of minutes after logging back in to see this section working.
Enter all the relevant details to your connection but use the Account name DOMAIN\svc-spadaccess to access AD. Click on Populate Containers, select what you want to import and click ok. Then go back, Click on Application Management > Manage Service Applications > User Profile Service Application and Start Profile Synchronization which should import all user details from what you selected in the Container into SP 2010.

