Veeam Availability Suite 10 unattended installation

Since Veeam has recently published the Veeam ONE 10 and Veeam Backup & Replication 10 RTM Build for Partners and Service Providers, I wanted to get my Veeam Availability Suite 10 unattended installation Ansible Role ready for this major release.

Besides the necessary adjustments for Veeam Availability Suite 10, I have taken care of a problem with the SQL Express setup for Veeam ONE and Veeam Backup & Replication. I had recently discovered a problem: The setup of the SQL Express 2016 only worked fine if the user was logged in to the destination server. The Ansible community on Reddit was very helpful to get this problem solved (thanks to jborean93). It is necessary to run the setup as an explicit user. Ansible can do this via privilege escalation “become” in runas mode and the additional flag logon_type=batch.

- name: SQL - Install SQL Express 2016 SP2 
  win_package:
    path: "{{ vbr_source }}Redistr\\x64\\SqlExpress\\2016SP2\\SQLEXPR_x64_ENU.exe"
    product_id: SQL 2016 Express
    arguments: 
    - '/q'
    - '/ACTION=Install'
    - '/IACCEPTSQLSERVERLICENSETERMS' 
    - '/FEATURES=SQL' 
    - '/INSTANCENAME=VEEAMSQL2016'
    - '/SQLSVCACCOUNT={{ sql_username }}'
    - '/SQLSVCPASSWORD={{ sql_userpassword }}'
    - '/SECURITYMODE=SQL'
    - '/SAPWD={{ sql_sapassword }}'
    - '/ADDCURRENTUSERASSQLADMIN'
    - '/UPDATEENABLED=0'
    - '/TCPENABLED=1'
    - '/NPENABLED=1'
  become: yes
  become_flags: logon_type=batch
  vars: 
    ansible_become_method: runas
    ansible_become_user: "{{ vbr_username }}"
    ansible_become_pass: "{{ vbr_userpassword }}"

The handling of the veeam_setup Ansible Role is unchanged. But the Role is now able to run the Veeam ONE 10 and Veeam Backup & Replication 10 RTM Build unattended installation.

Just download the veeam_setup Ansible Role from the Ansible Galaxy and create your Playbook.

Veeam Availability Suite 10 unattended installation - install Ansible Role

This Playbook example installs Veeam Backup & Replication 1o with mostly default settings, just the installation source is modified.

- name: Veeam Backup & Replication v10 RTM Community Edition Setup
  hosts: veeam
  gather_facts: no
  vars:
    vbr_download: false
    vbr_setup: true
    vbr_source: "E:\\"
    vbr_update: false
    one_setup: false
    one_source: "D:\\"
    one_update: false
  roles:
    - veeam_setup

You can find all possible parameters of the Ansible Role in the Defaults YML or the README.

---
# defaults file for veeam_setup

## Choose Setup
vbr_download: false
vbr_setup: false
vbr_update: false
one_setup: false

## VBR Parameters
one_source: "E:\\"
one_username: "svc_one"
one_userpassword: "ChangeM3!"
one_update_file: "VeeamONE_9.5.4.4587_Update#4a.exe"
one_update_id: "Veeam ONE Update 4a"
vbr_url: "https://download2.veeam.com/VeeamBackup&Replication_9.5.4.2615.Update4.iso"
vbr_checksum: "8a594cec74059f9929ea765ac5e70a49da6fc93803b567cbb9d74fbb1a49a6cc"
vbr_destination: "C:\\install\\"
vbr_destination_file: "vbr.iso"
vbr_source: "D:\\"
vbr_username: "svc_vbr"
vbr_userpassword: "ChangeM3!"
vbr_update_file: "veeam_backup_9.5.4.2866.update4b_setup.exe"
vbr_update_id: "Veeam VBR Update 4b"
sql_username: "svc_sql"
sql_userpassword: "ChangeM3!"
sql_sapassword: "ChangeM3!"
Veeam Availability Suite 10 unattended installation - Run Playbook

My Development and Test environment

My Ansible Development setup slightly changed since my prior blog post.

Ansible Control Machine:

  • CentOS 8.1 (4.18.0-147.3.1.el8_1.x86_64)
  • Ansible 2.9.3
  • Python 3.6.8
Veeam Availability Suite 10 unattended installation - Ansible Version

Target Server:

  • Windows Server 2019

To access the Ansible Control Machine and develope the Role in Visual Studio Code, I have switched to the Visual Studio Code Remote Development Extension Pack. This setup is way more comfortable than the remote execution of the Ansible Extension.

Required modifications

To get the Ansible Role ready for the Veeam Availability Suite 10 unattended installation just a few changes have been required.

  1. Veeam ONE 10 and Veeam Backup & Replication 10 have switched to SQL Express 2016 SP2
  2. Veeam ONE setup parameter for EULA has changed for all packages
Veeam Availability Suite 10 unattended installation - Veeam ONE Parameter

Veeam Backup & Replication 10 unattended installation

---
# vbr_setup tasks file for veeam_setup
- name: Pre - Install 2012 System CLR Types
  win_package:
    path: "{{ vbr_source }}Redistr\\x64\\SQLSysClrTypes.msi"
    state: present
- name: Pre - Install 2012 Shared management objects
  win_package:
    path: "{{ vbr_source }}Redistr\\x64\\SharedManagementObjects.msi"
    state: present
- name: Pre - Create Local Service and RunAs User
  win_user:
    name: "{{ vbr_username }}"
    password: "{{ vbr_userpassword }}"
    password_never_expires: yes
    state: present
    groups:
        - Administrators
- name: SQL - Create Local SQL User
  win_user:
    name: "{{ sql_username }}"
    password: "{{ sql_userpassword }}"
    password_never_expires: yes
    state: present
    groups:
        - Users
- name: SQL - Install SQL Express 2016 SP2 
  win_package:
    path: "{{ vbr_source }}Redistr\\x64\\SqlExpress\\2016SP2\\SQLEXPR_x64_ENU.exe"
    product_id: SQL 2016 Express
    arguments: 
    - '/q'
    - '/ACTION=Install'
    - '/IACCEPTSQLSERVERLICENSETERMS' 
    - '/FEATURES=SQL' 
    - '/INSTANCENAME=VEEAMSQL2016'
    - '/SQLSVCACCOUNT={{ sql_username }}'
    - '/SQLSVCPASSWORD={{ sql_userpassword }}'
    - '/SECURITYMODE=SQL'
    - '/SAPWD={{ sql_sapassword }}'
    - '/ADDCURRENTUSERASSQLADMIN'
    - '/UPDATEENABLED=0'
    - '/TCPENABLED=1'
    - '/NPENABLED=1'
  become: yes
  become_flags: logon_type=batch
  vars: 
    ansible_become_method: runas
    ansible_become_user: "{{ vbr_username }}"
    ansible_become_pass: "{{ vbr_userpassword }}"
- name: Install VBR Catalog
  win_package:
    path: "{{ vbr_source }}Catalog\\VeeamBackupCatalog64.msi"
    state: present
    arguments:
        - 'VBRC_SERVICE_ACCOUNT_TYPE=1'
        - 'ACCEPT_THIRDPARTY_LICENSES=1'
- name: Install VBR Server
  win_package:
    path: "{{ vbr_source }}Backup\\Server.x64.msi"
    state: present
    arguments: "VBR_SERVICE_ACCOUNT_TYPE=1 VBR_SQLSERVER_AUTHENTICATION=1 VBR_SQLSERVER_SERVER=(local)\\VEEAMSQL2016 VBR_SQLSERVER_USERNAME=sa VBR_SQLSERVER_PASSWORD={{ sql_sapassword }} ACCEPT_THIRDPARTY_LICENSES=1 ACCEPTEULA=YES"
- name: Install VBR Console
  win_package:
    path: "{{ vbr_source }}Backup\\Shell.x64.msi"
    state: present
    arguments:
        - 'ACCEPTEULA=YES'
        - 'ACCEPT_THIRDPARTY_LICENSES=1'
- name: Install VBR Explorer for ActiveDirectory
  win_package:
    path: "{{ vbr_source }}Explorers\\VeeamExplorerForActiveDirectory.msi"
    state: present
    arguments:
        - 'ACCEPT_EULA=1'
        - 'ACCEPT_THIRDPARTY_LICENSES=1'
- name: Install VBR Explorer for Exchange
  win_package:
    path: "{{ vbr_source }}Explorers\\VeeamExplorerForExchange.msi"
    state: present
    arguments:
        - 'ACCEPT_EULA=1'
        - 'ACCEPT_THIRDPARTY_LICENSES=1'
- name: Install VBR Explorer for Oracle
  win_package:
    path: "{{ vbr_source }}Explorers\\VeeamExplorerForOracle.msi"
    state: present
    arguments:
        - 'ACCEPT_EULA=1'
        - 'ACCEPT_THIRDPARTY_LICENSES=1'
- name: Install VBR Explorer for SharePoint
  win_package:
    path: "{{ vbr_source }}Explorers\\VeeamExplorerForSharePoint.msi"
    state: present
    arguments:
        - 'ACCEPT_EULA=1'
        - 'ACCEPT_THIRDPARTY_LICENSES=1'
- name: Install VBR Explorer for SQL
  win_package:
    path: "{{ vbr_source }}Explorers\\VeeamExplorerForSQL.msi"
    state: present
    arguments:
        - 'ACCEPT_EULA=1'
        - 'ACCEPT_THIRDPARTY_LICENSES=1'
Veeam Availability Suite 10 unattended installation - VBR 10

Veeam ONE 10 unattended installation

---
# one_setup tasks file for veeam_setup
- name: Pre - Enable firewall
  win_firewall:
    state: enabled
    profiles:
    - Domain
    - Private
    - Public
- name: Pre - Configure firewall rule "Reporter Console"
  win_firewall_rule:
    name: VeeamONE_ReporterConsole
    localport: 1239
    action: allow
    direction: in
    protocol: tcp
    state: present
    enabled: yes
- name: Pre - Configure firewall rule "Business View"
  win_firewall_rule:
    name: VeeamONE_BusinessView
    localport: 1340
    action: allow
    direction: in
    protocol: tcp
    state: present
    enabled: yes
- name: Pre - Configure firewall rule "Agent"
  win_firewall_rule:
    name: VeeamONE_Agent
    localport: 2805
    action: allow
    direction: in
    protocol: tcp
    state: present
    enabled: yes
- name: Pre - Configure firewall rule "Server SMB"
  win_firewall_rule:
    name: VeeamONE_ServerSMB
    localport: 445
    action: allow
    direction: in
    protocol: tcp
    state: present
    enabled: yes
- name: Pre - Create Local Veeam ONE Service User
  win_user:
    name: "{{ one_username }}"
    password: "{{ one_userpassword }}"
    password_never_expires: yes
    state: present
    groups:
        - Administrators
- name: Pre - Create Local SQL Service User
  win_user:
    name: "{{ sql_username }}"
    password: "{{ sql_userpassword }}"
    password_never_expires: yes
    state: present
    groups:
        - Users
- name: Pre - Install 2012 System CLR Types
  win_package:
    path: "{{ one_source }}Redistr\\x64\\SQLSysClrTypes.msi"
    state: present
- name: Pre - Install 2012 Shared management objects
  win_package:
    path: "{{ one_source }}Redistr\\x64\\SharedManagementObjects.msi"
    state: present
- name: Pre - Install XML Parser
  win_package:
    path: "{{ one_source }}Redistr\\x64\\msxml6_x64.msi"
    state: present
- name: Pre - Install SQL Native Client
  win_package:
    path: "{{ one_source }}Redistr\\x64\\sqlncli.msi"
    state: present
    arguments: "IACCEPTSQLNCLILICENSETERMS=YES"
- name: Pre - Install ReportViewer
  win_package:
    path: "{{ one_source }}Redistr\\ReportViewer.msi"
    state: present
- name: Pre - Install IIS
  win_feature:
    name: Web-Server
    state: present
    include_sub_features: yes
    include_management_tools: yes
- name: Pre - Install SQL 2016 Express
  win_package:
    path: "{{ one_source }}Redistr\\x64\\SqlExpress\\2016SP2\\SQLEXPR_x64_ENU.exe"
    product_id: SQL 2016 Express
    arguments: 
    - '/q'
    - '/ACTION=Install'
    - '/IACCEPTSQLSERVERLICENSETERMS' 
    - '/FEATURES=SQL' 
    - '/INSTANCENAME=VEEAMSQL2016'
    - '/SQLSVCACCOUNT={{ sql_username }}'
    - '/SQLSVCPASSWORD={{ sql_userpassword }}'
    - '/SECURITYMODE=SQL'
    - '/SAPWD={{ sql_sapassword }}'
    - '/ADDCURRENTUSERASSQLADMIN'
    - '/UPDATEENABLED=0'
    - '/TCPENABLED=1'
    - '/NPENABLED=1'
  become: yes
  become_flags: logon_type=batch
  vars: 
    ansible_become_method: runas
    ansible_become_user: "{{ one_username }}"
    ansible_become_pass: "{{ one_userpassword }}"
- name: Install ONE Monitor Server 
  win_package:
    path: "{{ one_source }}Monitor\\VeeamONE.Monitor.Server.x64.msi"
    state: present
    # Veean Documentation wrong, VM_VC_SELECTED_TYPE=2 is not default!
    arguments: "ACCEPT_THIRDPARTY_LICENSES=1 ACCEPT_EULA=1 VM_MN_SERVICEACCOUNT={{ one_username }} VM_MN_SERVICEPASSWORD={{ one_userpassword }} VM_MN_SQL_SERVER=localhost\\VEEAMSQL2016 VM_MN_SQL_AUTHENTICATION=1 VM_MN_SQL_USER=sa VM_MN_SQL_PASSWORD={{ sql_sapassword }} VM_BACKUP_ADD_LATER=1 VM_VC_SELECTED_TYPE=2"
- name: Install ONE Reporter Server 
  win_package:
    path: "{{ one_source }}Reporter\\VeeamONE.Reporter.Server.x64.msi"
    state: present
    arguments: "ACCEPT_THIRDPARTY_LICENSES=1 ACCEPT_EULA=1 VM_RP_SERVICEACCOUNT={{ one_username }} VM_RP_SERVICEPASSWORD={{ one_userpassword }} VM_RP_SQL_SERVER=localhost\\VEEAMSQL2016 VM_RP_SQL_AUTHENTICATION=1 VM_RP_SQL_USER=sa VM_RP_SQL_PASSWORD={{ sql_sapassword }} VM_BACKUP_ADD_LATER=1 VM_VC_SELECTED_TYPE=2"
- name: Install ONE Reporter Web UI  
  win_package:
    path: "{{ one_source }}Reporter\\VeeamONE.Reporter.WebUI.x64.msi"
    state: present
    arguments: "ACCEPT_THIRDPARTY_LICENSES=1 ACCEPT_EULA=1 VM_RP_SERVICEACCOUNT={{ one_username }} VM_RP_SERVICEPASSWORD={{ one_userpassword }} VM_RP_SQL_SERVER=localhost\\VEEAMSQL2016 VM_RP_SQL_AUTHENTICATION=1 VM_RP_SQL_USER=sa VM_RP_SQL_PASSWORD={{ sql_sapassword }}"
- name: Install ONE Monitor Client
  win_package:
    path: "{{ one_source }}Monitor\\VeeamONE.Monitor.Client.x64.msi"
    state: present
    arguments: "ACCEPT_THIRDPARTY_LICENSES=1 ACCEPT_EULA=1"
- name: Install ONE Agent 
  win_package:
    path: "{{ one_source }}Agent\\VeeamONE.Agent.x64.msi"
    state: present
    arguments: "ACCEPT_THIRDPARTY_LICENSES=1 ACCEPT_EULA=1 VO_AGENT_TYPE=1 VO_BUNDLE_INSTALLATION=1 VO_AGENT_SERVICE_ACCOUNT_NAME={{ one_username }} VO_AGENT_SERVICE_ACCOUNT_PASSWORD={{ one_userpassword }}"

Veeam Availability Suite 10 News

Nikola Pejková has created this great list of Veeam Availability Suite 10 Blog Posts created by my Veeam Vanguard fellows:

Additional Blog Posts:

Updates

25.02.2020 – Version 0.8 of the Ansible Role

Since the publication of the blog post the Ansible Role got a few new features:

  1. SQL Express Setup executes in RunAs-Mode (Fix a weird behavior)
  2. A License File can be applied during the unattended installation
  3. The SQL Express installation is optional
  4. The SQL instance can be configured (e.g. remote SQL)
  5. The download task uses per default the Veeam Backup & Replication 10 ISO
  6. Unattended installation was tested with v10 GA
  7. Minor debug enhancements
Veeam Availability Suite 10 unattended installation - Version 0.8

Tweak for the SQL Express Setup:

- name: SQL - Install SQL Express 2016 SP2 
  win_package:
    path: "{{ vbr_source }}Redistr\\x64\\SqlExpress\\2016SP2\\SQLEXPR_x64_ENU.exe"
    product_id: SQL 2016 Express
    arguments: 
    - '/q'
    - '/ACTION=Install'
    - '/IACCEPTSQLSERVERLICENSETERMS' 
    - '/FEATURES=SQL' 
    - '/INSTANCENAME=VEEAMSQL2016'
    - '/SQLSVCACCOUNT={{ sql_username }}'
    - '/SQLSVCPASSWORD={{ sql_userpassword }}'
    - '/SECURITYMODE=SQL'
    - '/SAPWD={{ sql_sapassword }}'
    - '/ADDCURRENTUSERASSQLADMIN'
    - '/UPDATEENABLED=0'
    - '/TCPENABLED=1'
    - '/NPENABLED=1'
  become: yes
  become_flags: logon_type=batch
  vars: 
    ansible_become_method: runas
    ansible_become_user: "{{ vbr_username }}"
    ansible_become_pass: "{{ vbr_userpassword }}"
  when: sql_setup | bool

Thanks to jborean93: SQL Express Setup via WinRM

New Defaults file:

---
# defaults file for veeam_setup

## Choose Setup
vbr_download: false
vbr_license: false
vbr_setup: false
vbr_update: false
one_setup: false
one_license: false
one_update: false

## VBR Parameters
one_source: "E:\\"
one_destination: "C:\\install\\"
one_destination_license: "license.lic"
one_source_license: "/data/license.lic"
one_username: "svc_one"
one_userpassword: "ChangeM3!"
one_update_file: "" #VeeamONE_9.5.4.4587_Update#4a.exe
one_update_id: "" #Veeam ONE Update 4a
vbr_url: "https://download2.veeam.com/VeeamBackup&Replication_10.0.0.4461.iso"
vbr_checksum: "26ddcc3df046af1ca1458b3040fc9024b4361ae1e51e1cf4516afe53fb024650"
vbr_destination: "C:\\install\\"
vbr_destination_file: "vbr.iso"
vbr_destination_license: "license.lic"
vbr_source_license: "/data/license.lic"
vbr_source: "D:\\"
vbr_username: "svc_vbr"
vbr_userpassword: "ChangeM3!"
vbr_update_file: "" #veeam_backup_9.5.4.2866.update4b_setup.exe
vbr_update_id: "" #Veeam VBR Update 4b
sql_setup: true
sql_instance: "(local)\\VEEAMSQL2016"
sql_username: "svc_sql"
sql_userpassword: "ChangeM3!"
sql_sapassword: "ChangeM3!"

Leave a Reply