Cloned Virtual Machine on Domain

August 18th, 2006 Comments

One thing I figured while cloning a VHD is that when you start the cloned VM for the first time, make sure that you do not log on to the domain. Logon to the local machine first and run NEWSID to rename the computer and assign it a new SID. Failure to do so creates multiple entries in the Active Directory with the same NETBIOS name, and you may not be able to logon to the domain from the original VPC. If that occurs, however, the remedy is to remove both machines from the domain, and then join the domain again one machine at a time (i.e. after renaming the second machine and assigning it a new SID).

Copy Virtual Machine With SQL Server Installed

August 16th, 2006 1 comment

I copied the VHD file of a virtual machine that had SQL Server 2000 installed on it. After running NEWSID from Sysinternals and giving my virtual machine a new name, I had to deal with the fact that SQL Server would not recognize my new machine name. Luckily I found this FAQ on Vyas’s web site that solved my problem. Essentially I had to drop and add my SQL Server as follows in order for things to start working correctly:

EXEC sp_dropserver 'Your_OLD_Computer_Name'
GO

EXEC sp_addserver 'Your_NEW_Computer_Name', 'local'
GO

Restart your SQL Server service. Connect using Query Analyzer and run the following command (It should output the new server name):

SELECT @@SERVERNAME
GO