customer

Windows 2008 and MSSQL 2008 in a MyGSI

From GoGrid



Contents

Overview

This document is still incomplete and pending.

This document will guide you first through creating a MyGSI from a Windows 2008 Server base image and installing MSSQL 2008. By default, if you save a MyGSI with MSSQL installed without any sort of modification to the service, there's a high potential of a BSOD (acronym for Blue Screen of Death) with error code message 0x0000007B meaning there's a unrecoverable driver failure. This is often caused by MSSQL starting and attempting to mount the block device on a virtual system without the device driver for that block device present, causing an unrecoverable fatal error. This guide will assist you in saving a MyGSI to prevent this issue and still have MSSQL available when deployed from a saved image.


NOTE: It is always advised you test any saved MyGSI for operation after saving. Regardless of previous operation, or previous successful deployments of a working MyGSI image, GoGrid does not support Windows 2008 with MSSQL integrated within a MyGSI. This guide is provided as-is and is without any warranty whatsoever. There may also be typographical errors or assumed steps. This guide will assume basic system administrator level knowledge and moderate system management level skills.

Getting Started

Requirements

First you'll need to deploy your Image Sandbox

Name Type RAM Operating System Image Public IP
mygsi01 Web Server 2GB Windows 2008 Server (32-bit) w/ None w2k8_32_base 208.1.1.3
mygsi02 Web Server 2GB Windows 2008 Server (64-bit) w/ None w2k8_64_base 208.1.1.4

NOTE: Currently there is no Database type for Windows 2008 so the designation for these GSI's will be Web Server. The bit version of MSSQL you install is recommended to match the bit version of Windows you have deployed, so if you install the 32-bit (x86 or otherwise i386) version of Windows 2008, you should use the same 32-bit version of MSSQL. While not addressed in this document, these same general outline could be applied to MSSQL 2005.

Outline

MyGSI BASE Build Phase(Optional)

It is recommended, but not required, to rebuild the base image provided with the most current updates available. At the time this document was written, the MyGSI base images provided by GoGrid were Windows Server 2008 Enterprise SP1. This optional step is outlined for building a base Windows image and applying all Windows Updates, then using this saved MyGSI as a foundation for future MyGSI images. MyGSI images can be deployed as sandboxes and modified, then re-saved, making it handy to run updates.

  1. Deploy your MyGSI base server image (5-15m)
  2. Run Windows update to apply all necessary patches (rebooting as necessary) (60-240m)
  3. After all patches/updates apply, reboot one more time for a clean session (2-5m)
  4. Run PREP (2-5m)
  5. Return to my.gogrid.com portal and save the MyGSI (10-30m)

Making your MyGSI BASE build

  • Deploy your sandbox from an image that has no addons or integrated roles (should have "w/NONE" in the image title)
Deploying sandbox
Deploying sandbox
  • Log into the system
Log into sandbox
Log into sandbox
  • Install KB947821 , Windows Update Readiness Tool - (32-bit, 64-bit), reboot.
  • Update to SP2 by downloading from your server the following file (Select the correct update depending on the deployed bit version you choose):
    • Windows6.0-KB948465-X86.exe 32-bit
    • Windows6.0-KB948465-X64.exe 64-bit
  • Run the update from a CMD window with the option /unattend
Windows SP2 Update
Windows SP2 Update
  • After the system has been rebooted, you should receive a message that says "Windows Server® Service Pack 2 is now installed"
  • You should run all necessary Windows Updates as needed by the system
Windows Update
Windows Update

NOTE: I recommend not installing Windows Update KB968389, Internet Explorer 8, Windows Malicious Software Removal Tool, or any .Net Framework update in conjunction with other updates. Install them independently for the best results. To modify the selection of updates you will install while in the Windows Update screen, click the text under "Download and install your selected updates" which will read similar to "27 important updates are available" (the number of updates may varry). You can check, or un-check any update in that list, or right click to hide updates so they do not re-appear on subsequent checks for available updates.

  • After all updates have been applied, reboot your system one last time to ensure you have a clean session
  • To have as much free space as possible, remove old updates including the SP2 update file. This can be done by removing the contents of the directory C:\Windows\SoftwareDistribution\Download\. The files and folders in this directory are safe to delete. Where the SP2 Windows update was saved depends on where you saved the file.

NOTE: Instead of just pressing the Delete key on your keyboard or moving files to the Recycle Bin, you can hold the Shift key and press Delete to permanently delete files without moving them to the Recycle Bin.
  • Run PREP
Run PREP
Run PREP

NOTE: Your remote desktop session will be interrupted once started, this is normal.


  • Once the system is offline, return to the GoGrid portal, select the MyGSI image and SAVE it
Save sandbox
Save sandbox
  • Name your MyGSI, add a description as necessary and save
  • Wait between 10 and 30 minutes for the save process to complete

MyGSI with MSSQL Build Phase

  1. Deploy a new sandbox image of Windows 2008 (5-15m)
  2. Run Windows update to apply all necessary patches (rebooting as necessary) (5-240m)
  3. After all patches/updates apply, reboot one more time for a clean session (2-5m)
  4. Install MSSQL matching the same bit version of Windows you have (i.e. if you have Windows 2008 x64 then install the x64 version of MSSQL) (10-45m)
  5. Reboot (2-5m)
  6. Apply patches to MSSQL if necessary (10-45m)
  7. Reboot (2-5m)
  8. Disable MSSQL (2-5m)
  9. Reboot (2-5m)
  10. Run PREP (2-5m)
  11. Return to my.gogrid.com portal and save the MyGSI (10-30m)

Making your MyGSI with MSSQL

  • Deploy your sandbox image
Deploying sandbox
Deploying sandbox
  • Log into the system
Log into sandbox
Log into sandbox
  • You should run all necessary Windows Updates as needed by the system
Windows Update
Windows Update

NOTE: I recommend not installing Windows Update KB968389, Internet Explorer 8, Windows Malicious Software Removal Tool, or any .Net Framework update in conjunction with other updates. Install them independently for the best results. To modify the selection of updates you will install while in the Windows Update screen, click the text under "Download and install your selected updates" which will read similar to "27 important updates are available" (the number of updates may varry). You can check, or un-check any update in that list, or right click to hide updates so they do not re-appear on subsequent checks for available updates.

  • After all updates have been applied, reboot your system one last time to ensure you have a clean session
  • To have as much free space as possible, remove old updates including the SP2 update file. This can be done by removing the contents of the directory C:\Windows\SoftwareDistribution\Download\. The files and folders in this directory are safe to delete. Where the SP2 Windows update was saved depends on where you saved the file.

NOTE: Instead of just pressing the Delete key on your keyboard or moving files to the Recycle Bin, you can hold the Shift key and press Delete to permanently delete files without moving them to the Recycle Bin.
  • Download to Cloud Storage your MSSQL installation media and start the installation program (usually setup.exe)
  • Follow installation procedure, refer to installation documentation should you need assistance

NOTE: It is recommend that you choose the Mixed Mode (SQL Server authentication and Windows authentication) option while under the Database Engine Configuration - Account Provisioning page and specify a SA password for the MSSQL installation. This is because during installation you will add the local Administrator to the authorized users to use Windows Authentication. This user's SID and the machine's SID will change when the saved GSI is re-deployed so the Administrator will not be able to log in.
  • Reboot your system
  • Install any service packs, patches, or updates to MSSQL, these should be ran from the local file system and not Cloud Storage
  • Reboot your system
  • Remove any unnecessary installation files or patches, service packs, and updates from your system to conserve space, or copy these files for backup purposes to Cloud Storage if you wish.

NOTE: Instead of just pressing the Delete key on your keyboard or moving files to the Recycle Bin, you can hold the Shift key and press Delete to permanently delete files without moving them to the Recycle Bin.
  • Disable MSSQL Services from starting
Windows Services
Windows Services

NOTE: There are a number of different ways to disable services in windows. Before making any changes, note the current default status of all services before you change them so that you can change them back when you deploy this saved image in the future
  • You can right-click a service, choose Properties, and change the Startup type to Disabled
  • You can use the sc directive to disable services. Scripts below are examples which you can use/modify to do this in a batch format quickly
For all services that are in the Manual or Automatic startup types you will need to change these to Disabled before running PREP. If you do not, the resulting saved MyGSI image will most likely not deploy correctly.

  • Reboot your system
  • Check that MSSQL Services did not auto start, troubleshoot as necessary and reboot to check
  • Run PREP
Run PREP
Run PREP

NOTE: Your remote desktop session will be interrupted once started, this is normal.


  • Once the system is offline, return to the GoGrid portal, select the MyGSI image and SAVE it
Save sandbox
Save sandbox
  • Name your MyGSI, add a description as necessary and save
  • Wait between 10 and 30 minutes for the save process to complete

MyGSI Deploy Phase

  1. Deploy MyGSI (5-15m)
  2. Log in (< 1m)
  3. Enable MSSQL (2-5m)
  4. Log into MSSQL as SA user (< 1m)
  5. Remove old Administrator account (1m)
  6. Add current machine's Administrator account allowing for Windows Authentication (1m)
  7. Log out of MSSQL (< 1m)
  8. Log into MSSQL using Windows Authentication with the Administrator's account to test (< 1m)
  9. Resume customization as needed (unk.)

Deploying your saved MyGSI

  • Deploy your saved MyGSI
Image:Mygsi-saved-0.png
Deploy saved MyGSI
  • Log into the system
Log into system
Log into system
  • Enable MSSQL Services
Windows Services
Windows Services

NOTE: There are a number of different ways to enable services in windows. You should have noted the previous default status of all services before when building the MyGSI so that you can change them back here
  • You can right-click a service, choose Properties, and change the Startup type to Manual or Automatic depending on what it originally was
  • You can use the sc directive to disable services. Scripts below are examples which you can use/modify to do this in a batch format quickly

  • Reboot your system
  • Check that MSSQL Services did auto start, troubleshoot as necessary and reboot to check
  • Once you've confirmed services start automatically as needed, log into your MSSQL instance as the SA user with the credentials you provided during installation.
  • Once logged in, expand Security, then Logins
  • Right-click on the old Administrator account, and left-click on Delete. Follow the steps to confirm
Image:Mygsi-mssql-3.png
MSSQL user management
  • Right-click on Logins and left-click on New Login...
  • Left-click on Search and type in Administrator in the text box, then click OK
  • Make sure Windows authentication is selected, and click OK at the bottom.
Image:Mygsi-mssql-4.png
MSSQL user management
Image:Mygsi-mssql-5.png
MSSQL user management

  • Test Administrator login via Windows Authentication by closing all Microsoft SQL Server Management Studio windows, and starting a new session.

Testing

After building any MyGSI image, it is recommended that you test that image. To do so, deploy the saved MyGSI image and wait for it to come online. You may have to wait up to 30 minutes for it to finish post-deployment requirements before the system is available. Once online and reachable, log in and check configured settings. If the system is never available, you may want to submit a support case to inquire about the system's status. If the system is offline due to a problem in the MyGSI save process, then you will most likely be required to delete your saved MyGSI server and start over from the ground up.

Source Code for Scripts

Suggested fix: Windows UTC/Local time correction

w32tm /config /manualpeerlist:"216.93.160.62 207.46.232.182 192.43.244.18" /reliable:YES /update

Microsoft® SQL Server® 2008 Express Downloads

Microsoft® SQL Server® 2008 Express is a free edition of MSSQL. The downloads provided here were current as of 01/04/2010:

Microsoft® SQL Server® 2008 Express Edition with Service Pack 1

Microsoft® SQL Server® 2008 Express with Tools

Microsoft® SQL Server® 2008 Express with Advanced Services

Microsoft® SQL Server® 2008 Management Studio Express

Personal tools