Everytime I receive a new version of Veeam Backup & Replication, with inside also a new Veeam Cloud Connect, I try to install it as soon as possible in my personal lab to test it. My lab is a bit complex, because it uses a dozen virtual machines, spread over multiple VLAN connected via a firewall that only allows the minimum amount of TCP/UDP ports; this is done on purpose to simulate as much as possible a real Veeam Cloud Connect installation, so that everything I test is good also for our Service Providers which I work with. This is a good thing, but it also means that each time there’s a new version of the software, especially Beta versions which don’t allow in-place upgrades, I need to uninstall and re-install everything.
This is an insanely boring and error-proned task, and because of this I recently automated almost the entire process. In this first post, I’ll show you how to add all the managed servers to the Console and install the base components.
The starting environment
Let’s start from the beginning. My lab is rebuilt many times indeed, but jumping from one version of the software to another one doesn’t change the underlying environment: domain controllers, VMware vSphere, even the different virtual machines are always the same. I “only” remove the old version of the software from every machine and I reinstall the new one. So, the starting point for me is this:
-
the virtual machines are up and running
-
they are all correctly connected to their own network
-
DNS is up and running, and every machine can resolve any other machine
-
firewall rules are in place to allow proper communications betweeen the different Veeam components
This is the scenario I work with, and these are the machine (domain suffix for every machine is cloudconnect.local), which you can also see in my Cloud Connect book:
vbr 10.10.51.40
em 10.10.51.41
wan1 10.10.110.11
wan2 10.10.110.12
lnxrepo 10.10.110.51
refs1 10.10.110.61
refs2 10.10.110.62
refs3 10.10.110.63
refs4 10.10.110.64
proxy1 10.10.110.101
proxy2 10.10.110.102
gtw1 10.10.111.98
gtw2 10.10.111.99
gtw3 10.10.111.100
gtw4 10.10.109.100
Veeam Server
I usually install it manually on the VBR machine, because I want to see if there’s anything new in the installation process; if this is the case, even a simple change in the user interface, I need to also update the corresponding part of the book. I also manually install Enterprise Manager in its dedicated virtual machine for the same reason. If you are insterested in automating the installation of the Veeam server, it can be easily done; you can follow the instruction available in the User Guide, and we also have some scripts available in our VeeamHub github repository.
Add all the servers
Once the base setup is ready, our Veeam console looks like a desert:
Time to add all those servers! Usually, one would go through the wizard. That’s fine, but with 13 servers to add, this can quickly become a cumbersome task: first I need to remember correctly all the DNS names of all the servers, and even with the list I copied above, I’d have to do a lot of copy/paste. Second problem, I need to create the login credentails for these servers, because at the beginning they are not there:
Then, once the credentials are stored, adding a new managed server is a time-consuming operation; Veeam console has first to connect to the server and verify if any component has been installed previously:
But the biggest limit is the actual deployment of the components:
The installation can take some minutes, and during this time the dialog box cannot be reduced or hidden in order to do other operations, so we are stuck in adding one server at the time. Now you totally understand why I wanted to automate this (and other) parts of the deployment.
Automatically add all the managed servers
First, we need to add the needed credentials. This can be done with these lines of powershell code:
### Windows Domain admin $DomainAdmin = Add-VBRCredentials -Type Windows -User Administrator@cloudconnect.local -Password "********" -Description "Windows Domain Admin" ### Windows Workgroup admin $LocalAdmin = Add-VBRCredentials -Type Windows -User GT1\Administrator -Password "********" -Description "Windows Local Admin" ### Linux repository admin $LinuxAdministrator = Add-VBRCredentials -Type Linux -User root -Password ********* -SshPort 22
We just created the three needed credentials: a Domain user account, a local admin account for those servers not joined to Active Directory (if they all have the same password like in my lab, otherwise you will simply repeat the same operation for each credential), and the root credentials for a Linux server I use as an additional repository. While they are created, they are also added to the overall script as variables, so that they can be used in other parts of the script. The credentials are immediately stored in the credential manager:
Now, it’s time to add all the servers. The whole script is this:
#set the environment
asnp “VeeamPSSnapIn” -ErrorAction SilentlyContinue
Connect-VBRServer -Server “vbr.cloudconnect.local” -User “Administrator” -Password “********“
# Add the needed credentials
### Windows Domain admin
$DomainAdmin = Add-VBRCredentials -Type Windows -User Administrator@cloudconnect.local -Password “********” -Description “Windows Domain Admin”
### Windows Workgroup admin
$LocalAdmin = Add-VBRCredentials -Type Windows -User GT1\Administrator -Password “********“ -Description “Windows Local Admin”
### Linux repository admin
$LinuxAdministrator = Add-VBRCredentials -Type Linux -User root -Password ******** -SshPort 22
### Add all the managed servers
Add-VBRWinServer -Name “em.cloudconnect.local” -Description “Enterprise Manager” -Credentials $DomainAdmin
Add-VBRWinServer -Name “wan1.cloudconnect.local” -Description “WAN Accelerator” -Credentials $DomainAdmin
Add-VBRWinServer -Name “wan2.cloudconnect.local” -Description “WAN Accelerator” -Credentials $DomainAdmin
Add-VBRWinServer -Name “refs1.cloudconnect.local” -Description “REFS Repository” -Credentials $DomainAdmin
Add-VBRWinServer -Name “refs2.cloudconnect.local” -Description “REFS Repository” -Credentials $DomainAdmin
Add-VBRWinServer -Name “refs3.cloudconnect.local” -Description “REFS Repository” -Credentials $DomainAdmin
Add-VBRWinServer -Name “refs4.cloudconnect.local” -Description “REFS Repository” -Credentials $DomainAdmin
Add-VBRWinServer -Name “proxy1.cloudconnect.local” -Description “Replica Proxy” -Credentials $DomainAdmin
Add-VBRWinServer -Name “proxy2.cloudconnect.local” -Description “Replica Proxy” -Credentials $DomainAdmin
Add-VBRWinServer -Name “gtw1.cloudconnect.local” -Description “Cloud Gateway – Internet” -Credentials $LocalAdmin
Add-VBRWinServer -Name “gtw2.cloudconnect.local” -Description “Cloud Gateway – Internet” -Credentials $LocalAdmin
Add-VBRWinServer -Name “gtw3.cloudconnect.local” -Description “Cloud Gateway – Internet” -Credentials $LocalAdmin
Add-VBRWinServer -Name “gtw4.cloudconnect.local” -Description “Cloud Gateway – MPLS” -Credentials $LocalAdmin
Add-VBRLinux -Name “lnxrepo.cloudconnect.local” -Description “Linux Repository” -Credentials $LinuxAdministrator
The script takes a while to complete, because even in Powershell servers are added sequentially, but at least now I only have to start this script and wait for it to complete. And once it’s done, the result is this:
All my managed servers are installed with just one click and ready to be used. In the next post, I’ll show you how to configure automatically each role on all the different machines.