Connecting to Veeam Backup & Replication

The Veeam integration is used by vScope to discover your Veeam installation. vScope utilizes the SQL server required by Veeam for retrieving information. By default, Veeam comes bundled with SQL Server Express so this database instance is the target for vScope.

Basic Setup

It is very convenient setting up discovery of Veeam in vScope, you can add it directly in the Discovery Manager under the tab Credentials:

Username

Required. Use the domain account or SQL server login used to access the database. This should have been specified during the Veeam setup. If in doubt, attempt to use a service account with sufficent reading rights here.

Password

Required. The password used in conjunction with your username to log into Veeam server. Should not be left empty.

Target

The SQL host machine.

Port

If you have the SQL browser service enabled (disabled by default for SQL Express) vScope will automatically find the correct port on the Veeam host machine.

If you want to configure the port manually this can be done under Credentials -> Veeam -> “Advanced” in Discovery Manager. Notice that this port needs to be the port pointing at the Veeam SQL instance.

Not working?

If you are experiencing problems adding Veeam to vScope you might need to do some troubleshooting. The most common issue is that you don’t have the SQL browser service enabled. This can be done by following the following article:

Discovery of SQL Express & instances running on dynamic ports.

or by following this tutorial from Microsoft Technet.

If it is still not working, please follow the more advanced setup below.

Advanced Setup

Port

The port for the Veeam SQL instance. For information on how to find which port the instance is listening on you can use vScope by building the following table:

Locate connection details

In order to make sure that vScope is able to connect to the Veeam SQL instance we need to follow some steps:

  1. Find out the name of the Veeam SQL instance
  2. Assert that the Veeam SQL instance is listening on TCP/IP
  3. Assert that the Veeam SQL instance is accepting remote connections
  4. Assert that the firewall allows remote connections on the SQL instance port

Find out the name of the Veeam SQL instance

Open regedit on the Veeam server and find the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\VeeaM\Veeam Backup and Replication\SqlInstanceName

In this case, our instance name is VEEAMSQL2012.

Assert that the Veeam SQL Instance is listening on TCP/IP

Open the SQL Server Configuration Manager on the Veeam Server. Expand SQL Server Configuration Manager -> SQL Server Network Configuration -> Protocols for VEEAMSQL2012. Make sure that TCP/IP is enabled. If it is not, right click and choose Enable.

Assert that the Veeam SQL instance is listening for remote connections

Open the SQL Server Configuration Manager on the Veeam Server. Expand SQL Server Configuration Manager -> SQL Server Network Configuration -> Protocols for VEEAMSQL2012 and then right click TCP/IP and select Properties.

Select the IP Addresses tab and scroll down to the IPAll section. The value for TCP Dynamic Ports is the port that the VEEAMSQL2012 instance is listening on. In our case this is 49845.

IPAll means that port 49845 is listening on all interfaces which is needed to access the SQL instance from a remote machine. Make sure the port is not set to 0 which means that the can change every time the SQL instance is restarted.

Assert that the firewall allows remote connections on the SQL instance port

The port we found earlier (49845) must be opened in the firewall on the machine running the Veeam SQL instance.

Open Windows Firewall with Advanced Security on the Veeam server.

  • Right click Inbound Rules and select New Rule.
  • Select Port and click Next.
  • Select TCP and Specific local ports. Enter the port here (in our case 49845).
  • Click Next
  • Select Allow the connection. Click Next.
  • Select which network profiles the rule should apply on. I suggest you select Private, Domain and Public. Click Next.
  • Select a name for the new rule and click Finish.

The rule should now appear in the list of rules.

If you have any other firewall in the path between vScope and the Veeam SQL instance, make sure that the same port it not blocked.

Finally, add Veeam in Discovery Manager

Add a Veeam credential in  Discovery Manager. Notice that you can configure what port to use under ‘Advanced’:

These are the SQL queries vScope uses for Veeam

Table nameSQL Query
SELECT @@SERVERNAME
VeeamBackup.dbo.HostComponentsSELECT *
[VeeamBackup].[dbo].[Backup.Model.Backups]SELECT *, id as current_backup_id WHERE job_id NOT LIKE 'NULL'
[VeeamBackup].[dbo].[BJobs]SELECT *
VeeamBackup.dbo.[Backup.Model.JobSessions]SELECT *
VeeamBackup.dbo.[Backup.Model.BackupTaskSessions]SELECT *
VeeamBackup.dbo.ObjectsInJobsSELECT *
VeeamBackup.dbo.HostsSELECT *
VeeamBackup.dbo.BObjectsSELECT *
VeeamBackup.dbo.[Backup.Model.OIBs]SELECT *
VeeamBackup.dbo.[Backup.Model.Storages]SELECT *
VeeamBackup.dbo.optionsSELECT *
VeeamBackup.dbo.BackupRepositoriesSELECT *
VeeamBackup.dbo.PhysicalHostsSELECT *
VeeamBackup.dbo.BObjectsSensitiveInfoSELECT *
VeeamBackup.dbo.[Backup.Model.OIBsSensitiveInfo]"SELECT *

Leave a Reply