<p>I have a SharePoint virtual machine in one active directory domain (for example domain1) and I want to transfer all the sites it has to another active directory domain (domain2).
I don’t know which could be the best procedure to do this, if I detach and attach my virtual machine from domain1 to domain2 it probably didn’t work since all the accounts used by SharePoint are no longer valid. (Both domain are not in the same network and didn’t trust each other).
Additionally I could export the sites in domain1 and import them on domain2 using stsadm, but if I use this technique I have to manually install all the features, solutions and personalization I made on my original server.
Does anybody know the best approach to “move” the sites from one domain to another? </p>

[{'answer_id': 73562, 'author': 'MrHinsh - Martin Hinshelwood', 'author_id': 11799, 'author_profile': 'https://Stackoverflow.com/users/11799', 'pm_score': 0, 'selected': False, 'text': "<p>You may have some sucess by adding a local account to the administrators group and joining the server to the new domain. Then manualy updateing all of the AD accounts that are used in the server. I sould note that all of your users will then have new accounts that are not related to the old ones.</p>\n\n<p>You sould ask your domain admins about an SID update to the new accounts so they also have the SID's from the old domain.</p>\n"}, {'answer_id': 80952, 'author': 'user4531', 'author_id': 4531, 'author_profile': 'https://Stackoverflow.com/users/4531', 'pm_score': 1, 'selected': False, 'text': '<p>There is a <a href="http://stsadm.blogspot.com/2007/09/move-web.html" rel="nofollow noreferrer">STSADM Custom Extension: move web</a> that should be what you are looking for:</p>\n\n<blockquote>\n  <p>C:>stsadm -help gl-moveweb</p>\n  \n  <p>stsadm -o gl-moveweb</p>\n  \n  <p>Moves a web.</p>\n  \n  <p>Parameters:\n         -url \n         -parenturl \n         [-haltonwarning (only considered if moving to a new site collection)]\n         [-haltonfatalerror (only considered if moving to a new site collection)]\n         [-includeusersecurity (only considered if moving to a new site collection)]\n         [-retainobjectidentity (only considered if moving to a new site collection)]</p>\n</blockquote>\n'}]
['https://Stackoverflow.com/questions/73499', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']