INTRODUCTION
Hi everyone, I've read several blogs about using virtualised environment (VE) for Sharepoint development which I totally agree. I'm not currently using it because I'm using a laptop and you know what the VE performance is like on laptops. But anyway, having said that, few days ago I was asked to create VE image which can be distributed to developers. I'm working at a client site where I have to use powerful desktops (hence VE is a viable solution).
I've got no problem at all creating the image until I need to distribute it to the developers. If the developers turn on the image at the same time and they set the network settings of VPC/VM/Hyper-V to allow the image to be visible on the network, we will then have a lot of computer name collisions! The developer who turns on the image first will win of course.
So, we have to go through the VE machine renaming process. I've read several blogs such as http://www.bloggix.com/blogs/microsoft/archive/2009/05/18/rename-your-moss-installed-virtual-machine-vpc-vmware.aspx. but I couldn't get it working. In this opportunity I want to share the steps I took (especially the steps that were not described in that blog article) and if you guys have done it differently, please share them as well.
Note: My VE image on this blog article is at the step where I was just finished install MOSS and even not yet activating services, creating sites for SSP and My Site and creating SSP itself.
THE STEPS
- Login to VE image using the account you installed MOSS/Sharepoint in the first place, mine is OLDMACHINENAME\SP_Admin. The account I was using as the farm service information was OLDMACHINENAME\SP_Farm.
- Go to Central Admin -> Operations -> Alternate Access Mappings and set the web application to Central Admin. Set the URL (mine is http://oldmachinename:6000/) to the new machine name (http://newmachinename:6000/).
- Run stsadm -o renameserver -oldservername oldmachinename -newservername newmachinename
- Go to My Computer -> Right click, Properties -> Change the computer name to newmachinename
- Restart
- Run stsadm -o updatefarmcredentials -userlogin NEWMACHINENAME\sp_admin -password yourspadminpassword
- Go to SQL Management Studio and open Security -> Logins folder. You will see groups/users with OLDMACHINENAME reference such as OLDMACHINENAME\SQLServer2005MSFTEUser$OLDMACHINENAME$MSSQLSERVER. Rename all of them to use NEWMACHINENAME as the domain information (Note: Do NOT modify the name, just modify the domain).
- Remove and re-add NEWMACHINENAME\SP_Farm from Central Admin Content DB and Sharepoint_Config database.
- Open Registry Editor (regedit.exe) then go to HKLM\Software\Microsoft\Microsoft SQL Server\90\Machines and modify the OriginalMachineNameKey value to the new machine name.
- Open Central Admin and go to Operations -> Update Farm Administrators. Remove and re-add NEWMACHINENAME\SP_Farm and NEWMACHINENAME\SP_Admin. When doing this you will see the display name is still using old machine name. That's OK but the account reference is now referencing the new machine name. Just click on SP_Admin or SP_Farm user and you will see that the reference has now been updated to NEWMACHINENAME\SP_Admin and NEWMACHINENAME\SP_Farm respectively.
- Go to Application Management -> Site Collection Administrators. Modify the Central Admin web application's site collection administrator to NEWMACHINENAME\SP_Admin. This setting is used by Sharepoint to create SSP. If you don't update this, your SSP creation will fail.
- Go to Operations -> Services on server and Activate all services (search, etc)
- Create 2 Sharepoint websites for SSP and MySite
- Create SSP --> I used to get a failed message when I didn't do these steps correctly. Therefore, if you get a Successful message after this point then you're good.
Hope this helps,
Tommy