Software Management Group

 View Only

Installation of products that require a restart during rollout process Software Management 8.1 

Mar 15, 2018 12:26 PM

Introduction

In summary, the purpose of this article is to describe how to perform installation of products that require a restart during a rollout process when there’s no possibility to perform an unattended installation using a Managed Delivery Policy in Software Management Solution. Two examples I know of that require a reboot are Daemon Tools Lite, and Microsoft SQL Server 2016.

 

As an example, this article will demonstrate how to install Microsoft SQL Server 2016 software, which requires a restart during an installation process. Thus, below is the list of items to complete in this example:

  • Create a Microsoft SQL Server 2016 software resource within the Software Catalog
    • Manipulate or change the command-line that will install the software
  • Create a Managed Delivery Policy based on the Software Resource created
    • Add the Microsoft SQL Server 2016 software resource in the policy
    • Change the Advanced Options of the policy so that the policy will continue to run if or when a task fails
    • Add a Power Control for a Restart of the computer task in the policy
    • Add once more a Microsoft SQL Server 2016 software resource, so that the sequence of tasks will be the following in the policy: software resource install task > restart computer task > software resource install task

NOTE: The solution described in this article is not applied only to a Microsoft SQL Server 2016 installation, but to any product that require a restart during a rollout process.

 

Creating a Software Resource

The following process walks through the creation of the Software Resource. In this example we are using Microsoft SQL Server 2016 as the example. These steps can be used for any Software Resource that requires this method to account for a mid-install reboot.

 

  1. ZIP (compress) the contents of the SQL 2016 installation folder and make the compressed file available to the Symantec Management Platform server.
  2. In the Symantec Management Console, browse under Manage > Software.
  3. Once the panes load, right-click in the whitespace of the upper left pane and choose Import Software, as shown in this screenshot.

  1. The Import Software dialog will be launched. On the first page of the dialog click the Add button and from the File Open dialog, choose the compressed folder from step #1 containing the Microsoft SQL Server 2016 installation files.
  2. When prompted if you wish to extract the ZIP, choose Yes.
  3. You should choose setup.exe as the installation file for this software resource. If you are using another application consult the application’s documentation for what file launches the installation. See this screenshot for the example, and note you can select another file using the “Set Installation File” button.
  4. On the next page of the wizard optionally you can change the name of the software resource to be more user-friendly. Let's name our software resource like "Microsoft SQL Server 2016". Also the check box "Open software resource for editing" should be enabled as edits are required to change a command-line for the resource. To finally import a software click OK button on the wizard page.
  5. In the opened software resource manager change is required for a command-line that will be used to install the Microsoft SQL Server 2016 software. Typically to run the install silently software, such SQL Server, a non-default command-line should be specified. To do this, click on the Package tab, then under the Command lines section choose "Install" command-line and click Edit button on the toolbar, as shown in this screenshot:
  6. In the opened "Add or Edit Command Line" web page dialog type the following command line in the Command line edit box:
  7. Setup.exe /qs /ACTION=Install /FEATURES=SQL /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT=“NT AUTHORITY\SYSTEM” /SQLSYSADMINACCOUNTS=“Builtin\Administrators” /AGTSVCACCOUNT=“NT AUTHORITY\Network Service”
    NOTE: The command-line needs to be run silently. Other command line parameters may be needed based on what Software you are installing. This example is provided as a reference only, the actual command-line may differ.

  1. Save changes to both in the "Add or Edit Command Line" web page dialog and in the "Microsoft SQL Server 2016" Software Resource Editor.

 

The Software Resource has now been created. This will be used for both pre and post boot executions. Essentially this configuration accounts for both allowing the Managed Delivery to execute the reboot, and for the installation to resume on reboot.

 

Creating and configuring a Managed Delivery Policy

Now that the installation package and execution has been configured, a Managed Software Delivery Policy will be used to deliver and properly execute the Software Resource, allowing a reboot to occur in mid-installation. Use the following steps as an example of how to create and configure this policy, using Microsoft SQL Server 2016:

  1. After the "Microsoft SQL Server 2016" software resource has been created, a Managed Software Delivery Policy based on that resource needs to be created to perform the installation. In the Symantec Management Console, browse under Manage > Policies > and browse under Software and right-click the folder named Managed Software Delivery and choose new > Managed Software Delivery.
  2. The New Managed Software Delivery policy appears in the right pane. It is recommended to change the name of the Managed Software Delivery Policy, and the name of the Policy as it shows up in the Symantec Management Agent UI. To do this click on the Policy Settings tab of the policy and type the new policy name in the Display name edit box. In this example the name of the policy is "Microsoft SQL Server 2016". Also change the policy name in the top of Managed Delivery Policy window, as shown here:
  3. The Software Resource that will be installed should be added. To do this, on the Software tab click the Add button, and in the opened drop-down menu click the Software Resource button. In the opened "Select Software" webpage dialog find and choose the recently created "Microsoft SQL Server 2016" Software Resource (or whatever software resource you are using) and click OK.
  4. After the Software Resource has been added to the Managed Software Delivery Policy, select the "Microsoft SQL Server 2016" Software Resource and click the Advanced Options button in the right pane of the window.
  5. In the Advanced Options webpage dialog click on the Results-based actions tab and set the following settings:
    1. Upon success: No action required
    2. Upon failure: Continue
      See this screenshot that shows the configuration to be used:

  1. In the Managed Software Delivery Policy on the Software tab click the Add button, and in the opened drop-down menu click the Task button. In the opened "Select Task" webpage dialog find and choose Power Control - Restart Computer task as shown in this screenshot:
  2. Next, in the Managed Software Delivery Policy once again add the "Microsoft SQL Server 2016" Software Resource as we have already done in step 3. This time don't change any of the advanced settings.
  3. After the preceding steps are completed, the policy should contain the "Microsoft SQL Server 2016" Software Resource, a "Power Control - Restart" task, and one more "Microsoft SQL Server 2016" Software Resource. Please, verify that the added tasks' sequence is correct. If it's not, use the up or down arrow buttons on the Software tab toolbar to move the highlighted task node up or down in the tree, as shown here:
  4. Scroll down and open the Applied to section by clicking on the expand/shrink arrow button.
  5. Click Apply to v dropdown and choose Computers.
  6. In the Input section, click Add > Computers or Devices. If you have a Target saved of systems to use, you can alternately use Target from the dropdown and link to it.
  7. In the resulting window select the systems you wish to run the job on. The following methods can assist in finding designated computers:
    1. Use the Group: dropdown to filter results by Organizational objects/views.
    2. Use the Search field to filter the results based on computer name.
    3. Multi-select computers using the Ctrl and Shift keys and use the >> button to transfer them over.
  8. Click OK once the computers you need are included.
  9. You should now see a row for the Computer List you just created, including a Count column that shows you how many machines are targeted for the Policy.
  10. Scroll down and open the Schedule section by clicking the arrow button.
  11. Click the Add schedule v Dropdown and select an appropriate Schedule option. The different settings here will be covered later.
  12. After adding a schedule, browse back to the top and be sure to turn the Policy on by clicking on the On/Off toggle dropdown and selecting On.
  13. Click Save changes to save and commit the policy.

 

The Policy is now setup and scheduled to be installed.

 

Other considerations

Please note the following items. These are geared specifically towards Microsoft SQL Server 2016, yet the principle may apply to other software installs as well.

  1. On clients the first Managed Delivery policy run fails, but it's expected, because the restart required to proceed with MS SQL Server 2016 installation, and after the first run fails, a policy will continue to evaluate (we have set up the necessary option in Policy's Advanced Options), and a Restart Computer task will be performed after that. This ensures the software install runs to completion AND we have an overall success when the second Software Resource execution runs.
  2. After a machine is restarted, the policy continues to run for the second time, and finally MS SQL Server 2016 will be successfully installed. Managed Delivery Policy execution will show as succeeded, and the status will be set to Compliant.

 

Conclusion

This process should fundamentally work for any installation that requires a reboot in the middle. Note that it is important to configure it properly, and note that for some installs the first Software Resource execution may report as failed, but this is expected.

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.