Linux operating systemsWindows operating systems

Exclude.vmdisk

The EXCLUDE.VMDISK option excludes a virtual machine disk from backup operations.

The EXCLUDE.VMDISK option specifies the label of a virtual machine's disk to be excluded from a backup vm operation. If you exclude a disk on the backup vm command, the command-line parameters override any EXCLUDE.VMDISK statements in the options file.

This option is available only if you are using the IBM Spectrum Protect™ for Virtual Environments licensed product. For more information about this option, see the IBM Spectrum Protect for Virtual Environments product documentation on IBM® Knowledge Center at http://www.ibm.com/support/knowledgecenter/SSERB6/welcome.

This option applies to both VMware and Microsoft Hyper-V virtual machine disks.

Linux operating systemsWindows operating systems

EXCLUDE.VMDISK for VMware virtual machines

Use the EXCLUDE.VMDISK option to exclude a VMware virtual machine from backup operations.

Supported clients

Linux operating systemsThis option can be used with supported x86_64 Linux clients.

Windows operating systemsThis option can be used with supported Windows clients.

Options file

Set this option in the client options file. Command line parameters override statements in the options file.

Syntax for VMware virtual machines

Read syntax diagramSkip visual syntax diagram
>>-EXCLUDE.VMDISK--vmname-- -vmdk_label------------------------><

Parameters

vmname
Specifies the name of the virtual machine 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 virtual machine name on each EXCLUDE.VMDISK statement. Specify additional EXCLUDE.VMDISK statements for each virtual machine disk to exclude.
The virtual machine name can contain an asterisk (*), to match any character string, and question mark (?) to match any one character. Surround the VM name with quotation marks (" ") if the VM name contains space characters.
Tip: If the virtual machine name contains special characters, such as bracket characters ([) or (]), the virtual machine name might not be correctly matched. If a virtual machine name uses special characters in the name, you might need to use the question mark character (?) to match the special characters in the VM name.

For example, to exclude Hard Disk 1 in the backup of a virtual machine named "Windows VM3 [2012R2]", use this syntax in the options file: EXCLUDE.VMDISK "Windows VM3 ?2012R2?" "Hard Disk 1"

vmdk_label
Specifies the disk label of the disk that you want to exclude. Wildcard characters are not allowed. Use the Backup VM command with the -preview option to determine the disk labels of disks in a given virtual machine. See the "Backup VM" topic for the syntax.
Do not exclude disks on virtual machines that you are protecting with the INCLUDE.VMTSMVSS option, if the disks contain application data.

Examples

Options file
Assume that a virtual machine named vm1 contains four disks, labeled Hard Disk 1, Hard Disk 2, Hard Disk 3, and Hard Disk 4. To exclude disk 2 from Backup VM operations, specify the following statement in the options file:
EXCLUDE.VMDISK "vm1" "Hard Disk 2"
Exclude disks 2 and 3 from Backup VM operations:
EXCLUDE.VMDISK "vm1" "Hard Disk 2"
EXCLUDE.VMDISK "vm1" "Hard Disk 3"
Command line
The command line examples show the use of the exclusion operator (-) before the vmdk= keyword, to indicate that the disk is to be excluded.
Exclude a single disk:
dsmc backup vm "vm1:-vmdk=Hard Disk 1"
Exclude disk 2 and disk 3:
dsmc backup vm "vm1:-vmdk=Hard Disk 2:-vmdk=Hard Disk 3"
Exclude disk 1 and disk 2 on vm1:
dsmc backup vm "vm1:-vmdk=Hard Disk 1:-vmdk=Hard Disk 2"
Windows operating systems

EXCLUDE.VMDISK for Microsoft Hyper-V virtual machines

Use the EXCLUDE.VMDISK option to exclude a virtual machine disk from Hyper-V RCT backup operations on Windows Server 2016 or later operating systems.

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.

Supported clients

This option can be used with Windows Server 2016 or later clients.

Options file

Set this option in the client options file. Command-line parameters override statements in the options file.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-EXCLUDE.VMDISK--vmname-- -disk_location---------------------><

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.
The VM name can contain an asterisk (*) to match any character string, and a question mark (?) to match any one character. If the VM name contains space characters, surround the name with quotation marks (" ").
Tip: If the VM name contains special characters, such as bracket characters ([) or (]), the VM name might not be correctly matched. If a VM name includes special characters, use a question mark (?) to represent the special characters.
For example, to exclude a SCSI virtual machine disk from the backup of a VM named "Windows VM3 [2012R2]", use this syntax in the options file:
EXCLUDE.VMDISK "Windows VM3 ?2012R2?" "SCSI 0 1"
disk_location
Specify the location of the virtual machine hard disk (VHDX) to exclude from a Hyper-V RCT 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"
Virtual machine vm1 contains a virtual machine disk with IDE controller number 1 and device location 0. To exclude this virtual machine disk from backup vm operations, specify the following statement in the options file:
EXCLUDE.VMDISK vm1 "IDE 1 0"
Virtual machine vm2 contains a virtual machine disk with SCSI controller number 0 and device location 1. Exclude this disk from backup operations by specifying the following statement in the options file:
EXCLUDE.VMDISK vm2 "SCSI 0 1"
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.
Exclude an IDE disk (with controller number 1 and device location 0) from the backup operation of virtual machine vm1:
dsmc backup vm "vm1:-vhdx=IDE 1 0"
Exclude a SCSI disk (with controller number 0 and device location 1) from the backup operation of virtual machine vm2:
dsmc backup vm "vm2:-vhdx=SCSI 0 1"
Restriction: You cannot use the all-vm option together with the vmname:-vhdx= option on the command line or in the options file.