Query VM

Use the query VM command to list and verify the successful backups of virtual machines (VMs).

Windows operating systems

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.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-Query VM-- --vmname--+---------+----------------------------><
                        '-options-'   

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.
Windows operating systems
Table 1. Query VM command: Related options for Hyper-V virtual machine queries.
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.
vmrestoretype Command line.
Windows operating systems

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
Windows operating systems

Query VM examples (Hyper-V)

The following example shows a query VM command that displays summary information about all Hyper-V virtual machines that have been backed up.
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
The following query VM command with the -detail option shows detailed information about Hyper-V VMs that have been backed up. The detailed output includes the type of backup that was performed, the size of the virtual machine, information about its disks, and statistics.
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
dsmc query vm -detail

Query Virtual Machine for Full VM backup

 #     Backup Date     Mgmt Class   Size    Type  A/I Location Virtual Machine
-- ------------------- ---------- -------- ------ --- -------- ---------------
 1 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: 0  B
        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: 79
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.
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.
The following example shows the syntax to use to list detailed output for a specific virtual machine named DeptA_VM_W2k08R2.
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
The following command displays all temporary VMs that are running in instant access mode that were created by an instant access operation.
q vm * -vmrestoretype=instantccess