4

We plan to deploy Hyper-V VHD with Windows Server 2008 R2 and SQL Server 2012 Express installed to multiple hosts. From my understanding, the correct way to do this is to install SQL Server in prepartion mode, sysprep Windows, then complete SQL Server installation when the VHD is deployed. I mostly followed the process in this blog post: http://sethusrinivasan.com/category/sysprep/

However, after the VHD is deployed, I'm unable to complete the SQL Server installation. It keeps saying "Upgrade matrix is incorrect". It seems that it's trying to upgrade itself to Enterprise edition (I was asked for product key during install, but I skipped it). Could anyone share their experience in deploying VHDs with SQL Server (we're fine with either SQL Server 2008 R2 or 2012)?

I think the source of my issue is because I can't select "Express Edition" when entering the product key at the completion stage, so the installation is trying to do an upgrade to Enterprise Edition. I have no idea why the drop down list is empty.enter image description here

Jim
  • 629
  • 2
  • 7
  • 20
  • The edition I tried is SQL Server 2012 Express with Advanced Services, I'm not sure if it matters. – Jim Jun 12 '12 at 17:57

3 Answers3

7

Turned out it was caused by the SQL Server setup. After the "prepare" stage, a shortcut to the "complete" stage will be added to the Start Menu. However, for some reason the shortcut links to the SQL Server Enterprise setup. To complete a SQL Server Express prepared instance, the setup must be launched from the SQL Server Express install media, using the command prompt.

To start the prepare stage, use

setup /action=PrepareImage

To complete a prepared instance, use

setup /action=CompleteImage

Hope this helps someone in the future.

Jim
  • 629
  • 2
  • 7
  • 20
4

Sysprep is supported for SQL 2012 Express as you can see here:

http://technet.microsoft.com/library/cc645993(SQL.110).aspx

Please note that: You cannot specify Product IDs for a prepared instance of SQL Server Express editions, you cannot upgrade it to other editions and SQL Server tools are not supported for SQL Server SysPrep installations.

http://msdn.microsoft.com/en-us/library/ee210754

For detailed instructions have a look here:

http://msdn.microsoft.com/en-us/library/ee210664

Danilo Brambilla
  • 1,031
  • 2
  • 14
  • 33
  • thanks, I've read the webpage you provided. I think the source of my issue is because I can't select "Express edition" at the product key page, so the installer is trying to do an upgrade. – Jim Jun 13 '12 at 02:36
  • 1
    Please note that as of now SQL Server tools *are* supported when sysprepping (SQL Server 2014) – Dennis G Jun 11 '15 at 09:53
2

Your best bet will be to setup SQL Server as part of the sysprep process. SQL Server can be installed via a command line install via parameters as part of the VM's deployment (usually via a batch file).

mrdenny
  • 27,074
  • 4
  • 40
  • 68
  • Could you elaborate "setup SQL Server as part of the sysprep process"? Thanks. – Jim Jun 13 '12 at 02:40
  • 1
    Sysprep includes the ability to run "3rd party" commands after the sysprep process is finished. Simply include the SQL Express installer as a part of the image, and have sysprep run the SQL Express installer giving it the needed parameters. If this is a VMware vSphere system you can do all of this via the deployment options. – mrdenny Jun 15 '12 at 21:59