NetBackup™ for Hyper-V Administrator's Guide

Last Published:
Product(s): NetBackup & Alta Data Protection (11.0)
  1. Introduction
    1.  
      About Hyper-V
    2.  
      NetBackup for Hyper-V environment
    3.  
      Hyper-V terminology related to backup
    4.  
      Basic phases in a NetBackup backup of a Hyper-V virtual machine
    5.  
      NetBackup administrator tasks for Hyper-V
    6.  
      Quick reference for troubleshooting
  2. Notes and prerequisites
    1.  
      NetBackup for Hyper-V prerequisites
    2.  
      NetBackup for Hyper-V notes and restrictions
    3.  
      NetBackup character restrictions for Hyper-V virtual machine display names
    4.  
      NetBackup character restrictions for vhd or vhdx names and the VM path when the Enable file recovery from VM backup option is used
    5.  
      Notes on Linux virtual machines
  3. Configure NetBackup communication with Hyper-V
    1.  
      Changing the NetBackup Legacy Network Service logon (vnetd.exe) to the domain user account
    2.  
      Setting global limits on the use of Hyper-V resources
  4. Configure NetBackup policies for Hyper-V
    1.  
      Creating a Hyper-V policy
    2.  
      Limit jobs per policy on the Attributes tab (for Hyper-V)
    3.  
      Virtual machine host names and display names should be unique if VMs are selected manually in the policy
    4. Backup options on the Hyper-V tab
      1.  
        Backup method (Hyper-V)
      2.  
        Optimization options (Hyper-V)
      3.  
        Primary VM identifier option (Hyper-V)
      4.  
        Enable offline backup of non-VSS VMs (Hyper-V with VSS)
      5.  
        Cluster shared volumes timeout (Hyper-V with VSS)
    5. Hyper-V - Advanced attributes
      1.  
        Provider type configuration parameter (VSS)
      2.  
        Snapshot attribute configuration parameter (VSS)
      3.  
        Virtual disk selection parameter (WMI)
      4.  
        Existing snapshot handling parameter (WMI)
      5.  
        Consistency level parameter (WMI)
      6.  
        About the exclude disk options for virtual disk selection
      7.  
        Virtual disk selection options: an example to avoid
      8.  
        Restoring data from the backups that excluded the boot disk or data disks
    6.  
      Browse for Hyper-V virtual machines
    7.  
      Prerequisites for alternate client backup of a virtual machine (VSS)
    8.  
      Configure an alternate client backup of virtual machines
    9.  
      Requirements for a NetBackup client inside the virtual machine
  5. Configure Hyper-V Intelligent Policies
    1.  
      About Hyper-V Intelligent Policy (automatic selection of virtual machines for backup)
    2.  
      The basics of a NetBackup query rule
    3.  
      Important notes on Hyper-V Intelligent Policy
    4.  
      NetBackup requirements for Hyper-V Intelligent Policy
    5.  
      Setting up Hyper-V Intelligent Policy: Task overview
    6.  
      Options for selecting Hyper-V virtual machines
    7.  
      Creating a Hyper-V policy for automatic virtual machine selection
    8.  
      Edit or remove a query in Basic mode
    9.  
      Using the Query Builder in Advanced mode
    10.  
      AND vs. OR in queries
    11.  
      Examples for the NetBackup Query Builder
    12.  
      The IsSet operator in queries
    13.  
      About selecting virtual machines by means of multiple policies
    14.  
      Order of operations in queries (precedence rules)
    15.  
      Parentheses in compound queries
    16.  
      Query rules for virtual machine Notes that contain a newline character
    17.  
      Query Builder field reference
    18.  
      Test Query screen for Hyper-V
    19.  
      Test Query: Failed virtual machines
    20.  
      Effect of Primary VM identifier parameter on Selection column in Test Query results
    21.  
      Effect of Primary VM identifier parameter on VM Name column in Test query results
    22.  
      Restoring a VM that was backed up with a Hyper-V Intelligent Policy and that has a pass-through disk
  6. NetBackup Hyper-V for SCVMM
    1.  
      About backup of virtual machines in an SCVMM environment
    2.  
      Notes on NetBackup for Hyper-V with SCVMM
    3.  
      Creating a query to back up VMs in a localized SCVMM environment
  7. Windows Server failover cluster support
    1.  
      About virtual machines on Windows failover clusters
    2.  
      Notes on CSV backup and restore
    3.  
      Creating a policy for virtual machines in a cluster
    4.  
      Location of the restored virtual machine in a cluster
    5. Virtual machine maintenance after a restore
      1.  
        Removal of cluster resources during restore
  8. Back up and restore Hyper-V
    1.  
      Backing up Hyper-V virtual machines
    2.  
      WMI backup method: State of the virtual machine before and after restore
    3.  
      Notes on individual file restore
    4.  
      Notes on full virtual machine restore
    5.  
      About restoring individual files
    6.  
      Restoring individual Hyper-V files to a host that has a NetBackup client
    7.  
      Restore options for restore of Hyper-V individual files (NetBackup web UI)
    8. Restoring individual Hyper-V files to a shared location on the virtual machine
      1.  
        Setting up NetBackup Client Service for restore to a shared location on the virtual machine
    9.  
      Restoring the full Hyper-V virtual machine
    10.  
      Restore Options
    11.  
      About restoring common files
    12.  
      The BAR interface may list Hyper-V snapshot files when you browse to restore Hyper-V VM files
  9. Use Accelerator to back up Hyper-V
    1.  
      About the NetBackup Accelerator for virtual machines
    2.  
      Accelerator: full vs. incremental schedules
    3.  
      How the NetBackup Accelerator works with virtual machines
    4.  
      Accelerator notes and requirements for virtual machines
    5.  
      Accelerator forced rescan for virtual machines (schedule attribute)
    6.  
      Accelerator requires the OptimizedImage attribute
    7.  
      Accelerator backups and the NetBackup catalog
    8.  
      Accelerator messages in the backup job details log
    9.  
      NetBackup logs for Accelerator with virtual machines
    10.  
      About reporting the amount of Accelerator backup data that was transferred over the network
    11.  
      Replacing the Accelerator image size with the network-transferred data in NetBackup command output
  10. Best practices and more information
    1.  
      Best practices
  11. Troubleshooting
    1. NetBackup logs for Hyper-V and how to create them
      1.  
        Enabling VxFI logging
      2.  
        Configuring VxMS and vhd logging
      3.  
        Format of the VxMS core.log and provider.log file names
    2. Errors during policy creation
      1.  
        NetBackup policy validation failed
    3. NetBackup status codes related to Hyper-V
      1.  
        Snapshot error encountered (status code 156)
    4.  
      Backup job hangs for multiple virtual machines
    5.  
      Viewing or resizing Windows NTFS shadow storage
    6.  
      The Hyper-V integration component is not installed
    7.  
      LDM volumes and status code 1
    8.  
      Hyper-V snapshots (avhd or avhdx files) and status code 1
    9.  
      When backing up the virtual machines that reside on the same CSV, Windows warning 1584 can be ignored
    10.  
      Problems with alternate client backup
    11.  
      Restored virtual machine fails to start
    12.  
      Problem with a restart of a restored virtual machine: Why did the computer shut down unexpectedly?
    13.  
      Problems with restore of individual files
    14.  
      Problems with restore of the full virtual machine
    15.  
      Unable to change virtual disk settings for a VM after restore if the VM had user checkpoints during a backup that used the WMI method
    16.  
      Increasing the WMI create disk time-out value
    17.  
      Linux VMs and persistent device naming
  12. Appendix A. VSS backup method: Hyper-V online and offline backups
    1.  
      About Hyper-V online and offline backups for VSS
    2.  
      Conditions that determine online vs. offline backup for VSS
    3.  
      Additional notes on offline backups with VSS
    4.  
      Hyper-V 2012 R2 virtual machines may be in the Off state when restored
  13. Appendix B. Hyper-V pass-through disks
    1.  
      About Hyper-V pass-through disks with NetBackup
    2.  
      Configurations for backing up pass-through disks
    3.  
      Requirements for backing up Hyper-V pass-through disks
    4.  
      Restrictions for Hyper-V pass-through disks
    5.  
      Configuring a local snapshot backup of Hyper-V pass-through disks
    6.  
      About alternate client backup of pass-through disks
    7.  
      Configuring an alternate client backup of Hyper-V pass-through disks
    8.  
      Important note on VSS and disk arrays
  14. Appendix C. NetBackup commands to back up and restore Hyper-V virtual machines
    1.  
      Using NetBackup commands to create a Hyper-V policy
    2.  
      Using NetBackup commands to create a Hyper-V Intelligent Policy
    3.  
      Notes on Hyper-V policy attributes when you use the NetBackup commands
    4.  
      The bpplinfo options for Hyper-V policies
    5. Examples of nbrestorevm for restoring VMs to Hyper-V
      1.  
        Hyper-V examples of restore to original location
      2.  
        Hyper-V examples of restore to alternate locations
    6.  
      The nbrestorevm -R rename file for Hyper-V
    7.  
      Notes on troubleshooting the nbrestorevm command for Hyper-V
    8.  
      Logs for troubleshooting the nbrestorevm command

Using NetBackup commands to create a Hyper-V Intelligent Policy

This topic describes how to use NetBackup commands to create a policy to back up virtual machines automatically through a query rule. It includes features for Hyper-V on Windows Server 2016 or later: Block-level incremental backup and Accelerator.

The NetBackup commands for policy creation are in the following directory:

Windows:

install_path\Veritas\NetBackup\bin\admincmd

UNIX or Linux:

usr/openv/netbackup/bin/admincmd

Note:

To run virtual machine backups, a NetBackup client must be installed on the Hyper-V server, and on the SCVMM server (if any).

To use NetBackup commands to create a Hyper-V policy for auto selection of VMs

  1. Sign into the NetBackup primary server.
  2. Create a policy.

    bppolicynew policy_name

    For example:

    bppolicynew p1_auto_select_VMs

  3. Set the policy attributes.
    bpplinfo policy_name -set -pt Hyper-V -use_virtual_machine 2
    -hyperv_server "Hyper-V_server" -fi 1 -application_discovery 1
    -snapshot_method "HV" -blkincr 1 -use_accelerator 1
    -snapshot_method_args "nameuse=1,Virtual_machine_backup=2,
    file_system_optimization=1,exclude_swap=1,drive_selection=0,
    snapact=3,hv_snapshot_consistency_level=0"

    See Notes on Hyper-V policy attributes when you use the NetBackup commands.

  4. Create a policy schedule.

    bpplsched policy_name -add sched_label -st sched_type

    For the -st option, the available schedule types are FULL (full), INCR (differential incremental), or CINC (cumulative incremental). For example:

    bpplsched p1_auto_select_VMs -add Full -st FULL

  5. Specify the host that is to perform virtual machine discovery.

    • To specify a Hyper-V server:

      bpplclients policy_name -add Hyper-V_server Hyper-V_server_hardware_type Hyper-V_server_OS

      For example:

      bpplclients Accel_policy_auto_select1 -add scvmmserver3 Windows-x64 
      Windows

      In this example, the host to perform virtual machine discovery is scvmmserver3.

    • To specify a Hyper-V cluster:

      bpplclients policy_name -add Hyper-V_cluster

      Note:

      To allow the policy to search all nodes of the cluster, you must set the Netbackup Legacy Network Service logon to the domain user account.

      See Changing the NetBackup Legacy Network Service logon (vnetd.exe) to the domain user account.

    • To specify a System Center Virtual Machine Manager (SCVMM) that manages Hyper-V servers or clusters:

      bpplclients policy_name -add SCVMM_server SCVMM_server_hardware_type SCVMM_server_OS

    To specify a Hyper-V server:

    bpplclients p1_auto_select_VMs -add hvserver3 Windows-x64 Windows

    To find the hardware type and operating system for your server, run the following on the NetBackup primary server:

    bpplclients

    For further information, see the examples under bpplclients in the NetBackup Commands Reference Guide.

  6. Create a query rule to select virtual machines automatically.

    bpplinclude policy_name -add "hyperv:/;server_type=value?filter=query_rule"

    The possible values for server_type=value are the following (these values are not case-sensitive):

    • Hyperv

      NetBackup discovers the VMs by communicating with the Hyper-V server or cluster. The Hyper-V server or Hyper-V cluster must contain the NetBackup client software.

    • Scvmm

      NetBackup discovers the VMs by communicating with the SCVMM server. The SCVMM server (as well as each of the Hyper-V hosts) must contain the NetBackup client software.

      For example:

      bpplinclude Accel_policy_auto_select1  - add 
      "hyperv:/;server_type=Scvmm?filter=Displayname Contains 
      'Production'"
      

      This query rule selects from the virtual machines that an SCVMM server manages. This example selects only the virtual machines with the display names that contain the word "Production". Contains means that other characters can also appear in the display names.

    For the filter options that you can use in a Hyper-V query rule, refer to the Field keywords in the following:

    See Query Builder field reference.

  7. Validate the policy.

    bpclient -policy policy_name -validate - fi

    If the policy successfully validates, no output appears. Otherwise, the following error occurs:

    Error code 48 : client hostname could not be found

  8. Use the bpbackup command to start the backup.

    For details on bpbackup, see the NetBackup Commands Reference Guide.

    For a policy that lets you select virtual machines manually:

    See Using NetBackup commands to create a Hyper-V policy.

To test the bpplinclude query rule before you run the backup

  • Run the following on the Hyper-V server or SCVMM server that is designated in the policy:

    install_path\NetBackup\bin nbdiscover -noxmloutput "query filter=query_rule" -noreason

    Where "query filter=query_rule" is the actual query to test. For example:

    "hyperv:/;server_type=Hyperv?filter=Displayname Contains 'Production'"

    A plus sign (+) appears before the virtual machines that the query rule selects for the backup: those virtual machines are included in the backup when the policy runs.

    The virtual machines to exclude from the backup appear with a minus sign (-).

    The -noreason option omits explanations as to why the query excluded a virtual machine or why the query failed. For explanations, omit -noreason.

    For more details on most of the command options, see the man page or the NetBackup Commands Reference Guide.