How to Backup Hyper-V Virtual Machines? | Windows OS Hub

Although the Hyper-V environment provides quite a set of technologies of senior high school handiness and demerit tolerance for running virtual machines ( such as failover clusters, Live Migration, reproduction, etc. ), an administrator must implement traditional ways to back up virtual machine instances. All these technologies can minimize the VMs downtime in respective scenarios, but do not provide any calamity recovery options due to human errors, hacker or virus attacks, rival attacks or similar circumstances. In this article I will try to review the basic requirements for Hyper-V backup solutions, backing strategies and the features of barren and commercial backup products .

You can backup virtual machines running on the Hyper-V host using the built-in Windows Server Backup features ( or wbadmin scripts based on it ), vitamin a well as other barren or commercial products. All of them are using snapshot ( checkpoint ) engineering to backup running Hyper-V VMs. A checkpoint is a state of a virtual machine at some point of time. The checkpoint stores the state of virtual disks, the contents of RAM, a well as the settings of a VM.

How Does the Hyper-V Virtual Machine Backup Work?

Let ’ s consider the operation scheme of any modern Hyper-V virtual car backing solution .
Note. previously, server accompaniment was performed by a stand-in agent installed on each host. In the virtualization era the backup creation point has moved from the node OS to the Hyper-V host, on which VMs are running. Currently, agent backup scenarios are rare, and are largely used for the particular apps that do not support VSS .
The stand-in joyride instructs the Hyper-V host to create a checkpoint. After receiving the command, the hypervisor creates some newfangled files ( delta files ) and the VM goes on working and starts saving changes in the files. nowadays the backup tool must copy the original VM files ( no changes are written to them ) to the backup media and then delete the checkpoint. When deleting the checkpoint, Hyper-V consolidates ( merges ) the original and delta files, in the interim the VM goes on working. If you lose the productive VM, you will be able to recover its department of state at the point of fourth dimension when the backup was created .

Hyper-V VM Backup Best Practices and Requirements

This is general data about the Hyper-V accompaniment, but actually, there are a short ton of nuances and issues. I will try to list the most common problems :

  1. The longer the backup tool is copying the checkpoint (backup), the more changes are logged in the delta files. If there are many changes in the VM while the checkpoint is being copied, merging files after deleting the checkpoint may high load the storage subsystem, the Hyper-V host, and the VM itself. It means that it is better to copy the checkpoint as quickly as possible. In Hyper-V Server 2016, the Resilient Changed Tracking (RCT) technology is used to make backup faster due to copying only the blocks of data changed since the last backup. Thus, you do not need to copy the VM as a whole.
  2. When copying the VM checkpoint data over LAN from the Hyper-V host to the backup storage, the network may be highly loaded. So it is better to use a separate server network or HBA interface for the backup traffic or copy the data over SAN.
  3. Based on the points described above, when using external data storage to store VM files, you can use the features of data storage integration with the backup product (such a hardware snapshots).
  4. Originally, the guest OS does not know that it is backed up. So when trying to restore a VM from that backup, the OS tries to continue its operation since the moment the checkpoint has been created. In some cases, it may result in some issues in the OS itself and losing data in the running apps (especially in transaction ones, like Exchange, SQL, ADDS, etc.). To solve this problem, a new checkpoint type — Production Checkpoints appeared in Hyper-V 2016. (Microsoft recommends using Standard Checkpoints only in test or laboratory environments or to backup stopped VMs.) enable Production Checkpoint in the Hyper-V VM settings The production checkpoints are working due to Hyper-V integration tools in the guest OS and are based on Volume Shadow Copy (Windows) or file system freezing daemon on Linux (fsfreeze). However, the state of the memory is not copied. It means that Hyper-V notifies the guest OS of creating a checkpoint, the app supporting VSS consolidation ends up the current transactions, goes into a consistent state and the VM checkpoint is created. When recovering from a checkpoint, the guest OS is powered off (since the memory state has not been saved), and after being turned on it thinks that an emergency shutdown has occurred. The app (if it supports VSS) starts working from the saved consistent state.
  5. To store virtual machine backups you need quite a lot of space. The more often you make checkpoints, the more place you need in the backup storage. Typically, you can use the Data Deduplication technology (integrated into Windows Server) or the deduplication solution from the backup provider. If you are using differential disks, choose the backup tool that supports this technology. Otherwise, you can store the same VM data several times.
  6. If the density of VMs on the host is high, it is worth to plan the backup time to prevent high load on the productive systems in the working hours.
  7. If you have to store multiple VM copies for several days, you will have to manage the number of the stored VM copies (you can automatize backup management using scripts or your backup tool features).
  8. Backup monitoring tools are also important. It would be frustrating to learn that you cannot back up something due to the lack of free space in the data storage. The backup verification tool is also recommended.
  9. Quite often you have to recover a certain file from a VM backup. Some backup/recovery products allow fine-grained recovery of files/folders without the need to restore the whole VM or its virtual disk. Note. besides, there are some tools that can recover particular postbox databases, mailboxes, and even the specific emails from a VM backup with Exchange installed ..
  10. You can split the access privileges with the role-based backup management model (it is relevant for administrators responsible for different system or device groups).
  11. Don’t forget about implementing the traditional backup strategy 3-2-1 (three copies on two different media with one of them being stored on a remote site). 3-2-1 backup strategy

next, we ’ ll consider some common solutions for Hyper-V VM accompaniment based on the features described above .

Backup Hyper-V VMs Using Windows Server Backup

A free way to organize VM accompaniment on Hyper-V suggests using the built-in Windows Server Backup feature. You can use WSB via the graphic backup/restore sorcerer or the wbadmin command-line instrument ( it is a separate of WSB ). Windows Server Backup supports VSS and incremental backup. This feature is available both on Windows Server 2012 ( and newer ) and on Hyper-V Server. To install WSB component, go to the Server Manager cabinet or run this command :
Install-WindowsFeature Windows-Server-Backup -IncludeManagementTools
install Windows Server Backup from server manager
Windows Server Backup has the GUI cabinet ( wbadmin.msc ) that allows to create and manage Hyper-V backups, create backup schedule, etc. To backup a VM, barely start a simple charming, choice which VMs from your Hyper-V waiter have to be backed up and where the backups are to be saved, and specify the backup schedule .
wbadmin.msc - select Hyper-V VM to backup
Tip. In Hyper-V Server versions before 2012 you could not create a backup of a one VM using the built-in stand-in cock – all VMs were backed up at once .
normally, it is easier to use the command prompt to backup a Hyper-V VM. furthermore, you can not create more than one VM stand-in task in the graphic interface, and the undertaking will overwrite all former backup tasks .
To back up a VM named “ Server 1 ” to a local folder on magnetic disk C : ( it is not the best estimate, is it ? ), just run this control :

wbadmin start backup –backupTarget:C: –hyperv:"Server 1"
hyper-v backup from cli: wbadmin start backup backupTarget
For example, to back up two VMs and save them to a net shared folder ( think, it is the external NAS memory ), it is enough to run the follow command :
wbadmin start backup -backuptarget:\\192.168.2.15\HVMback: -hyperv:"TestVM01,TestVM02" -allowDeleteOldBackups -quiet
You can add this command to the Windows Task Scheduler using PowerShell and thus schedule even VM accompaniment ( older backups will be removed in this font ) .
For example, to backup a VM with the AD world accountant, you can reset the AD transaction logs after the backing is over in order for the ADDS database in the accompaniment to be consistent ( in the same way you can back up a VM with Exchange or SQL Server ) :
wbadmin start backup -backuptarget:\\192.168.2.15\HVMback: -hyperv:PAR-DC1 -vssFull
To get the tilt of backups registered in the system, run this command :
wbadmin get versions
Tip. Please bill that when you backup a VM on the Hyper-V host running Windows 2012 or newer, the VM is not paused ( suspended ) if it has Hyper-V consolidation components installed .
WSB is a dim-witted, but authentic solution for Hyper-V VM accompaniment. It is quite fast and allows to manage the backup agenda. however, Windows Server Backup has its drawbacks :

  • There are no tools to monitor backup process, to verify the consistency of VM backups or apps in them.
  • It is hard to manage backup in medium and large Hyper-V installations (it is suitable only for small environments with 1-3 Hyper-V hosts).
  • You cannot automatically recover the specific file or the app state. (You will have to manually mount a .vhdx file of a backup and manually copy the file you need).
  • With high density and large sizes of VMs on a host, you will have to schedule backups using Windows Task Scheduler to prevent server overloads, as well as high load on LAN/SAN/iSCSI network during the business hours (if you store your backups on an external storage).

Top Third-Party Hyper-V Backup Products

It is impossible to use the Windows Server Backup if there are a batch of Hyper-V hosts and virtual machines. In this case you will have to choose one of the third-party solutions. You can not say for sure that this or that merchandise would be an ideal solution for Hyper-V backing since there are a lot of things to be considered. They include the numeral of hosts, licensing limitations, necessary features, network architecture, etc .
There are many commercial and rid accompaniment products in the market, and it is hard to choose the right one. normally, Gartner magic quadrant is used to determine the niche leaders. I have found this image that shows the independent players and leaders in the marketplace of backup solutions for data centers in 2019 .
Gartner magic quadrant: 2019 leader backup solutions for data centers
As you can see, Gartner names the succeed companies and products among the leading providers of accompaniment solutions :

  1. Commvault
  2. Dell EMC
  3. IBM
  4. Veeam
  5. Veritas Technologies (Symantec — Veritas Backup Exec)
  6. Actifio
  7. MIcroFocus (HPE Data Protector)
beginning : https://thefartiste.com
Category : Tech

About admin

I am the owner of the website thefartiste.com, my purpose is to bring all the most useful information to users.

Check Also

articlewriting1

Manage participants in a zoom meeting webinar

Call the people who attend the meet as follows Alternate host host Who scheduled the …

Leave a Reply

Your email address will not be published.