Showing posts with label Test Machine Setup. Show all posts
Showing posts with label Test Machine Setup. Show all posts

Thursday, June 17, 2010

Test machine using boot from VHD

Another option to my last post on SharePoint test machine setup is to boot from a VHD file. A VHD is a Virtual Hard Disk, a file that is used as a hard disk on a Virtual PC or Hyper-V Virtual Machine.

I followed the instructions on Marin Frankovic's blog about it, and it was very easy to create an easy-to-rollback, boot-from-vhd test environment. That's what I did:
  1. I used Marin's post to install a fresh Windows 2008 boot.
  2. I then created a differencing vhd based on the new W2K8 boot, using diskpart and running the diskpart command create vdisk file=c:\testdiff.vhd parent=c:\test.vhd maximum=size_in_mb type=expandable (or fixed). This is nice because you can create a initial differencing VHD from a base VHD, put aside a copy of this differencing VHD, and "destroy" your new boot with tests. When you want to rollback the "destruction", just throw away the differencig file your were using, and start with a fresh new copy from the VHD you put aside before.
  3. Next I added the boot entry to this differencing vhd. On a command prompt:
    a. bcdedit /copy generates boot entry copies. There's plenty of references on this, google for some.
    b. Run the following to point the new boot entry to the differencing VHD:
    bcdedit /set {boot_identifier} device vhd=[c:]\path_to_vhd\vdhfile.vdh
    bcdedit /set {boot_identifier} osdevice vhd=[c:]\path_to_vhd\vhdfile.vhd
    bcdedit /set {boot_identifier} detecthal yes
    (the boot identifier is shown when you generate the boot copy with bcdedit /copy. It can also be seen f you run bcdedit with no params)
And that's it. Your tests boots now can use the full power of your machine, RAM & CPU, instead of sharing the (precious) hardware with the host OS, as VM's do. Just remember: boot from VHD is supported only if your OS is W7 Ultimate or Enterprise, or W2K8 R2.

Thursday, March 25, 2010

SharePoint 2010 Test Machine Setup

Some facts on my SharePoint 2010 test environment setup:

1. Some useful links
2. The SharePoint Demonstration Virtual Machine
  • It's a complete test environment for SharePoint 2010, comes pre-loaded with SharePoint Server 2010, Office 2010, SharePoint Designer 2010, an Active Directory domain, Visual Studio 2010, SQL Server 2008 + Analysis & Reporting Services, Exchange Server 2010 (Exchange on a second VM), and several sample sites with data on it. It saves a lot of work.
  • SharePoint 2010 is a *64-bit only* software, so you can't create its VM's on Virtual Server or Virtual PC, since they don't support 64-bits VM's.
    • Since the VM guest operationg system has to be 64-bit, you will have to user Hyper-V, wich only runs on Windows 2008 machines.
    • If you have a desktop that has been more off than on since you got that notebook you are using now, a "lighter" option is to download (free) and intall Hyper-V Server 2008 R2. It's a stripped down version of Windows 2008 designed solely to run VM's and with support for remote VM management (so you will work from the new note ;-). My 3GHz Pentium D (yes, Dual Core, not Core2 Duo) with 6GB RAM could handle the SharePoint 2010 VM reasonably.
Aside from that, you do can install SharePoint 2010 Beta on Windows 7 and Vista (provided that they are 64-bit installations), but it seems too much trouble just for setup a test machine. If you have a Windows 2008 machine, create the VM on Hyper-V, attach the VHD, and that´s it. If not and you have a second machine at hand, go for Hyper-V Server. It took far more time for me to download the Hyper-V Server setup than to get the SharePoint VM running, so that's my suggestion for you.

Note: the only thing I had to change on MS SharePoint Demonstration VM was to fix the virtual network adapter IP address to 192.168.150.1, wich is the address the DNS entries are setup to. and that's it. That took some time to figure out, but not that much... ;-)

Note2: Check out this post too: "Test Machine Using Boot From VHD". Booting from a VHD improves the performance of your test machine, because there's only one operating system running - instead of two, as when you use virtual machines.