Cisco HyperFlex™ is part of a complete data center strategy that uses hyperconvergence architecture models to solve basic business challenges of data optimization, operational efficiency, and adaptability. Because it is built on the Cisco UCS® platform, it allows unified network management using skillsets that are already present in the organization. It is scalable, adaptable, and completely hyperconverged – providing the three layers of Network, Compute & Storage intelligently integrated into a single solution for faster application deployment.
Veeam Backup & Replication can be deployed and configured with backup server, proxy and repositories on Cisco UCS. Veeam orchestrates jobs to create backups and/or replicas for the provisioning of immediate data-protection. Manage all your backups and data from a single console with one solution that backs up your data, no matter where it is. Achieve all your data protection SLAs while reducing costs.
Veeam software can be downloaded for free from https://www.veeam.com/downloads.html. For this lab, Veeam Availability Suite, which includes Veeam Backup & Replication and Veeam ONE, has been downloaded
The Cisco HyperFlex 4.0 with Veeam Availability Suite Lab v1 is designed to take the lab user through the following scenarios
The Lab is available at these dCloud locations
The Lab user guide details the each of these operations. Specifying the steps the user must take to complete each scenario.
Almost all of the steps can be completed programmatically using the Veeam PowerShell extension and VMware PowerCli. Where a step can be completed with the PowerShell a script has been added to this repository for scenarios 1 and 2.
The Veem PowerShell extension is documented here. All the PowerShell scripts in the repository that interact with Veeam are using Cmdlets from the Veeam extension.
This repository is separated into scenarios to match with the methodology in the dCloud lab guide. To be able to utilize the Veeam PowerShell extension it needs to be enabled in a PowerShell environment.
Scripts for the scenarios have been created for scenario 1 and scenario 2 and reside in their respective directories.
Scenarios 3, 4, & 5 tasks are shown in this document using the Veeam and VMware PowerCli Cmdlets directly.
Note: The code and actions in this repository pick up after the Veeam installation steps at the sections titled Add Managed Servers
The Veeam PowerShell Extension is installed as part of the Veeam Availability Suite. Use the Add-PSSnapin PowerShell Cmdlet to load the Veeam PowerShell Cmdlets.
vb2
desktopRight-Click on Windows PowerShell
Click on More
Click on Run as administrator
At the PowerShell Prompt type,
Add-PSSnapin VeeamPSSnapin
To use the scripts in the dCloud environment, download them from Github.
Download the Github repository from here
Unzip the repository
Downloaded scripts will typically throw an error when running them, set the script execution policy on the dCloud vb2
desktop
At the prompt type,
Set-ExecutionPolicy -ExecutionPolicy Bypass
The purpose of this scenario is to allow Veeam Backup & Replication gain visibility into the virtual infrastructure.
Steps 1 through 10 - Add a vCenter server to Veeam. This can be accomplished by using the Add-VeeamVCServer.ps1
script.
Add-VeeamVCServer.ps1 -vCenterServer vc1.dcloud.cisco.com -vCenterUser dcloud\demouser -vCenterPassword C1sco12345
Step 11 - Inventory View in Veeam. An inventory view similar to the one shown in the GUI can be achieved by using the Get-VeeamInventory.ps1
Get-VeeamInventory.ps1 -PathFilter "*HX-DC-B*"
Additional Scripts have been provided to view Veeam server information and to remove the vCenter Server from Veeam. Look at the example in the code file to see an example of how the script can be run.
Get Veeam Server Information - Get-VeeamServerInfo.ps1
will display information about the Veeam Server.
Remove vCenter Server from Veeam - Remove-VeeamVCServer.ps1
removes the vCenter server supplied on the command line. The command below will remove the vCenter server that was added in steps 6 through 13. If you try the script, be sure to re-add the vCenter server when you continue the lab.
Remove-VeeamVCServer.ps1 -vCenterServer vc1.dcloud.cisco.com
The purpose of this scenario is to add the HyperFlex storage platform to Veeam Backup & Replication, which will allow the HyperFlex native snapshot integration for faster backups.
These scripts are located in the directory scenario-2
Backup proxies with multi-core CPUs can handle more concurrent tasks. For example, for a 4-core CPU, it is recommended to specify a maximum of 4 concurrent tasks minus two (for operating systems functions), for an 8-core CPU — 8 concurrent tasks minus two. When defining the number of concurrent tasks, keep in mind network traffic throughput in your virtual infrastructure.
Steps 1 through 10 - Modify VMware Backup Proxy. This can be accomplished by using the Set-VeeamVcenterBackupProxy.ps1
script.
Set-VeeamVcenterBackupProxy.ps1 -ProxyName "VMware Backup Proxy" -TransportMode DirectStorageAccess -ConnectedDatastoreMode Manual -DatastoreName hx-b-ds1 -EnableFailoverToNBD:$false -EnableHostToProxyEncryption:$false -MaxTasks 4
An additional script, Get-VeeamVcenterBackupProxy.ps1
is available to validate that the vCenter Backup Proxy was modified.
A Veeam Repository is a location where the backup files will be stored. It can be on a Windows server (with attached storage), a Linux server running NFS, a CIFS/SMB share, or an integrated deduplication appliance.
Steps 11 through 17 - Add a Veeam Repository. This can be accomplished by using the Set-VeeamVcenterBackupRepository.ps1
script.
Since the Veeam Cmdlet to add the backup repository does not create and output an additional script, Get-VeeamVcenterBackupRepository.ps1
is available to validate that the vCenter Backup Repository was added.
HyperFlex snapshot integration – unique to Veeam Backup & Replication – allows backup jobs to take advantage of native HX snapshots, providing faster backups with almost no impact on the production environment. This allows you to take backups much more frequently than conventional storage systems and dramatically improve the RPO (Recovery Point Objectives) of the application.
This script requires the VMware PowerCli PowerShell
modules to be installed and imported.
Run the Cmdlet Install-Module -Name VMware.PowerCli
Answer "y" to "Do you want PowerShellGet to install and import the NuGet provider now?"
Answer "y" to "Are you sure you want to install the modules from 'PSGallery'?"
Run the Cmdlet Import-Module -Name VMware.PowerCli
The VMware PowerCli modules are now installed and imported. Installtion is only required one time, however each time a PowerShell session is started the modules must be imported. This is similar to the process of adding the Veeam extension.
The IO Visor is a Cisco HyperFlex software module that runs on every ESXi host that is part of the Cisco HyperFlex cluster. It presents HyperFlex NFS datastores to the ESXi hosts and optimizes the data paths in the HyperFlex cluster. Backup over IO Visor is the preferred method as it provides the high speed of VM data reading and balances the load across the HyperFlex cluster. Access to the IO Visor from Veeam Backup & Replication requires a change in the firewall rules on each ESXi host or node on the HyperFlex cluster. This is accomplished by enabling NFSAccess.
Steps 1 through 9 - Configure NFSAccess Firewall Rules. This can be accomplished by using the Set-VMHostFirewall.ps1
script.
Set-VMHostFirewall.ps1 -vCenterServer vc1.dcloud.cisco.com -vCenterUser dcloud\demouser -vCenterPassword C1sco12345 -VMhost "hx-b-*" -Rule NFSAccess -Enabled
As the time this collection of scripts was created Veeam did not provide a Cmdlet to add HX Data Platform Storage to Veeam.
Please follow the steps in the dCloud user guide, this repository will be updated when the Veeam Cmdlet is available.
In the previous scenarios PowerShell scripts were written around the Veeam PowerShell Cmdlets. For scenario 3 just the Veeam Cmdlets are utilized without and supporting PowerShell scripts.
Important: Because the scripts in Scenarios 1 and 2 interact with the Veeam server the have statements for adding and removing the VeeamPSSnapin. For the this scenario and the remaining scenarios you will need to Add the VeeamPSSnapin and Connect to the Veeam Server.
Add-PSSnapin VeeamPSSnapin
Connect-VBRServer
Get-VBRServer -type Local | Import-VBRBackup -FileName 'R:\veeam backup jobs\AD1 & SQL1 Agent backup job - ad1\AD1 & SQL1 Agent backup job - ad1.vbm'
Get-VBRServer -type Local | Import-VBRBackup -FileName 'R:\veeam backup jobs\AD1 & SQL1 Agent backup job - sql1\AD1 & SQL1 Agent backup job - sql1.vbm'
Steps 1 through 11
Find-VBRViEntity
Get-VBRBackupRepository
Add-VBRViBackupJob
Get-VBRJob / Set-VBRJobSchedule / Enable-VBRJobSchedule
Get-VBRJob / Start-VBRJob
$vms_to_backup = Find-VBRViEntity -Name myVM-B*
$backup_repository = Get-VBRBackupRepository -Name "Default Backup Repository"
Add-VBRViBackupJob -Entity $vms_to_backup -BackupRepository $backup_repository
Get-VBRJob -Name "Backup Job 1" | Set-VBRJobSchedule -Daily -At "23:00" -DailyKind Everyday | Enable-VBRJobSchedule
Get-VBRJob -Name "Backup Job 1" | Start-VBRJob -RunAsync
Instant VM Recovery allows users to spin up a VM directly from a backup file, and provides the fastest RTO (Recovery Time Objective), usually within a few minutes.
Steps 1 through 11 - Perform InstantRecovery
Get-VBRBackup / Get-VBRRestorePoint
Get-VBRServer
Start-VBRInstantRecovery
$restore_point = Get-VBRBackup -Name "Backup Job 1" | Get-VBRRestorePoint -Name myVM-b1 | Sort-Object $_.creationtime -Descending | Select -First 1
$restore_server = Get-VBRServer -Name hx-b-4.dcloud.cisco.com
Start-VBRInstantRecovery -RestorePoint $restore_point -Server $restore_server -VMName myVM-B1_restored -Reason "For demonstration purposes" -RunAsync
Step 13 - View VM in vCenter
Import-Module -Name VMware.PowerCli
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
Connect-VIServer -Server vc1.dcloud.cisco.com -User dcloud\demouser -Password C1sco12345
Get-VM -Name myVM-B1_restored
The results should be similar to this
PS C:\Users\administrator.DCLOUD\Desktop\scenario-1> Get-VM -Name myVM-B1_restored
Name PowerState Num CPUs MemoryGB
---- ---------- -------- --------
myVM-B1_restored PoweredOff 1 0.500
Step 16 - Stop Publishing
Get-VBRInstantRecovery | ?{$_.VMName -eq "myVM-B1_restored"} | Stop-VBRInstantRecovery -RunAsync
If you were to view the VM again in vCenter an error message would be returned.
PS C:\Users\administrator.DCLOUD\Desktop\scenario-1> Get-VM -Name myVM-B1_restored
Get-VM : 1/22/2020 9:14:05 AM Get-VM VM with name 'myVM-B1_restored' was not found using the specified filter(s).
At line:1 char:1
+ Get-VM -Name myVM-B1_restored
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Get-VM], VimException
+ FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM
Veeam Backup & Replication also provides granular recovery of a file or group of files from a backed up VM.
Steps 1 through 17 - File Level Recovery
Get-VBRBackup / Get-VBRRestorePoint
Start-VBRWindowsFileRestore
Get-VBRCredentials
Get-VBRRestoreSession
Start-VBRWindowsGuestItemRestore
Stop-VBRWindowsFileRestore
$restore_point = Get-VBRBackup | Get-VBRRestorePoint -Name sql1 | Sort-Object $_.creationtime -Descending | Select -First 1
$restore_start = Start-VBRWindowsFileRestore -RestorePoint $restore_point -Reason "For demonstration purposes"
$restore_credentials = @(Get-VBRCredentials -Name "dcloud\demouser")
$restore_session = Get-VBRRestoreSession | ?{$_.state -eq "Working" -and $Id -eq $restore_start.MountSession.RestoreSessionInfo.Uid}
Start-VBRWindowsGuestItemRestore -Path "C:\Software\" -Session $restore_session -RestorePolicy Overwrite -GuestCredentials $restore_credentials[0]
Stop-VBRWindowsFileRestore $restore_start
The purpose of this scenario is to create a replication job, replicate important VMs to a recovery site, create a failover plan, and test out the failover process. This scenario replicates VMs from one HyperFlex cluster (hx-cluster-b) to the second HyperFlex cluster (hx-cluster-a), simulating a local replication scenario.
Steps 1 through 17 - Create a Replication Job
Find-VBRViEntity
Find-VBRViEntity
Get-VBRViProxy
Add-VBRViReplicaJob
Get-VBRJob / Set-VBRJobSchedule / Enable-VBRJobSchedule
Get-VBRJob / Start-VBRJob
$replica_dest_cluster = Find-VBRViEntity -Name hx-cluster-a
$replica_source_vm = Find-VBRViEntity -Name myVM-B2
$backup_proxy = Get-VBRViProxy -Name "VMware Backup Proxy"
Add-VBRViReplicaJob -Name "Replication Job 1" -Server $replica_dest_cluster -Entity $replica_source_vm -Suffix "_replicated" -SourceProxy $backup_proxy -TargetProxy $backup_proxy
Get-VBRJob -Name "Replication Job 1" | Set-VBRJobSchedule -Daily -At "22:00" -DailyKind Everyday | Enable-VBRJobSchedule
Get-VBRJob -Name "Replication Job 1" | Start-VBRJob -RunAsync
Owner
Contributors
Categories
Products
UCSProgramming Languages
PowerShellLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community