Going green… and just jumping into the hype, I’ve giving myself the project of taking our company physical server that houses the SharePoint site and … virtualizing it. The old server was a Dell PE 2500 with a whoooping one CPU 1.00 GHz processor. Ha! I laugh cuz the machine I’m typing on is dual dual core and a ton of RAM. My how technology has been speeding along!
Anyways. Before I started the project, I did the typical. Backup twice, practice restoring it, back up again. Everyone, I know it’s been said but I keep finding people doing projects and jumping into them without first backing up AND testing your backup. Backups FAIL and you don’t want to be in the server room at night!!!! So with all the precautions in place, I proceeded and… ::drum roll please:: succeeded! Okay okay, most of my projects usually succeed (cause my job depends on it! Ha!). While researching the process, I noticed that a LOT of people are trying the same thing and failing at certain steps. So I decided to document my steps to virtualize my server and hopefully someone can get some benefit out of it.
QUICK NOTE: If your server is called server1 and you created the Sharepoint site already, it’s tedious to change the server name to something else (like server2) and reconnect the dbase and other connecting points. It’s quicker to reinstall the entire server (less than an hour).
- Preform backup of the existing sharepoint site using the sharepoint central admin interface.
- Restore the Windows SharePoint Services Web Application – default site port 80. If you already created a site in Sharepoint, you’ll have to use the existing db. Otherwise, you’ll have to make a new one.
- You’ll notice the failure on WSS_Content. Object WSS_Content failed in event OnPostRestore. For more information, see the error log located in the backup directory. SPException: Cannot attach database to Web application. Use the command line tool or Central Administration pages to attach the database manually to the proper Web Application.
- When you see that error message, that means that you MUST USE THE STSADM command line utility from the SharePoint site to upgrade the existing SharePoint to the latest. The GUI will NOT work. Stsadm is located at the following path on the drive where SharePoint Products and Technologies is installed: %COMMONPROGRAMFILES%\microsoft shared\web server extensions\12\bin. You must be an administrator on the local computer to use Stsadm.
- General command line that I found online:
- copied a production site this way: stsadm -o backup -url http://myproductionserver -filename myproductionsite.cab
- create a new empty website with the administrator web on the same server using another IP port number or another server like: http://testserver or http://productionserver:12345 (You can do that with stsadm)
- then i restore the backup file: ststadm -o restore -url http://testserver -filename myproductionsite.cab -overwrite
- Maybe a iisreset may be needed in between the creation or the restore.
- Use that same restore command: ststadm -o restore -url http://testserver -filename myproductionsite.cab -overwrite
- SharePoint server has been moved from a physical server to a virtual server. Since it’s different server name and different IP address, I modified the DNS entry on the domain. Requests to the old SharePoint server will be directed to the new one.
That’s that! Going from a MS Windows Server 2003 physical machine to a MS Windows Server 2008 virtual machine. Hope everyone finds it helpful!