kantver - Fotolia
System Center Virtual Machine Manager is a great product for managing every aspect of a virtual infrastructure. In addition to managing Hyper-V hosts, SCVMM also includes support for managing Citrix XenServers and VMware hosts. You might have already created a backup plan for your SCVMM infrastructure, but this article provides you with a list of the most critical items to include.
As we know, SCVMM uses the SQL Server Database to store its configuration information. You can have SQL Server running on the same computer or a separate one. Backing up the SQL Server Database is one of the most important items in a SCVMM backup plan. If the SQL Server doesn't respond or if the SCVMM database is corrupted, you won't be able to open the SCVMM console. There are two ways to back up the SCVMM database: by using SCVMM Console or by using SCVMM PowerShell. To backup via the SCVMM console, click on the Settings pane on the Home tab, then click the Backup action item. SCVMM will create a job in the background. You can see the status of the job in the SCVMM Job Window. In case you wish to backup using PowerShell, use Backup-SCVMMServer PowerShell cmdlet that's available on the SCVMM Server computer. For example, to initiate backup for SCVMM database, execute the commands below:
Backup-SCVMMServer –VMServer "ProdVMM1.TechTarget.Com" "Path "E:\Backups\VMM\"
Backup-SCVMMServer –VMServer "ProdVMM1.TechTarget.Com" "Path "\\FileServer1\Backups\VMM\"
Note that the first command initiates the SCVMM database backup on a drive mounted locally on the SCVMM Server, and the second command can be used if you wish to store the backup copy of the SCVMM database on a remote location. When backing up the SCVMM database to a remote location, it's important that the SQL Server Service has write access to the folder where the SCVMM backup files will be stored.
Back up SCVMM Server OS
It's recommended that you use the Windows Server Backup tool or production backup methods that you have deployed in your environment to back up the system state backup of SCVMM Server OS. Although it's not necessary to take a system state backup of Windows OS when the SCVMM Server is installed, if you do so, you'll have the ability to restore the server with the same security identifiers that SCVMM uses when communicating with managed virtualized hosts in the event of a disaster.
Back up library servers
It's important to understand that SCVMM doesn't provide a standard mechanism to back up library servers. In a large production environment, you will have multiple SCVMM library servers running on dedicated computers. Although backing up your SCVMM database will take care of backing up most of the library items, such as templates and SCVMM profiles, library servers that hold file data, such as virtual hard disks, Hyper-V virtual hard disks, VMware configuration files, VM configuration files and International Organization for Standardization files, aren't backed up as part of the SCVMM database process. To get a list of library servers managed by the SCVMM, use Get-LibraryServer PowerShell cmdlet as shown in the command below:
$AllLibraryServers = Get-VMMServer ProdVMM1.TechTarget.Com | Get-LibraryServer
Once you have identified the library servers, use production backup methods to back up library servers. It's also recommended to take system state backup of library servers in order to back up file share information from the registry.
Export SCVMM configuration to CSV files
As long as you have included backing up SCVMM database, SCVMM Server Operating System and Library Server in your SCVMM backup plan, you should be able to restore a SCVMM environment when disaster strikes, but in addition to the above items, it's recommended that you export vital configuration information from the SCVMM Server using various PowerShell cmdlets that ship with SCVMM Server as listed below:
- Export SCVMM Library Share information: To export library shares created in SCVMM to a CSV file, use Get-SCLibraryShare PowerShell cmdlet. For example, command "Get-SCLibraryShare –VMServer "ProdVMM1.TechTarget.Com" | Export-CSV E:\Backups\VMM\LibraryShares.CSV" can be used to export Library Share information.
- Export SCVMM Templates: You can use Get-SCVMTemplate PowerShell cmdlet to export SCVMM templates created in SCVMM to a CSV file. For example, command "Get-SCVMTemplate –VMServer "ProdVMM1.TechTarget.Com" | Export-CSV "E:\Backups\VMM\VMMTemplates.CSV" can be used to export SCVMM templates from SCVMM Server.
- Export SCVMM Service Templates: Apart from exporting SCVMM Templates, you must also consider exporting SCVMM Service Templates. Service Templates are used to deploy a group of VMs. Fortunately, SCVMM provides a way to export Service Templates using Export-SCTemplate PowerShell cmdlet, which, in turn, exports every detail about a Service Template. You can also export SCVMM Service Templates by clicking the Export action found on the Right Click context menu of a Service Template, but exporting multiple Service Templates manually might take a considerable amount of time.
To export all Service Templates using Export-SCTemplate PowerShell cmdlet, use below PowerShell script:
$AllSCTemplates = Get-SCServiceTemplate –Name *
ForEach ($Item in $AllSCTemplates)
Export-SCTemplate –ServiceTemplate $Item –Path E:\Backups\VMM\ServiceTemplates\$Item
There are other items you should consider when creating a backup plan for SCVMM environment, such as backing up virtualization hosts, VMs deployed on the virtualization hosts, VM VHD and VHDX files and VM configuration files.
Set roles and permissions in SCVMM and vCenter
Familarize yourself with SCVMM 2016's new features
Prioritze your VMs with SCVMM