Saturday, August 15, 2015

Migrate VMDK (Virtual Hard Disk) from one VM to another, maintain permissions and file shares. EASY file migration!

File server migration - the easy way.  Don't migrate files and change login scripts like a chump... :)

1) Get your current file server running on the same host as the new file server.  (If physical, p2v it.  If virtual, move it or v2v it.)
2) Open Regedit on the old file server, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer
3) Right Click on "Shares", click export.  Copy this file to your new file server.
4) In vmware remove the data disk from the old file server.  (Right click on VM, Edit Settings, click on the data hard disk, click remote.  Make sure you do NOT click remove and delete files from disk, make SURE yous elect "Remove from Virtual Machine".
5) Rename the old server to something else.  (If it's a DC, demote it, then rename it.)
6) Rename the new server to your old server's name.  If it's to be a DC, delete the old computer account in AD and promote it.)
7) In VMware, add the drive.  (Right click on VM, edit settings, add, Hard Disk, use and existing virtual disk, find the VMDK of the drive you are migrating.)
8) In Windows on the new server, make sure you add the drive with the same drive letter the old server had.  (So if it was "D" on the old server, make sure it is "D" on the new server.
9) Import your registry file from step 2.
10) Reboot.

All permissions and shares will be exactly as they were before you started.

1 comment: