Windows operating systemsLinux operating systems

Query VM

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

Windows operating systems

Data moverThis feature is available only if the client operates as a data mover for IBM Spectrum Protect for Virtual Environments.

Windows operating systemsLinux operating systems

Query VM for VMware virtual machines

Use the query vm command to determine which VMware virtual machines were backed up.

Supported Clients

Linux operating systemsThis command is valid on Linux clients that are installed on a vStorage backup server.

Windows operating systemsThis command is valid on Windows clients that are installed on a vStorage backup server.

Syntax

Read syntax diagramSkip visual syntax diagram Query VM   vmname -FROM BOTHSERVERLOCALoptions

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.
Table 1. Query VM command: Related options for VMware virtual machine queries.
Option Where to use
detail

Valid for vmbackuptype=fullvm

Windows operating systemsValid 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.
Windows operating systemsLinux operating systems

Query VM examples (VMware)

The following are examples of using the query VM command and the command with the -detail option.

Windows operating systemsLinux operating systemsFull VM
Windows operating systemsLinux operating systems
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.
Windows operating systemsLinux operating systemsFull VM with -detail option
Windows operating systemsLinux operating systems
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.
Windows operating systemsThe following command returns a list of VMs that are running an instant restore operation.
q vm * -vmrestoretype=instantrestore
Windows operating systemsLinux operating systemsQuery all VMware virtual machines that were backed up using -vmbacktype=fullvm:
q vm * -vmbackuptype=fullvm