Drive Letter Substitution

I will give you a run down on how this happened. Was converting a physical server to a virtual server and ran with VMWare Converters defaults. Originally the Physical Server has two drives, C: and E:, which were now mapped to two VMDK files located in the same datastore. But this really wasn’t what I wanted. May be I should have paid more attention or planned a little better, but I didn’t, and didn’t pick this up until after waiting out the conversion process.

So what do you do when you have more disk than you want? Simple. Get rid of them!!

The best solution was a modified version of the good old DOS command “SUBST”.

PSUBST!!!! Proudly brought to you by Google!

I simply copied all the data off the E: drive over to the C: drive. (I would not recommend moving it just in case!!) With all the data now located on the C: Drive I was able to remove the E: drive from the Virtual Machine. I could then run PSUBST allowing me to perform a PERMANENT substitution of the now missing drive. Effectively, all I did in this instance was make the C: drive appear as E: drive as well as C:

All programs that referenced E: continued to work as it was technically still there.

I wouldn’t obviously recommend leaving things like this, but it certainly delays the drama and allows you to slowly migrate and move things away from E: drive. This can be done reasonable safely through REGEDIT and simply searching for E:\ then modifying all the entries to point to C:\ instead.


WARNING: Microsoft SQL Server does not play nice with this!!! I am tipping there is something in the way that it accesses the Database and Log Files. I found that you have to perform a proper Database Move to make this work properly. Otherwise the SQL Service will fail and the Database will not be available. All the Program Files and Reporting Files can be moved through REGEDIT, it is only the actual databases and log files themselves that need to be moved. So to make this work, you will need to move the Database and Logs FIRST.

Leave a Reply

Your email address will not be published. Required fields are marked *