Rules to Better SharePoint Virtualisation

​Since 1990, SSW has supported the developer community by publishing all our best practices and rules for everyone to see. ​

If you still need help, visit SharePoint Server ​Consulting​ and book in a consultant.

Hold on a second! How would you like to view this content?
Just the title! A brief blurb! Gimme everything!

When correctly configured, a SharePoint VM environment can save you a lot of trouble later on. So important that we think all SharePoint customization and development must be done on a Virtual Machine. ​

Do you agree with them all? Are we missing some? Let us know what you think.

  1. What does a SharePoint image need?

    As a minumum, the SharePoint image needs:


    1. Windows Server 2003 or 2008
    2. SQL Server 2005 sp1
    3. WSS 3.0 sp1
    4. MOSS 2007 sp1
    5. MS Office SharePoint Designer sp1
    6. Visual Studio .NET 2005 or 2008
  2. How does the sysprep process work, what does the scripts do? Why is this process so complicated ?

    1. SharePoint server can't be renamed after SharePoint is installed
    2. Multiple VM's with the same name can't be powered up in the same network
    3. So the master.vhd contains:
      1. Windows 2003 server SP2
      2. Visual Studio .NET 2005
      3. Microsoft Office SharePoint Designer
    4. When sysprep is ran on the master.vhd, it generalises Windows 2003 server (generate new machine guide, rename computer, etc), the scripts that run also puts "administrator" into the registry so that'd be the name of the next login prompt. A vhd that is in this state is the "sysprep'ed" vhd
    5. When it restarts and the user logs in with administrator, it then runs the script to install
      1. SQL Server 2005
      2. Puts MossFarm account into registry
    6. After restart - login with MossFarm account and run the scripts to install
      1. SharePoint 2007 sp1
    7. Runs Moss\Post_Build.cmd
  3. How do I create my own SharePoint VM to play with?

    When you want to create a SharePoint environment, you would need to create a new Virtual Machine from the SysPrep image.

    When you want to create a SharePoint environment, you would need to create a new Virtual Machine from the SysPrep image.

    1. Make a copy of the latest version of sysprep.vhd and do not run the base one
      1. Rename sysprep.vhd so it will say what you are using it for.
        e.g. client_project_v7.vhd
      2. You will retain the version number so can we know from which sysprep.vhd it was made from
    2. In Hyper-V or Virtual PC, you create a new VM and link it to your copy of the sysprep.vhd
      1. You will need to allocate 2GB of RAM for this image
      2. You will need plenty of hard drive space (at least 25GB to 30GB)
      3. You will also need time - it is best to run this on a different machine if you plan to use your laptop at the same time when you are setting up this Virtual Machine
    3. You want to have the undo disk off initially, so that the installation commits changes directly to the VHD. Start the VM
    4. Once the VM starts up, you will be asked to login - use our SharePoint dev password for the administrator account
    5. Setup scripts will run for the administrator - this will rename the machine and install SQL Server
    6. When the process is completed, the machine will restart, and prompt you to login again as the MOSSFarm account - use our SharePoint dev password for the MOSSFarm account
    7. A second set of setup scripts will run for this account - this will install MOSS, SP1
    8. When this is all done, you will power down the VM, and commit all changes to disk
      1. You will consider setting up either snapshots or undo-disk at this point.
  4. How do I update and create a new version of the Sysprep VM ?

    When MS releases a new service pack, or new Windows update, we install these to the master image and create a new version of the Sysprep image for future VMs.
    1.  Update SQL Server service packs
    2. Update Windows Server 2003 service packs
    3. Update Windows
    4. Update VS.NET service packs
    5. Update SharePoint service packs
    6. Update MS Office SharePoint Designer service packs

    To create a new VM:

    1. Make a copy of the master.vhd, rename it to the next version
    2. Create a VM using this new vhd
    3. Copy additional setup files to D:\install\
    4. Modify the scripts in D:\scripts\
    5. When finished, power down the VM. Make a copy of this and rename it to sysprep-vNext.vhd
    6. Create a new VM using this new vhd
    7. Start it up, and then run the sysprep command in D:\sysprep\
    8. This will generalize the computer's settings and shut it down
    9. Don't start up the VM again - or it'll run the start up scripts
    10. Zz old copies of the master.vhd and sysprep.vhd
  5. What are the different images available?

    We have three types of VM images around the office.

    1. The master.vhd is for upgrading future VMs and sysprep VM's are built from the master.vhd
      The master.vhd is versioned (e.g. master_v8.vhd) to track which version it is, and to assist us in upgrading the master image.
    2. The sysprep.vhd is the one that we use to create a new SharePoint server
      When you run the sysprep.vhd it will create a new SharePoint server. Always make a copy of this to your own machine. The sysprep.vhd is versioned (e.g. sysprep_v8.vhd)
    3. You may find various other VM's created from sysprep.vhd and used for various projects or experiments
      These images are usually renamed but kept the original version number that it was created from. (e.g. sswsp_v8.vhd)
  6. Why do we use VM for SharePoint development?

    All SharePoint customization and development must be done on a Virtual Machine.

        

    1. It's very important to correctly setup a SharePoint environment for development. Correctly configured, this will save you a lot of trouble later on.
    2. From time to time, you can seriously damage a SharePoint installation during development and it is best not to install SharePoint on your everyday working machine. Additionally, when you start a new SharePoint project you don't want to carry all the luggage from a previous customization that could potentially affect your new project.
    3. Virtual machines can be fired up and shut down easily
    4. Virtual machines can be relocated on a different server and thus it doesn't waste developers' own computer resources
    5. Virtual machines can be copied and brought to a client for demostration.
    6. Very easy for someone to quickly create a new SharePoint server to quickly test or experiment with SharePoint.
    7. Bad: There might be more work required to activate additional servers.