Boot to VHD with the SharePoint Information Worker VHD (For those with 4GB of RAM or less)

6 03 2010

Before I begin I want to say thank you to a few people who helped me to get this working, through their blog posts and messages on twitter – @brianlala @joeloleson @LoungeFlyZ.

As I’m sure most of you are aware – the launch date for SharePoint 2010 has now been announced as May 12th. So what better time to start looking at SharePoint 2010.

Brian has already posted a guide on his blog that details most of the steps required to get this working –

http://spinsiders.com/brianlala/2010/02/03/high-level-steps-to-sp2010-demo-vhd-boot-joy/

I will cover some additional steps that aren’t mention and also what’s required to shrink the VHD and convert it to a fixed size. Whilst the VHD itself is only around 40gb in size – it has been set to dynamically expand and the OS partition is set at 130gb. This means that to boot from it you will need at least 130gb free on your hard drive as when the VHD is booted for some reason it needs to expand to its full size, see this post for more info –

http://codebetter.com/blogs/howard.dierking/archive/2009/08/08/windows-7-boot-from-vhd-a-few-gotchas.aspx

If you do not resize the VHD and don’t have the required space for it to expand then you will get a Blue Screen of Death (BSOD) when booting.

I will also cover in this guide the process of injecting your hard disk controller driver into the VHD. Brian covers this in his guide but I have some tips for this which I will share.

For those of you that weren’t aware, Microsoft have provided a SharePoint 2010 VHD for download entitled the ‘SharePoint Information Worker VHD’. This download actually contains two VHD’s – the second of which acts as as a mail server (this one will not be covered in this guide).

The first VHD contains SharePoint 2010 Beta, Visual Studio 2010 Beta, Office 2010 ‘Mondo’ and most apps you will need. The machine is setup as a domain controller of the ‘Contoso’ domain and is pre-populated with about 200 or so AD users. Various SharePoint sites have already been setup too.

Whilst I think the VHD’s provided by Microsoft are great they are not setup to be booted from. I only have 4gb of RAM in my laptop so boot to VHD was really the only option if I wanted to run this machine.

Part 1 – Resizing/Cloning the VM

1. Un-install Office 2010 ‘Mondo’ from the machine, if you don’t do this you will not be able to remove it again and will most likely be stuck with a 1722 error each time you launch an office application.

2. Follow the steps on Brian’s blog post to upgrade the OS within the VHD to Windows Server 2008 R2. You will need run the domainprep tool with the /forestprep and /adprep command line switches first.

3. Now you need to resize the 130gb partition to something more manageable. So download a copy of the GParted live CD and boot from it. Once you are at the GParted interface select the partition and resize it down to a sensible size – I chose 60gb. You will need to click resize and then apply.

4. Once GParted has finished – reboot the VM and let the chkdsk run if it wants to check the consistency of the disk. If you have a look in disk management now you will see that the partition has been resized but we are now left with a lot of unallocated space – this needs to be removed before we can boot to the VHD.

5. Shutdown the VM and create a new fixed size virtual hard disk, you will need to make sure it is slightly bigger than the size you chose earlier when resizing the partition. I chose 63gb for the size of my new virtual disk.

6. Attach the newly created hard disk file to the VM.

7. Now we need to clone the contents of the original hard disk onto the newly created one. There are a number of software options out there to do this – one in particular being Norton Ghost but this costs money. I found that Clonezilla which is free and open source does the job perfectly – http://clonezilla.org/. Download the live CD and boot the VM from it.

8. Follow the steps in the Clonezilla interface using beginner mode to clone the contents of hard disk 1 to hard disk 2.

9. Once Clonezilla has finished power off the VM and remove the original hard disk.

10. Power on the VM and make sure it boots correctly, if it fails check the troubleshooting section at the bottom of this post.

Part 2 – Configuring it to Boot

Before we can copy the virtual hard disk (VHD) file over to our client machine ready for booting we need to either inject the hard disk controller drives and modify the registry. If we don’t do this then we will most likely get a BSOD when we try to boot from the VHD.

I’m afraid that I am not going to go into a great level of detail here but will point out the steps that helped me and allowed me to get the VHD to boot.

1. Open the registry editor on the client machine (the machine you want to boot the VHD from) and navigate to HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > services. This key contains all the drivers/services that windows loads when it boots.

2. Navigate to the same key on the VM, what you will need to do now is go through each of the sub-keys in the services key and compare each one’s ‘Start’ value. A value of 3 indicates that it will start when windows is boot and 0 indicates that it will not . Rather than go through each key, check ones which are most likely to be hard disk controllers e.g. ‘atapi,intelide’ etc.

Depending on your SATA/IDE controller it may not just be a case of editing these registry entries – you might need to copy the drivers to the VM and add registry entries for these drivers but I’m afraid I’m not going to cover that here.

3. THIS IS WHAT WORKED FOR ME – In my case I simply set the start value of the ‘msahci’ (SCSI Controller) to 0, this was set to start on the VM and I guess most likely because of the hardware that Hyper-V uses. Try this before attempting the above.

**Please note that once you have made these changes the VHD might not boot again in Hyper-V so you may wish to make a backup!**

Part 3 – Booting from the VHD

Once you think you are ready to boot from the VHD, copy the VHD file to your client machine and add an entry to the boot menu as described here –

http://technet.microsoft.com/en-us/library/dd799299%28WS.10%29.aspx

When you reboot your machine you will see a new option in the boot menu to boot into your SharePoint Information Worker VHD. If all has gone well then it will boot and you can then begin to install the drivers for your hardware.

Hope this helps someone – think this has been my longest blog post yet!! 🙂

**Troubleshooting

If for any reason the VM does not boot and you get this error message –

‘The boot selection failed because a required device is inaccessible’

Try these steps to fix it (I received the error after using GParted to resize the disk) –

1.Boot from the Windows CD you used to upgrade the VM

2. Select the ‘Repair My Computer’ option

3. Open the command prompt and type ‘bootrec /scanos’ – hopefully you will see the windows install

4. Now type ‘bootrec /rebuildbcd’ and select the windows install – this will add it back to the BCD boot menu.

5. Reboot the VM – hopefully it works!





How to: Boot Windows Server 2008 R2 or Windows 7 from a VHD

17 02 2010

I have now done this multiple times and was recently requested to write a quick how to on my blog so here it is. Windows 7 and Windows Server 2008 R2 both support being booted and installed as a VHD (Virtual Hard Disk). Rather than being installed physically on the disk – the operating system is simply is stored as a VHD file on your hard drive.

**Please note you will need an existing normal installation of Windows 7 or Windows Server 2008 R2 on your computer for this to work!**

Follow the steps below to get up and running:

  1. Boot from the Windows 7 or Windows Server 2008 R2 DVD
  2. When the first installation dialog appears press SHIFT + F10 to open the command prompt
  3. Type ‘diskpart’ and hit ENTER
  4. When the diskpart prompt appears enter the following command – create vdisk file=c:\vdiskname.vhd type=fixed maximum=20000 (this will create a VHD that is 20 GB in size on your C: drive). Make sure you change ‘vdisknamne’ to whatever you want to the VHD to be called. You can also use type ‘expandable’ instead of fixed if you wish so that the VHD expands automatically.
  5. Next type select vdisk file=c:\vdiskname.vhd – where ‘vdiskname’ is the name of your VHD
  6. Finally type attach vdisk
  7. Exit from diskpart and the command prompt
  8. Continue with the installation – when it comes to selecting the partition on which to install the operating system select the newly created VHD partition. Ignore any warnings like ‘you cannot boot from this partition’ as it will boot fine.
  9. Success – once the installation is finished and you reboot your PC you will see a new option in your boot menu to boot from your new VHD.

Hope this helps :-)!





SharePoint 2010 & FIMSyncronizationService Problems

19 11 2009

**Updated 23/11/2009

Jeremy Thake (@jthake) advised me that this service is required for the ‘User Profiles Synchronization Service’ in SP2010 and that if you disable it then this won’t work. Decide whether you are going to need this feature before you disable this. I am not sure why it slows down the OS so much when booting up.

____________________________________________________________________________________

I recently installed the betas of SharePoint Foundation 2010  on top of Windows 7 and full SharePoint Server 2010 on to Server 2008 R2. One problem I found is that after you have rebooted the machine a couple of times it becomes very slow to startup.

At first I thought it was just because I was running SP2010 on a machine with only 4gb of ram and that was just the nature of the beast. When I opened Task Manager though it told a different story – the service ‘FIMSyncronizationService (Forefront Identity Manager Synchronization Service)’ was still trying to start and slowing the whole machine down. Once this service was stopped the machine continued booting into windows.

The service never seemed to start properly and I am assuming this is only needed if you want to use the full Forefront product with SharePoint.

I have now disabled this service using ‘Services.msc’ and SharePoint 2010 is still working fine. I would recommend anyone with the same issue who is not using Forefront to stop and disable this service from loading.

Hope this helps 🙂





My Top 5 IE8 Accelerators

6 11 2009

If you haven’t heard of them ‘Accelerators’ are a new feature in IE8 which are designed to make your browsing tasks quicker and easier.

Accelerators allow you to perform an action by simply highlighting text on a webpage or just right clicking on a page and selecting your chosen accelerator.

Below are my top 5 IE8 accelerators:

1. ‘Google Reader Accelerator’

Simply right click on the RSS feed page and click the accelerator to subscribe to it with your Google reader account.

image

http://www.ieaddons.com/en/details/bookmarks/Subscribe_with_Google_Reader/

2. ‘Wordpress Accelerator’

Select any text on a webpage and select the accelerator to start a new blog post containing the selected text.

image

http://www.wordpress.com

(Login to your dashboard and you should find it available for download)

3. ‘Twitter Accelerator’

Select some text on a page and select the twitter accelerator to send the text as a tweet from your twitter account.

image

http://openbrolly.com/2008/08/31/ie8-accelerator-for-twitter/

4. ‘Google Maps Accelerator’

Select any bit of text (Postcode, Address etc) and select the google maps accelerator to open the location in google maps.

image

http://ie.microsoft.com/activities/en-en/Default.aspx

5. ‘Google Mail Accelerator’

Select some text and select the google mail accelerator to create a new email message containing the selected text.

image 

http://ie.microsoft.com/activities/en-en/Default.aspx

Hope you find these accelerators helpful and as useful as I do!





Windows 7 RC

7 05 2009

windows-7-logo Just thought id write a quick post about the recently released Windows 7 Release Candidate (Build 7100). I am now running this as my main OS and must say I am pretty impressed. Microsoft seem to have channeled all their effort into fixing Vista’s flaws and providing a stable base similar to Windows XP.

Boot up/load time of the OS is incredible, vista would take a good few minutes to load all my applications and be booted up ready for use. In contrast Windows 7 can go from login screen to fully loaded in under 30 seconds. I have been using 7 for about a week now and have not managed to make it crash or blue screen once so it seems strong in the reliability stakes.

The interface of 7 is very similar to vista except for the modification of the task bar to display the icons of the currently loaded apps rather than the icon and the text. This means you can fit a lot more onto the taskbar, its a bit odd at first but fine when you get used to it.

A new addition in windows 7 is ‘Virtual XP Mode’, this is a downloadable add-on from http://www.microsoft.com/windows/virtual-pc/ that is basically a glorified virtual machine. It allows you to run any application inside of a windows XP environment, great for those who don’t want to move to 7 because of compatibility issues.

All in all I am very impressed and certainly won’t be going back to vista! The RC is currently available for download from the MS site:

http://www.microsoft.com/windows/windows-7/download.aspx

Once registered you can also download a serial key. The RC build expires in 2010, plenty of time as 7 should be released by then. 🙂





Windows 7 Public Beta Released

14 01 2009

For those of you that don’t already know, Microsoft have just released their public beta of their latest OS – Windows 7.

They claim to have ironed out all the problems that existed in Vista’s early days and I’ve been told by people who have tested it so far that they can’t make it crash, sounds promising! I myself am going to download an put in a VM so I’ll post what I think up here.

I will post the official download links up here later as I am currently blogging from the airport before flying to Hungary which I’m told is freezing cold! 🙂





IE 6.0 crashing when opening documents from SharePoint/WSS

13 01 2009

I’ve been experiencing random crashes in IE whenever I try and open a document from a WSS/SharePoint site for a while and couldn’t find a fix. Well today I found this hotfix from MS:

http://support.microsoft.com/kb/938888

I installed it on my machine, rebooted and hey presto – the problem has disappeared!

They state that the problem occurs because:

“In this scenario, the older version of the Name.dll file becomes the registered version. When the Owssupp.dll file is used, it tries to use functionality that is not available. This condition causes Internet Explorer to crash (stop responding).”

I thought I would post my find up here as I’m sure some people are probably suffering the same problem! 🙂