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


Userlevel 7
Badge +14

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


10 comments

Userlevel 7
Badge +20

Chocolatey is awesome. Great post Maurice. 👍

Userlevel 7
Badge +13

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

Userlevel 7
Badge +20

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 +6

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 7
Badge +14

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 +20

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 +8

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 7
Badge +14

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 +8

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 😇

Hi,

i want to install the backup & replication server 11.0.1.1261 on my vm with windows server 2016 but i got errors and honestly i am very new in this area.

i got the error message below:

2023-05-08 06:56:04,959 5728 [ERROR] - Error while running 'C:\ProgramData\chocolatey\lib\veeam-backup-and-replication-server\tools\chocolateyinstall.ps1'.
See log for details.
2023-05-08 06:56:04,959 5728 [DEBUG] - Moving 'C:\ProgramData\chocolatey\lib\veeam-backup-and-replication-server'
to 'C:\ProgramData\chocolatey\lib-bad\veeam-backup-and-replication-server'
2023-05-08 06:56:06,975 5728 [DEBUG] - Attempting to delete file "C:\Users\Administrator\AppData\Local\NuGet\Cache\veeam-backup-and-replication-server.11.0.1.1261.nupkg".
2023-05-08 06:56:06,991 5728 [WARN ] -
Chocolatey installed 14/16 packages. 2 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2023-05-08 06:56:06,991 5728 [INFO ] -
2023-05-08 06:56:06,991 5728 [WARN ] - Installed:
2023-05-08 06:56:06,991 5728 [INFO ] - - kb2919355 v1.0.20160915
2023-05-08 06:56:06,991 5728 [INFO ] - - kb3033929 v1.0.5
2023-05-08 06:56:06,991 5728 [INFO ] - - kb2999226 v1.0.20181019
2023-05-08 06:56:06,991 5728 [INFO ] - - sql2014.smo v12.2.5000.0
2023-05-08 06:56:07,006 5728 [INFO ] - - sql2014.clrtypes v12.2.5000.0
2023-05-08 06:56:07,006 5728 [INFO ] - - ms-reportviewer2015 v12.0.2402.15
2023-05-08 06:56:07,006 5728 [INFO ] - - kb2919442 v1.0.20160915
2023-05-08 06:56:07,006 5728 [INFO ] - - netfx-4.7.2 v4.7.2.0
2023-05-08 06:56:07,006 5728 [INFO ] - - vcredist140 v14.34.31938
2023-05-08 06:56:07,006 5728 [INFO ] - - chocolatey-dotnetfx.extension v1.0.1
2023-05-08 06:56:07,006 5728 [INFO ] - - chocolatey-isomount.extension v1.0.1
2023-05-08 06:56:07,006 5728 [INFO ] - - dotnet4.7.2 v4.7.2.20210903
2023-05-08 06:56:07,022 5728 [INFO ] - - kb3035131 v1.0.3
2023-05-08 06:56:07,022 5728 [INFO ] - - chocolatey-windowsupdate.extension v1.0.5
2023-05-08 06:56:07,022 5728 [INFO ] -
2023-05-08 06:56:07,022 5728 [ERROR] - Failures
2023-05-08 06:56:07,022 5728 [ERROR] - - veeam-backup-and-replication-catalog (exited 1619) - Error while running 'C:\ProgramData\chocolatey\lib\veeam-backup-and-replication-catalog\tools\chocolateyinstall.
ps1'.
See log for details.
2023-05-08 06:56:07,022 5728 [ERROR] - - veeam-backup-and-replication-server (exited 1619) - Error while running 'C:\ProgramData\chocolatey\lib\veeam-backup-and-replication-server\tools\chocolateyinstall.ps
1'.
See log for details.
2023-05-08 06:56:07,022 5728 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
2023-05-08 06:56:07,069 5728 [DEBUG] - Exiting with 1619

 

Can anyone please help me?

Best regards

 

Massimo

Comment