Software Restriction Policies Prevent this Installation

29 01 2009

Recently came across this mysterious error message when trying to install VMWare Server 2.0 on a freshly built Windows Server 2003 standalone machine, after running the installer, an error message would pop up saying;

“Software restriction policies prevent this installation.”

Which was rather strange since this machine was not part of a domain and there were no local software restriction policies in place. The first workaround was to create a local software restriction policy;

  1. Open Local Security Policy Settings
  2. Select Software Restriction Policies
  3. Right click the Software Restriction Policies node and select New Software Restriction Policy
  4. Double click Enforcement
  5. Select “All users except local administrators”
  6. Click OK

You might need a reboot after this, alternatively, running gpupdate may also work.

However, unsatisfied with the workaround, I checked the event logs, searched some more and found knowledge base article http://support.microsoft.com/kb/925336.

In summary;

“This problem occurs if the Windows Installer process has insufficient contiguous virtual memory to verify that the .msi package or the .msp package is correctly signed.”

I undid the software restriction policy installed the hotfix and the VMWare Server installation ran fine.





Converting P2V or V2P using Windows Backup

27 01 2009

This link describes a novel approach to converting physical machines to virtual machines and vice versa without using a Converter such as VMWare vCentre Converter.

I’m particularly interested in the the V2P solution, as, having read the offical whitepaper from VMWare about V2P, it’s a little daunting to say the least.

However I haven’t tried this yet so I can’t say exactly how well it works.





Installing the Sysprep Tool for Windows 2003 Server

27 01 2009

It’s not that clear, at least it wasn’t to me :-( , how to install this tool, so I’ll describe my steps here.

The version of the tool you install has to match the version of the OS you are running, so if you’re running Windows Server 2003 SP1 you need the Sysprep tool to match that version. Likewise if you’re running Windows Server 2003 SP2 you need the SP2 version of Sysprep.

Before you use the sysprep tool, you first need to install the Hotfix available from Microsoft, if you’re using Windows Server 2003.

Having done that you need to extract the deployment files from the deploy.cab file found on your W2K3 installation media/iso, or included with your SP1 or SP2 media/iso. Extract these files to something like C:\Sysprep.

You can create a sysprep.inf file manually or use the setupmgr.exe file to create the answer file interactively, and having done that you can then run sysprep itself.





Preparing a Virtual Machine as a Template using SysPrep

27 01 2009

Here’s 2 great articles describing how to prepare a virtual machine for use as a template VM, the article discuss’s using Microsoft Virtual PC, though the content is valid if you’re using VMWare or some other virtualization product.

Here’s the first link, and here’s the second.





Export SQL Server 2005 Xml Column Data to Xml File

19 01 2009

Xml data stored using the SQL Server 2005 xml data type can be exported a number of ways and you can obviously write a managed stored procedure to do it.

However for a quick, one off, type approach you can use the BCP command.

bcp "SELECT [xml column name] FROM [TableName] FOR XML RAW"
      queryout c:\myOutputData.xml -SServerName -T -w -r -t

The downside of this is that, given the command above you’ll get your xml row data exported as shown;

<row><data>{row 1 xml}</row></data>
<row><data>{row 2 xml}</row></data>

so you might need to do some mangling on the output file, or you can obviously change the initial SELECT statement to shape your output appropriately.