Complete backup Hyper-V host and guests VM: must I start the guest prior to run the backup?


Author
Message
Sandro SILVESTRE
Sandro SILVESTRE
New Member
New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)
Group: Forum Members
Posts: 10, Visits: 66
Hi everyone!

I have a computer running Windows 10 with Hyper-V support (the 'host") with a Virtual Machine (VM) with the same version of Windows 10 ("the guest").

Some background info:
B1\ The host and the guest are somehow interconnected via an External Virtual Switch.
B2\ Macrium is installed only on the host. To make it clear, there is absolutely no Macrium component installed on the guest - but I could do it if it is recommended or needed for optimization.
B3\ The guest can be started / shutdown anytime. It is meant for development only.
B4\ All VM files are stored on the ubiquitous C:\ disk where the host is also installed.
B5\ Macrium Changed Blocked Tracked (CBT) is installed on the host and is turned on.

My question:
Concerning the final size of the backup image employing e.g., the scheme Incremental Forever (with Synthetic enable), does it make any difference to have the guest running by the time the backup is launched on the host?

Some notes:
N1\ The VSS logs (from Macrium and Windows Event Viewer) reports no problem at all on either case i.e., guest running or not during backup.
N2\ My concerns are dependability and sheer backup image size (the smaller the better).
N3\ I am not concerned about the overall time it takes to perform the backup on either case.

My experience:
E1\ Based on my very own empirical observations, the backup size was slightly larger with the guest running. Nevertheless, it might be related to the automatic checkpointing. There was no checkpoint when the guest was off. Therefore, I would guess that it does not make any real difference to have the guest running or not during backup on my aforementioned conditions.



Thanks for your attention!

Sandro




jphughan
jphughan
Macrium Evangelist
Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)
Group: Forum Members
Posts: 9.1K, Visits: 61K
You might want to take a look at my posts in this thread.  It addresses some of the questions you've asked and also addresses some considerations around restoring guest VM data from host-level backups.  But there's certainly no requirement to start the guest VMs before backing up the host, in fact it's easier if they're NOT running.  But if the guests are running Windows, then Hyper-V has some cool functionality to allow even running guest VMs to be backed up safely within a host backup, which is handy for scenarios where shutting down the guests to back up the host may not be practical.

I wouldn't expect much difference in the resulting size of the backup either way, though.  At a host level, you will still be backing up a guest's VHDX file either way, and even completely deleting data within a guest VM does not automatically reduce the size of its underlying VHDX file.  You have to manually "compact" it at the host for that.  So I wouldn't expect the state of the VM to make any difference, except perhaps in relation to the automatic checkpoint if you have that option enabled.  And none of this would be any different based on whether or not you're using Synthetic Fulls.  Hopefully you find that linked thread helpful! Smile

Edited 3 March 2021 10:21 PM by jphughan
Sandro SILVESTRE
Sandro SILVESTRE
New Member
New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)
Group: Forum Members
Posts: 10, Visits: 66
Hi 
@jphughan!


Thanks for your answer!

To tell you the truth, it was your answer on that thread which made me start this conversation! It was not clear to me if the guests had to be running or not. In fact, I regret not adding my question to that instead of creation a new thread.

Everything is clear now Smile

Again, thank you!

Beardy
Beardy
Proficient Member
Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)
Group: Forum Members
Posts: 299, Visits: 1.2K
For a good restore of a VM … "Perfect world" guest OS is shut down, 2nd best guest is paused, claimed by Microsoft, guest is running, so long as the appropriate option in Hyper V is enabled for the Windows VM in question:



(Assumingif their VSS writer & extension have no bugs) when a snapshot gets created, else, your guess is as good as mine for the integrity of the restored VM.
jphughan
jphughan
Macrium Evangelist
Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)
Group: Forum Members
Posts: 9.1K, Visits: 61K
To my knowledge, a guest VM volume snapshot can't occur if the VM is paused, since the guest has to be able to operate in order to perform its own volume snapshot.  Where are you seeing that Microsoft says that a paused VM is the second best option?  The reason I doubt this is that more recent versions of Hyper-V include two types of checkpoints: standard and "production-ready".  The former captures the memory state of the VM, which is essentially what you'd get if you backed up a paused VM.  The latter involves collaboration with the running guest to perform a VSS snapshot.  And as their names imply, Microsoft considers the latter to be superior, to the point that it is possible to disable the option to fall back to standard checkpoints if a production snapshot cannot be completed.

Edited 4 March 2021 2:33 AM by jphughan
Beardy
Beardy
Proficient Member
Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)
Group: Forum Members
Posts: 299, Visits: 1.2K
A paused VM is also not writing to its disk, so a backup thereof is "crash consistent", less than ideal, but way better than an inconsistent disk, though suspended would be better than paused, since that's effectively hibernated, just with the memory saved externally rather than in the hibernation file.  Suspending & checkpointing are functionally equivalent right up to the moment one halts the VM & the other lets it continue execution.

Microsoft considers production snapshots "better marketing", saves their customers complaining that execution of a production VM gets significantly disrupted on backup, which mechanism produces more reliable backups is something you could debate, either gets you a consistent image & it's down to the relative reliability of creating checkpoints vs VSS inside a running VM.

A shut down VM is the one where least can go wrong backing it up, at that point it's backing up closed files like any other static files, no checkpoints needed, no VSS inside the VM involved to potentially fail, no integration services needed. It's the equivalent of backing up a physical machine using rescue, except you save the hardware & firmware configuration as well.

jphughan
jphughan
Macrium Evangelist
Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)
Group: Forum Members
Posts: 9.1K, Visits: 61K
So you don't have a citation for this Microsoft claim you mentioned that says that a paused VM is the second best option behind a powered off VM then?

Hyper-V won't back up an inconsistent disk. If the VSS writer can't leverage the guest integration backup service for whatever reason, it falls back to the method you're describing.

A production checkpoint that relies on the guest integration backup service is functionally equivalent to using Reflect to back up a running host, since both scenarios involve a VSS snapshot, which is a mechanism expressly supported by Microsoft and some third parties.  A crash-consistent backup of a suspended VM is expressly NOT supported as a backup solution, and in fact those can be liabilities depending on the exact activity that was occurring when you froze that VM in time and then try to return it to that moment later.  VMs don't always exist in a vacuum, after all.

I agree that backing up a VM that is shut down is the most straightforward and reliable mechanism.

Edited 4 March 2021 2:33 PM by jphughan
Beardy
Beardy
Proficient Member
Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)
Group: Forum Members
Posts: 299, Visits: 1.2K
My earlier post mentioning Microsoft was intended to point out their claim to support backing up a running machine, I may have phrased it poorly.. No idea why you'd need a citation for that you're saying it yourself.
jphughan
jphughan
Macrium Evangelist
Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)Macrium Evangelist (13K reputation)
Group: Forum Members
Posts: 9.1K, Visits: 61K
I have found nothing to substantiate your assertion that Microsoft claims that backing up a paused VM is the second best option behind backing up a VM that is shut down.  Having a VM in a paused state would preclude the ability to create a production checkpoint, which for backup purposes is typically superior to a standard checkpoint, and would also preclude the use of the very integration service you highlighted in the post where you claimed that paused VMs were the second best option.  And the Hyper-V VSS Writer itself first attempts to collaborate with the guest to perform a VSS snapshot BEFORE falling back to making a crash-consistent snapshot that you would get if the VM were paused.  So I would argue that both Microsoft's design of their own Hyper-V VSS Writer and their guidance and naming of the two checkpoint mechanisms suggests that they consider backups of paused VMs to be LESS optimal than backups of VMs that are running and therefore able to perform a VSS snapshot.

Beardy
Beardy
Proficient Member
Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)Proficient Member (363 reputation)
Group: Forum Members
Posts: 299, Visits: 1.2K
That'll be because it's an unsubstantiated claim, & on sober reflection it'd actually be at least the 4th or 5th choice, somewhere after better options.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Login

Explore
Messages
Mentions
Search