Exclude.vmdisk
The EXCLUDE.VMDISK option excludes a virtual machine disk from backup operations.
This option applies to both VMware and Microsoft Hyper-V virtual machine disks.
EXCLUDE.VMDISK for Microsoft Hyper-V virtual machines
Use the EXCLUDE.VMDISK option to exclude a virtual machine disk from Hyper-V backup operations.
Supported clients
This option can be used with Windows clients.
Options file
Set this option in the client options file. Command-line parameters override statements in the options file.
Syntax
Parameters
- vmname
- Specifies the name of the VM that contains a disk that you want to exclude from a backup vm operation. The name is the virtual machine display name. You can specify only one VM name on each EXCLUDE.VMDISK statement. Specify additional EXCLUDE.VMDISK statements for each VM disk to exclude.
- disk_location
- Specify the location of the
virtual machine hard disk (VHDX) to exclude from a Hyper-V backup operation. The disk
location label must begin with "SCSI" or "IDE" followed by the controller number and device location
number. Wildcard characters are not allowed. Tip: Use the backup vm command with the -preview option to determine the location of disks in a given VM. See the "Backup VM" topic for the syntax.
Examples
- Options file
- Exclude the Windows system disk from all virtual
machines that begin with
WinVM
in the following statement in the options file:exclude.vmdisk WinVM* "IDE 0 0"
- Command line
- The command line examples show the use of the exclusion operator (-) before the vhdx= keyword, to indicate that the disk is to be excluded.
Tips for restoring Hyper-V VMs with excluded disks
During a VM restore operation, an informational message is displayed to indicate that a VM disk is not restored because it was excluded during the backup operation. The restore operation also verifies whether the original disk file still exists in the restore destination folder. If the original disk file still exists, it is reconnected to the restored VM. Otherwise, an empty disk file is created with the same attributes (such as file name, disk size, and block size) and the empty disk file is connected to the restored VM.
After a restore operation, the controller and disk order in the restored VM remains the same as the original VM. You do not have to adjust the disk location in the EXCLUDE.VMDISK option for future backup operations of the restored VM.
However, if you remove a SCSI controller manually, all subsequent SCSI controllers' numbers are changed. For example, if you remove "SCSI 0", the next SCSI controller (previously "SCSI 1") becomes "SCSI 0". In this case, you must update the VM disk location in the EXCLUDE.VMDISK option.
The disk location information such as "SCSI 0 0" is displayed in messages for backup, restore, and query operations.