Wednesday, March 2, 2011

Rename Virtual PC

I have some virtual machines used for testing. I am writing down what I do when we make a copy of the Virtual PC. Sometimes I make a copy of a virtual machine or give a copy to someone else to use. Then I have to rename the virtual PC, so there are not conflicts; rename the machine in Windows, assign a new MAC address to both network adapters, rename the SQL Server, and change the database connection strings in used by services and applications.

1) login to the Virtual PC; select Control Panel> System> Computer Name> Change... and enter a new name

2) restart Windows when it prompts you to reboot

3) open SQL Query Analyzer and rename the SQL Server instance
sp_addserver , local
4) close virtual machine and commit changes to hard disk
5) edit the .vmc file to change the MAC address; there is one line for each network adapter, 
so in a laptop I had to change two lines one for the wireless adapter and one for the wired connection
6) reconfigure any applications that use the machine name or IP address

No comments: