Backup Planning
When    virtualization  is  used    in  an  environment,    there   is  often   a   decision    to  be  made    as
to  whether backups will    be  taken   from    the virtualization  host    of  the virtual machines,
or  backup  agents  should  still   run within  the virtual machines    and backups will    be
taken   from    inside  the virtual machines.   There   is  no  “right” answer  to  which   is  the best
approach,   but what    is  running inside  the virtual machines    and where   you take    the
backup  can have    a   big impact  on  the granularity of  any restore operations  that    are
performed.
Windows Server  has long    standardized    on  the Volume  Shadow  Copy    Service (VSS),
which   provides    facilities  that    allow   application vendors to  write   special VSS writers.
These   application-specific    modules,    which   are used    to  ensure  that    application data    is
ready   for backup, are registered  with    the operating   system  on  which   the application is
installed.  All VSS writers registered  on  an  operating   system  are called  during  a   shadow
copy    backup  initiated   by  a   VSS-aware   backup  program.    The VSS writers ensure  that    all
data    on  disk    for the application is  in  an  application-consistent  state   and that    other
writers are quiesced    (which  means   paused  during  the operation)  while   the backup  is
taken,  maintaining the integrity   of  the on-disk data    being   backed  up. An  application-
consistent  backup  means   that    the data    is  in  a   suitable    state   to  be  restored    and used
without corruption  problems.
If  a   backup  was taken   at  the Hyper-V host    level   of  all virtual machine assets, primarily
the VHD files,  then    ordinarily  the virtual machine would   know    nothing of  the backup
being   taken   at  the host    level,  so  the data    backed  up  would   likely  not be  in  an
application-consistent  state.  Hyper-V Integration Services    includes    a   Backup  (volume
snapshot)   service,    and this    allows  the Hyper-V host    to  notify  each    virtual machine
when    a   VSS backup  is  taken.  The process then    looks   like    the following   and ensures
that    backups of  the virtual machines    are in  an  application-consistent  state:
1 . The backup  software    (the    VSS requestor)  on  the Hyper-V server  makes   a   request
for a   VSS snapshot    and enumerates  the VSS writers (for    example,    the Hyper-V VSS
writer) on  the system  to  ascertain   that    the data    that    can be  backed  up  with    VSS.
2 . The Hyper-V VSS writer  (in conjunction with    the VSS coordination    service)
forwards    the VSS snapshot    request to  each    guest   operating   system  via the Backup
integration service.
3 . Each    guest   operating   system  thinks  it  is  receiving   a   native  VSS request and
proceeds    to  notify  all VSS writers on  the guest   to  prepare for a   snapshot.
4 . Each    VSS writer  in  the guest   operating   systems writes  any information to  disk    that
relates to  its service (for    example,    Exchange    and SQL)    and notifies    the VSS
coordinator that    it  is  ready   for a   snapshot    and tells   it  which   data    to  back    up
(although   this    part    is  ignored because we’ll   be  backing up  the entire  VHD from    the
Hyper-V host).