Installing and updating Veeam Backup and Replication (and agent) using Chocolatey

  • 10 September 2022
  • 9 comments
  • 230 views

Userlevel 6
Badge +4

Introduction

 

Last week I wrote a blogpost on how to install and update VM365 using Chocolatey. This week we will continue with Veeam Backup & Replication or VBR. Unfortunately installing a VBR Server is not as easy as VB365. The installation of a VBR Server has some required parameters that you need to configure for the installation to work, the management software (console and explorers) do not require parameters and are quite straight forward. 

Best practices tell us that the VBR Server and console should be installed on separate (virtual) machines. With Chocolatey this is achievable. But, if you really want, one can install the console on the same machine.

For more VBR best practices have a look at the bg guide: https://bp.veeam.com/vbr/

 

❗ If you do not know what Chocolatey is, what it's for and how to install it, please read the blogpost for VB365 linked above ❗

 

Chocolatey Tips & Tricks

 

Most Chocolatey packages require Administrator permissions to install. Usually packages ending with .portable do not require this. To start an Elevated PowerShell (Administrator Permissions), search for PowerShell in your start menu, right click on it and select Run as Administrator. This will start PowerShell in Administrator mode. 

 

When you provide package parameters to a Chocolatey package, by default, they are not stored for the next installation. The Chocolatey team has made an optional feature that you can enable to save those parameters for the next installation. To enable this, run the following command in an Elevated powershell:

choco feature enable -n=useRememberedArgumentsForUpgrades

 

Another feature that I like to enable and suggest for the VBR packages is the feature that detects for a pending reboot. We all have seen that a piece of software wants to reboot after the installation, and we all should do that. Sometimes when you install software, it can only be detected by the next installation after a reboot. a KB article or .NET Framework are examples of this. To enable this, run the following command in an Elevated powershell:

choco feature enable -n=exitOnRebootDetected

 

VBR Server

 

When installing a VBR Server, an MS SQL Server needs to be installed first. Depending on the size of your backup environment, this can be done using an SQL Server Express or a full blown SQL Server. See this page in the BP guide for more information.

 

SQL Server Express

 

If you decide to install SQL Express, the installation is quite straight forward. The Chocolatey package will install SQL Express with the default instance name SQLEXPRESS. Run this command:

 

choco install sql-server-express

 

SQL Server (Advanced installation)

 

There is a Chocolatey package available that installs the SQL Server 2019 Developer edition. This package has the possibility to provide your own ISO and ConfigurationFile.ini to customize your installation. This is out of scope of this blogpost. But if you want, you can read more about it on the Chocolatey package page: https://community.chocolatey.org/packages/sql-server-2019

 

After you have installed SQL Server, either locally or on a remote server, one can continue by installing the VBR Server. The package has a lot of parameters that you can provide, but in this blogpost I will only cover the minimum required parameters for installation. If you have specific needs, have a look at this page: https://mkevenaar.github.io/chocolatey-packages/packages/veeambackupandreplicationserver.html

 

I am gonna assume that the user used for starting the VBR Server has the required permissions on the database server. For more information: https://helpcenter.veeam.com/docs/backup/vsphere/required_permissions.html

 

For the most easy installation, you’ll need to gather the following information:

  • The full path to your license file. For example: c:\masters\license-vbr.lic 
  • The hostname of your SQL Server and instance name, this can be (local) if it’s your local machine. For example: (local)\SQLEXPRESS
  • A username and password the service will run on. This will be different for each environment. In this scenario, this user needs permissions on the SQL Server to create/update the database. If this is a domain user, the username should be in the domain\user format.

This results in the following command:

choco install veeam-backup-and-replication-server --params "/sqlServer:(local)\SQLEXPRESS /licenseFile:c:\masters\license-vbr.lic /username:[username] /password:[password]"

You should change [username] and [password] to your needs.

This will install the following:

  • The Veeam Backup & Replication ISO
  • VBR Catalog, with default settings
  • Veeam Backup & Replication Server
  • My Chocolatey ISO Mount extension, required to mount the ISO and execute the MSI installers inside of it
  • .NET Framework 4.7.2
  • Microsoft Visual C++ Redistributable for Visual Studio
  • Microsoft SQL Server 2014 Management Objects
  • Microsoft System CLR Types for SQL Server 2014
  • Microsoft Report Viewer 2015 Runtime

If the installation failed, by default a logfile is created. There should be a file in your temp folder called veeam-backup-and-replication-server.[version].log The full path should be visible in the output of the choco install command

 

VBR Console

 

The VBR Console consists of a couple of packages. To make it easy I created a so called meta package that has dependencies on all the packages. This way you only need to install one package to setup a VBR management station.

choco install veeam-backup-and-replication-management

This will install:

  • Veeam Backup & Replication Console and dependencies:
    • The Veeam Backup & Replication ISO
    • My Chocolatey ISO Mount extension, required to mount the ISO and execute the MSI installers inside of it
    • .NET Framework 4.7.2
    • Microsoft Visual C++ Redistributable for Visual Studio
    • Microsoft SQL Server 2014 Management Objects
    • Microsoft System CLR Types for SQL Server 2014
    • Microsoft Report Viewer 2015 Runtime
  • Veeam Explorers:
    • Veeam Explorer for Microsoft Active Directory
    • Veeam Explorer for Microsoft Exchange
    • Veeam Explorer for Microsoft SharePoint
    • Veeam Explorer for Microsoft SQL Server
    • Veeam Explorer for Microsoft Teams
    • Veeam Explorer for Oracle
    • Which all depend on:
      • The Veeam Backup & Replication ISO
      • My Chocolatey ISO Mount extension, required to mount the ISO and execute the MSI installers inside of it
      • Veeam Backup & Replication Console

Same as before, replace install with upgrade in the Chocolatey command to upgrade to the latest version.

 

Veeam Agent for Windows (bonus)

 

Depending on your setup you might need the Veeam Agent for Windows installed on your servers.

choco install veeam-agent

There are two optional parameters that you can provide. For those, I would like to point to the package page: https://community.chocolatey.org/packages/veeam-agent


9 comments

Userlevel 7
Badge +8

Chocolatey is awesome. Great post Maurice. 👍

Userlevel 7
Badge +6

Amazing @mkevenaar, thanks for share!
it would be great to have a Chocolatey weekly column, or in this case, topic! 😎

Userlevel 7
Badge +8

Amazing @mkevenaar, thanks for share!
it would be great to have a Chocolatey weekly column, or in this case, topic! 😎

Maybe something like Kubernetes Korner and Cybersecurity spaces. 🤔😂

Userlevel 7
Badge +2

So at first I thought that using chocolatey was unnecessary, but then considering how often I end up installing Veeam for clients at times….maybe not so unnecessary……this may actually be very helpful and certainly forces me to think a bit outside of the box.  Thanks for sharing!

Userlevel 6
Badge +4

So at first I thought that using chocolatey was unnecessary, but then considering how often I end up installing Veeam for clients at times….maybe not so unnecessary……this may actually be very helpful and certainly forces me to think a bit outside of the box.  Thanks for sharing!

You are welcome. There are additional resources available on my blog, including even more automation! If you need any help, reply here or drop me a DM

Userlevel 7
Badge +8

So at first I thought that using chocolatey was unnecessary, but then considering how often I end up installing Veeam for clients at times….maybe not so unnecessary……this may actually be very helpful and certainly forces me to think a bit outside of the box.  Thanks for sharing!

You are welcome. There are additional resources available on my blog, including even more automation! If you need any help, reply here or drop me a DM

+1 for Maurice’s blog posts. 👍🏼

Userlevel 7
Badge +3

Great write up. I have never even heard of Chocolatey so I had to do a bit of research. This seems like a useful tool in our environment and I will have to test it out!

Userlevel 6
Badge +4

Great write up. I have never even heard of Chocolatey so I had to do a bit of research. This seems like a useful tool in our environment and I will have to test it out!

That’s great to hear! Let me know the results, if you want

Userlevel 7
Badge +3

Nice post, i  will add using ansible with Chocolotey.

https://docs.ansible.com/ansible/latest/collections/chocolatey/chocolatey/win_chocolatey_module.html

it’s the cherry on the chocolatey 😇

Comment