Restoring SBS 2008 Backup To Hyper-V

As a test I thought I would see how the SBS 2008 backup handles restoring to a Hyper-V virtual machine. The P2V was successfull but of course there are some issues to deal with.

This is how I did it on a Windows Server 2008 R2 standard machine.

1. Attach the USB backup disk to the Hyper-V host.

2. Open Computer Management -> Disk Management and take the backup disk offline. This allows Hyper-V to attach the usb disk as an internal IDE disk.

3. Open Hyper-V manager.

4. Edit the properties of your SBS 2008 VM. Set the usb disk as the secondary device on the primary IDE channel.

5. Boot the VM using your SBS 2008 DVD or ISO.

6. Restore the system using Windows Complete PC restore.

7. When the restore is complete the VM will reboot. If everything is OK you should eventually see the login prompt.

8. You will need to rerun the connect to internet wizard to fix the network. I also noticed you’ll need to reimport your SSL certificate, so make sure you have a backup of that handy!

That was as far as I got in testing but from what I could see there shouldn’t be a major problem doing a P2V of SBS 2008 to Hyper-V.

Posted in Microsoft | Tagged , | Leave a comment

Black Screen On SBS 2008 Startup

After having our SBS 2008 server in operation for 9 months I noticed that restarts were taking much longer than normal, around 40 minutes. On an unrelated issue I went to open Device Manager and it took some time (probably around a minute) to display the list. Viewing hidden devices (with the environment variable DEVMGR_SHOW_NONPRESENT_DEVICES enabled) is where I found the problem.

Under the section “Volume Shadow Copies” were thousands of “generic volume shadow copy” entries, most of them disabled (not present). My guess is these had been created by windows server backup and the swapping of external usb backup disks. The thousands of shadow copy devices had made the system registry hive huge, causing the delay opening device manager and the black screen at startup.

Here is my solution. Please do this at your own risk!

1. Obtain the Microsoft devcon utility from the Windows Driver Kit. This TechNet Wiki page explains how.

2. Get Rob van der Woude’s RmHidDev.bat script here.

3. Modify lines 53-56 to this:

FOR /F "tokens=1 delims=: " %%A IN ('DEVCON FindAll @STORAGE\VolumeSnapshot\HarddiskVolumeSnapshot* ^| FIND /I /V "matching device(s)"') DO (
	TYPE "%Temp%\DevconFind.txt" | FIND "%%~A" >NUL
	IF ERRORLEVEL 1 %Debug% DEVCON Remove "@%%~A"
)

4. Start an elevated command prompt.

5. Run RmHidDev.bat /Y /D >> output.txt to pipe the output to a log file. This will give a list of all devices the script will remove. Do this to double check it will only remove the disabled generic volume shadow copy devices.

6. Run RmHidDev.bat without switches to remove the devices.

After doing this Device Manager and restarts were much quicker. I noticed no issues with the backups but again do this at your own risk!

Thanks to this post as the basis of this solution.

Posted in Microsoft | Tagged , | Leave a comment

Mysterious V6 Slowdown 2

Just like my previous post, a customer showed me how slow it was to open quotes in V6 on their new Windows 7 machine.

I fired up Process Monitor and looked at the output while loading a quote. I noticed many requests to read\write to the file V6. ini. This file resides in C:\Windows (only in V6 2.1 and older). Since Windows Vista any attempt by an application (without a manifest) to write to C:\Windows will virtualise the file to a location in the user’s profile. This is completely transparent to the application.

For some reason the virtualisation of V6.ini was causing major slowdown in V6. To stop the virtualisation I assigned the write permission to the copy in C:\Windows. This resolved the problem.

Posted in Soft Tech | Tagged | Leave a comment

Mysterious V6 Slowdown

A few weeks ago I came across a very strange slowdown problem with V6. The customer informed me that it was taking at least five minutes to open quotes, big or small. I logged into the computer and checked the installation. It was a brand new Windows 7 machine and V6 had just been installed so everything was set up correctly.

So I started my usual checks. First was event viewer. I noticed some warnings in there regarding dynamically loaded dll’s. I hadn’t seen that event before and looked into it.

Using the fantastic Process Monitor from Microsoft’s SysInternals, I noticed in the stack of the V6 executable a dll that looked out of place. Checking the properties of this dll showed that it belonged to the anti-virus software installed on the machine.

I hoped that disabling the anti-virus would unload the dll. I was wrong. To dig deeper I loaded up Autoruns (also from Microsoft’s SysInternals) and noticed that the dll was listed in the AppInit section. Disabling this entry and restarting the system solved the problem!

I looked into what AppInit is. It’s a deprecated “feature” (if you could call it that) where dlls are loaded when user32.dll is loaded at startup. This knowledge base article and Microsoft’s Raymond Chen explain why this “feature” should not be used.

Posted in Soft Tech | Tagged | Leave a comment