Query VM
Use the query VM command to list and verify the successful backups of virtual machines (VMs).
This feature is available only if the client operates as a data mover for IBM Spectrum Protect™ for Virtual Environments.
Query VM for VMware virtual machines
Use the query vm command to determine which VMware virtual machines were backed up.
Supported Clients
This command is valid on Linux clients that are installed on a vStorage backup server.
This command is valid on Windows clients that are installed on a vStorage backup server.
Syntax
>>-Query VM-- --vmname--+-------------------+--+---------+----->< | .-BOTH---. | '-options-' '--FROM -+-SERVER-+-' '-LOCAL--'
Parameters
- vmname
- Specifies the virtual machine host name that you want to query. If you omit the virtual machine name, the command displays all VM backups on the IBM Spectrum Protect server.
- -FROM
- Specifies the backup location or locations to query. You can specify one of the following values:
- SERVER
- The query is limited to backups that are on the IBM Spectrum Protect server.
- LOCAL
- The query is limited to persisted snapshots that are on the hardware storage.
- BOTH
- The query lists information for both backups that are on the IBM Spectrum Protect server and snapshots that are on the hardware storage. This value is the default.
Option | Where to use |
---|---|
detail
Valid for vmbackuptype=fullvm Valid for -vmrestoretype |
Command line. |
inactive Valid for vmbackuptype=fullvm |
Command line. |
pitdate Valid for vmbackuptype=fullvm |
Command line. |
pittime Valid for vmbackuptype=fullvm |
Command line. |
vmbackuptype | Command line or client options file. |
vmchost | Command line or client options file. |
vmcpw | Command line or client options file. |
vmcuser | Command line or client options file. |
Query VM examples (VMware)
The following are examples of using the query VM command and the command with the -detail option.
- Full VM
q vm devesx04-24 -ina Query Virtual Machine for Full VM backup # Backup Date Mgmt Class Size Type A/I Location Virtual Machine --- ------------------- ---------- ----------- ------ --- -------- --------------- 1 12/07/2016 14:45:24 DDMGMT 47.85 GB IFFULL I SERVER devesx04-24 2 12/14/2016 17:38:05 DDMGMT 47.85 GB IFINCR A SERVER devesx04-24 3 01/23/2017 14:07:44 DDMGMT 47.85 GB SNAPSHOT I LOCAL devesx04-24 4 02/01/2017 08:59:52 DDMGMT 47.85 GB SNAPSHOT A LOCAL devesx04-24 ANS1900I Return code is 0.
- Full VM with -detail option
q vm devesx04-24 -ina -detail Query Virtual Machine for Full VM backup # Backup Date Mgmt Class Size Type A/I Location Virtual Machine --- ------------------- ---------- ----------- ------ --- -------- --------------- 1 12/07/2016 14:45:24 DDMGMT 47.85 GB IFFULL I SERVER devesx04-24 The size of this incremental backup: n/a The number of incremental backups since last full: 0 The amount of extra data: 0 The IBM Spectrum Protect objects fragmentation: 0 Backup is represented by: 79 TSM objects Application protection type: VMware Snapshot type: VMware Tools Disk[1]Label: Hard Disk 1 Disk[1]Name: [TSMXIV11:vVOL_JOANNE] rfc4122.750c6a3a-9c65-4a1f-9ed7-1b531aa204 af/devesx04-24-000003.vmdk Disk[1]Status: Protected Disk[2]Label: Hard Disk 2 Disk[2]Name: [TSMXIV11:vVOL_JOANNE] rfc4122.750c6a3a-9c65-4a1f-9ed7-1b531aa204 af/devesx04-24_1-000003.vmdk Disk[2]Status: Protected Disk[3]Label: Hard Disk 3 Disk[3]Name: [TSMXIV11:vVOL_JOANNE] rfc4122.750c6a3a-9c65-4a1f-9ed7-1b531aa204 af/devesx04-24_2-000003.vmdk Disk[3]Status: Protected 2 12/14/2016 17:38:05 DDMGMT 47.85 GB IFINCR A SERVER devesx04-24 The size of this incremental backup: 186.43 MB The number of incremental backups since last full: 1 The amount of extra data: 0 The IBM Spectrum Protect objects fragmentation: 2 Backup is represented by: 119 TSM objects Application protection type: VMware Snapshot type: VMware Tools Disk[1]Label: Hard Disk 1 Disk[1]Name: [TSMXIV11:vVOL_JOANNE] rfc4122.750c6a3a-9c65-4a1f-9ed7-1b531aa204 af/devesx04-24-000006.vmdk Disk[1]Status: Protected Disk[2]Label: Hard Disk 2 Disk[2]Name: [TSMXIV11:vVOL_JOANNE] rfc4122.750c6a3a-9c65-4a1f-9ed7-1b531aa204 af/devesx04-24_1-000006.vmdk Disk[2]Status: Protected Disk[3]Label: Hard Disk 3 Disk[3]Name: [TSMXIV11:vVOL_JOANNE] rfc4122.750c6a3a-9c65-4a1f-9ed7-1b531aa204 af/devesx04-24_2-000006.vmdk Disk[3]Status: Protected 3 01/23/2017 14:07:44 DDMGMT 47.85 GB SNAPSHOT I LOCAL devesx04-24 The size of this incremental backup: n/a The number of incremental backups since last full: 0 The amount of extra data: 0 The IBM Spectrum Protect objects fragmentation: 0 Backup is represented by: 0 TSM objects Application protection type: VMware Snapshot type: VMware Tools 4 02/01/2017 08:59:52 DDMGMT 47.85 GB SNAPSHOT A LOCAL devesx04-24 The size of this incremental backup: n/a The number of incremental backups since last full: 0 The amount of extra data: 0 The IBM Spectrum Protect objects fragmentation: 0 Backup is represented by: 0 TSM objects Application protection type: VMware Snapshot type: VMware Tools ----------------------------------------------------------------------------- All averages are calculated only for incremental forever backups displayed above. The average size of incremental backup: 186.43 MB The average number of incremental backups since last full: 1 The average overhead of extra data: 0 The average objects fragmentation: 0 The average number of objects per backup: 49 ANS1900I Return code is 0.
q vm * -vmrestoretype=instantrestore
q vm * -vmbackuptype=fullvm
Query VM for Microsoft Hyper-V virtual machines
Use the query vm command to determine which Hyper-V virtual machines were backed up.
Supported Clients
This command is valid on Windows clients that are installed on a Hyper-V host system.
Parameters
- vmname
- Specifies the virtual machine host name that you want to query. The virtual machine name is case-sensitive. If you specify a VM name on the command, the name cannot contain wildcard characters.
- If you omit the virtual machine name, the command displays all VM backups on the IBM Spectrum Protect server.
Option | Where to use |
---|---|
detail | Command line. Displays the details of each disk (label, name) and its status (protected or excluded), and incremental-forever backup performance statistics. |
inactive | Command line. |
pitdate | Command line. |
pittime | Command line. |
Examples
- Task
- List all virtual machines that have been backed up by Data Protection for Microsoft Hyper-V on the Hyper-V
host.
dsmc query vm
Query VM examples (Hyper-V)
dsmc query vm
Query Virtual Machine for Full VM backup
# Backup Date Mgmt Class Size Type A/I Location Virtual Machine
--- ------------------- ---------- ----------- ------ --- -------- ---------------
1 03/19/2017 17:54:34 STANDARD 17.00 GB IFFULL A SERVER DeptA_VM05
2 03/20/2017 01:51:34 STANDARD 15.00 GB IFINCR A SERVER DeptA_VM_W2k08R2
3 03/20/2017 01:46:19 STANDARD 36.00 GB IFFULL A SERVER DeptA_VM04
dsmc query vm -detail
Query Virtual Machine for Full VM backup
# Backup Date Mgmt Class Size Type A/I Location Virtual Machine
--- ------------------- ---------- ----------- ------ --- -------- ---------------
1 03/19/2017 17:54:34 STANDARD 17.00 GB IFFULL A SERVER DeptA_VM05
The size of this incremental backup: n/a
The number of incremental backups since last full: 0
The amount of extra data: 0
The IBM Spectrum Protect objects fragmentation: 0
Backup is represented by: 99 IBM Spectrum Protect objects
Application protection type: n/a
Backup is compressed: No
Backup is deduplicated: No
Snapshot type: Hyper-V RCT Application Consistent
Disk[1]Name: DeptA_VM05.vhdx
Disk[1]Location: IDE 0 0
Disk[1]Status: Protected
Disk[2]Name: DeptA_VM05_Disk2.vhdx
Disk[2]Location: SCSI 0 1
Disk[2]Status: Protected
Disk[3]Name: Disk 7 2.00 GB Bus 0 Lun 4 Target 0
Disk[3]Location: SCSI 0 0
Disk[3]Status: Skipped: Physical disk
Disk[4]Name: Disk 8 2.50 GB Bus 0 Lun 5 Target 0
Disk[4]Location: SCSI 0 2
Disk[4]Status: Skipped: Physical disk
2 03/20/2017 01:51:34 STANDARD 15.00 GB IFINCR A SERVER DeptA_VM_W2k08R2
The size of this incremental backup: 544.00 KB
The number of incremental backups since last full: 1
The amount of extra data: 0
The IBM Spectrum Protect objects fragmentation: 2
Backup is represented by: 37 IBM Spectrum Protect objects
Application protection type: n/a
Backup is compressed: No
Backup is deduplicated: No
Snapshot type: Hyper-V RCT Crash Consistent
Disk[1]Name: DeptA_VM_W2k08R2.vhdx
Disk[1]Location: IDE 0 0
Disk[1]Status: Protected
3 03/20/2017 01:46:19 STANDARD 36.00 GB IFFULL A SERVER DeptA_VM04
The size of this incremental backup: n/a
The number of incremental backups since last full: 0
The amount of extra data: 0
The IBM Spectrum Protect objects fragmentation: 0
Backup is represented by: 79 IBM Spectrum Protect objects
Application protection type: n/a
Backup is compressed: No
Backup is deduplicated: No
Snapshot type: Hyper-V RCT Application Consistent
Disk[1]Name: DeptA_VM04.vhdx
Disk[1]Location: IDE 0 0
Disk[1]Status: Protected
-----------------------------------------------------------------------------
All averages are calculated only for incremental forever backups displayed above.
The average size of incremental backup: 544.00 KB
The average number of incremental backups since last full: 0
The average overhead of extra data: 0
The average objects fragmentation: 0
The average number of objects per backup: 71
The
detailed output also includes the snapshot type and disk information such as the following
information: - Snapshot type
- The type of snapshot that was taken during the VM backup operation:
- Hyper-V RCT Application Consistent
- A quiesced snapshot that was created with Hyper-V Resilient change Tracking (RCT) on Windows Server 2016.
- Hyper-V RCT Crash Consistent
- A non-quiesced snapshot that was created with Hyper-V RCT on Windows Server 2016.
- Hyper-V VSS
- A snapshot that was created with Volume Shadow Copy Service (VSS) on Windows Server 2012 or Windows Server 2012 R2.
- Disk[n]Location
- The disk location of VM disk n, where n is a number. The disk location consists of the disk controller type, "IDE" or "SCSI", followed by the controller number and device location number.
- Disk[n]Status
- The backup status of VM disk n, where n is a number.
- Protected
- Indicates that the data on the VM disk is backed up.
- Skipped: Excluded by user
- Indicates that the VM disk is excluded during backup operations as specified by the exclude.vmdisk option. For more information, see Exclude.vmdisk.
- Skipped: Physical disk
- Indicates that the VM disk is a physical disk (pass-through disk) and its data is not backed up. Only the disk configuration information is backed up. For more information, see Vmprocessvmwithphysdisks.
dsmc query vm DeptA_VM_W2k08R2 -detail
Query Virtual Machine for Full VM backup
# Backup Date Mgmt Class Size Type A/I Location Virtual Machine
--- ------------------- ---------- ----------- ------ --- -------- ---------------
1 03/20/2017 01:51:34 STANDARD 15.00 GB IFINCR A SERVER DeptA_VM_W2k08R2
The size of this incremental backup: 544.00 KB
The number of incremental backups since last full: 1
The amount of extra data: 0
The IBM Spectrum Protect objects fragmentation: 2
Backup is represented by: 37 IBM Spectrum Protect objects
Application protection type: n/a
Backup is compressed: No
Backup is deduplicated: No
Snapshot type: Hyper-V RCT Crash Consistent
Disk[1]Name: Jimmy_VM_Windows2008R2.vhdx
Disk[1]Location: IDE 0 0
Disk[1]Status: Protected
-----------------------------------------------------------------------------
All averages are calculated only for incremental forever backups displayed above.
The average size of incremental backup: 544.00 KB
The average number of incremental backups since last full: 1
The average overhead of extra data: 0
The average objects fragmentation: 2
The average number of objects per backup: 37