Solved

Backup Hyper-V disk vs. vm


Userlevel 4

Hi, sorry for the noob question, but when backing up VM’s on Hyper-V, what is the difference between backing up the VM’s via Virtual Infrastructure vs. backing up the disk the VM files are stored on via Physical Infrastructure?  Is it just on recovery, it’s easier to restore the VM’s directly vs. having to restore each of the VM files such as the vhdx files?

Thanks!

icon

Best answer by regnor 4 December 2023, 09:10

View original

21 comments

Userlevel 7
Badge +17

When you back up a VM, you back up the data on the VM disks (i.e. the files) as well as the VM virtual disks. There is no separate job for each. Recoverability with Veeam allows you to recover individual guest OS files or if needed individual VM disks, or even the whole VM. Does that help? 

Userlevel 4

It does, thanks.  Does that mean I can recover the VM by doing either method?

Userlevel 7
Badge +17

What 2 methods? With Veeam, all you need to do is a VM backup. You have a choice of what to recover → whole VM, individual VM disks (for example, if any get corrupted), or individual guest OS files if all that’s needed to recover is a deleted/corrupted file. Is there another backup method you’re referring to other than using Veeam? 

Userlevel 7
Badge +20

What 2 methods? With Veeam, all you need to do is a VM backup. You have a choice of what to recover → whole VM, individual VM disks (for example, if any get corrupted), or individual guest OS files if all that’s needed to recover is a deleted/corrupted file. Is there another backup method you’re referring to other than using Veeam? 

I think the poster is referring to file backup jobs versus VM backup. So back up the flat files on the storage.  Both work just VM backup is much easier for recovery.

Userlevel 7
Badge +6

It does, thanks.  Does that mean I can recover the VM by doing either method?

It’s better to backup the entire VM, if you need to exclude disks for unnecessary big data, you can exclude disk from backup in backup job. Also, you can backup individual disk, however, you will need to create an empty VM to recover the individual disk. Because you cannot recover a VM from single virtual disk, because it doesn’t include the VM configuration file

Userlevel 4

Right, the two methods I had in mind are 1) back up the VM’s by identifying them under Virtual Infrastructure or 2) back up the volume that holds the VM files.

Other than 1) being perhaps easier to work with, does 2) also allow me to restore the VM by recovering the associated VM files that are stored on the Volume?

 

Userlevel 7
Badge +17

Ah gotcha. I don’t know what method you would use for the 2nd method? A Veeam file backup on Hyper-V? Or, an agent-based backup? Never heard of anyone doing that before, as far as installing the Windows Agent on Hyper-V? Or, doing a file backup of a particular Volume on Hyper-V? But, I guess it’s possible? My question is why would you? With the 1st method, you can do any kind of restore - whole VM image, VM disks, or files. If you were to do the 2nd method, I don’t think you could restore a whole VM...no.

Userlevel 4

This is in my home lab and so I’m using the Community Edition which has a 10 VM/Host limit.  I have the “preferred” backup the vm via Virtual Infrastructure method for my most important VM’s, but would also like to backup my other VM’s as well.  Investigating some more, it seems Veeam recommends one to use VeeamZIP for the VM’s above the 10 limit.  I’ll do more research on what that is.

Thanks.

Userlevel 7
Badge +17

Gotcha.

VeeamZIP is just a one-off Full backup. You don’t create a job to do it. Here’s some more info in the Guide about it. And here on how to run it. It’s a manual process.

Userlevel 4

Thanks you.  This is all new to me so appreciate the help.  Reading the links, there is an option for a crash consistent backup.  It sounds like that is an immediate snapshot of the vm.  Why would someone want this?  Is veeam able to restore the vm to exactly that point in time?  That would be very cool.  All my past experience has been I restore the vm files and then restart/boot the vm in which case, I don’t think I want the crash consistent type? 
 

when veeam restores a vm, does it restore it to that exact state?  Eg, already booted/running?

Userlevel 7
Badge +17

During restore, you can choose to power on the VM. The restore is the state of the VM at time of backup, but by default powered off after restore….again, unless you choose to power it on (most do this). Crash-consistent simply means non-VSS or non-OS quiesced based snapshot. In other words, if there’s data I/O disk writes occurring, there could be loss of data as the OS doesn’t stop data from being written as it does when using guest processing (VSS) or Hyper-V “guest tools” (can’t think off-hand what this is called in Hyper-V). A majority of my VM backups are this way (crash-consistent) as they don’t perform active disk I/O. I do have a good chunk that are snap-consistent, such as domain controllers and DBs. I use VMware Tools for this. 

Userlevel 4

Thank you…when one does a restore of a crash consistent backup and chooses to power on the vm, does that mean what was in memory at the time of the backup is also restored?  Just curious how a vm can be restored “on”.  Which then implies when the vm is backed up, the contents of memory is also backed up?  

Userlevel 7
Badge +17

Not necessarily. When you restore the VM & select the checkbox to power it on after restore, it's just like if it was powered off then you choose to 'turn it on'. I guess it's analogous to doing a hard shutdown not waiting for processes & apps to finish. Hope that helps. 

Userlevel 4

Thanks…in that case, what is the advantage of doing a crash consistent backup?  I would think making sure the disk and/or db the machine is running is backed up in a consistent state is important? 

Userlevel 7
Badge +17

You wouldn't do crash consistent for DB machines or anything that is highly transactional (domain controllers, etc) 

Userlevel 7
Badge +17

Some servers aren't highly transactional. They're fairly constant (web servers, for example) 

Userlevel 7
Badge +20

If you are doing things like DB servers or AD then you use application aware backups.

Userlevel 4

Thank you.  And so is the benefit of crash consistent just backup speed?  Since I’m thinking there’s no downside of doing application aware backups on vms with little or no disk i/o?

Userlevel 7
Badge +14

It’s not a performance related decision as, besides some overhead, performance will be the same. In general you would want to get as much backup consistency as possible; application-consistent > file-consistent > crash-consistent. There might be reasons for crash-consistent backups, like limited permissions, lack of application support or the guest OS doesn’t support it (like Linux). Also some VMs might be very static and don’t require more then crash-consistent backups. But for all other cases, go with application aware processing if you’re able to.

Regarding your initial questions. I wouldn’t try to directly backup the VHD(x)s on filelevel of the Hyper-V itself. The disks are in use and neither Hyper-V nor the VMs will be aware of the backup. So, you might end up with corrupted/unusable backups.

Userlevel 4

Thank you.  Thanks for the explanation.  Sounds like VeeamZip is the answer.

Userlevel 7
Badge +17

Your best bet...yes 

Comment