Linux operating systemsWindows operating systems

Query VM

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

Windows operating systems
The query VM command can be used to determine which Microsoft Hyper-V virtual machines and VMware virtual machines have been backed up to the server. The information for each hypervisor is presented in its own section. If you are querying the backups of Hyper-V virtual machines, you can skip over the Query VM for VMware virtual machines text. If you are querying backups of VMware virtual machines, you do not need to read the Query VM for Hyper-V virtual machines text.
Linux operating systemsWindows 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--+---------+----------------------------><
                        '-options-'   

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 Tivoli® Storage Manager server.
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.
Linux operating systemsWindows operating systems

Query VM examples (VMware)

The following are samples of using the query VM command with full VM and file-level VM, and with full VM and the -detail option.

Linux operating systemsWindows operating systemsFull VM
Linux operating systemsWindows operating systems
QUERY
VM -INA -vmbackuptype=FULLVM
#   Backup Date  Mgmt Class  Type    A/I  Virtual 
                                          Machine 
__  ___________  __________  ____    ___  _______
1   09/26/2010   DEFAULT     VMFULL  A    vm1
    11:34:14
2   09/26/2010   DEFAULT     VMFULL  A    vm2
    11:34:37
3   09/26/2010   DEFAULT     VMFULL  A    vm3
    11:34:49
4   09/26/2010   DEFAULT     VMFULL  I    vm2
    12:35:08
5   09/26/2010   DEFAULT     VMFULL  I    vm3
    12:35:18
Linux operating systemsWindows operating systemsFull VM with -detail option
Linux operating systemsWindows operating systems
q vm Small-SQL -detail
IBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
Client Version 7, Release 1
  Client date/time: 06/26/2014 14:08:44
(c) Copyright by IBM Corporation and other(s) 1990, 2014. All Rights
Reserved.

Node Name: BAClient-DM
Session established with server TSM_SERVER1: Windows
  Server Version 7, Release 1, Level 0.0
  Server date/time: 06/26/2012 14:37:39  Last access: 06/26/2014 14:22:55

Query Virtual Machine for Full VM backup

 #      Backup Date       Mgmt Class  Size         Type   A/I Virtual
Machine
-  -  -  -  - - -
  1  06/26/2012 14:07:13  STANDARD       19.53 GB  FULL    A  Small-SQL
        The size of this incremental backup: n/a
        The number of incremental backups since last full: n/a
        The amount of extra data: n/a
        The TSM objects fragmentation: n/a
        Backup is represented by: n/a
        Application protection type: TSM VSS
        Application(s) protected: MS SQL 2008
        DISK[1]Label:   Hard disk 1
        DISK[1]Name:    [datastore1] Cloned-Small-SQL/Cloned-Small-SQL-000001.vmdk
        DISK[1]Status:  Protected
Windows operating systemsFile Level
Windows operating systems
QUERY VM -vmbackuptype=FILE

Filespace Query for Virtual Machine 'vm1'

Accessing as node: vm1
#   Last Incr Date       Type    File Space Name 
__  ___________________  ____    _______________
1   09/25/2013 12:19:23  NTFS    \\vm1\c$   fsID: 2
2   09/25/2013 12:19:25  NTFS    \\vm1\e$   fsID: 3
3   09/25/2013 12:19:22  NTFS    \\vm1\z$   fsID: 1

Filespace Query for Virtual Machine 'vm2'

Accessing as node: vm2
#   Last Incr Date       Type    File Space Name 
__  ___________________  ____    _______________
1   09/25/2013 10:49:10  NTFS    \\vm2\c$   fsID: 2
2   09/25/2013 10:49:09  NTFS    \\vm2\h$   fsID: 1

Filespace Query for Virtual Machine 'vm3'

Accessing as node: vm3
#   Last Incr Date       Type    File Space Name 
__  ___________________  ____    _______________
1   09/25/2013 10:49:22  NTFS    \\vm3\c$   fsID: 2
2   09/25/2013 10:49:21  NTFS    \\vm3\h$   fsID: 1
Windows operating systemsThe following command returns a list of VMs that are running an instant restore operation.
q vm * -vmrestoretype=instantrestore
Linux operating systemsWindows operating systemsQuery all VMware virtual machines that were backed up using -vmbacktype=fullvm:
q vm * -vmbackuptype=fullvm
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 Tivoli Storage Manager server.
Windows operating systems
Table 2. 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

Valid for vmbackuptype=hypervfull

Command line.

pitdate

Valid for vmbackuptype=hypervfull

Command line.

pittime

Valid for vmbackuptype=hypervfull

Command line.
vmbackuptype=hypervfull Command line or client options file.
Windows operating systems

Examples

Task
List all virtual machines that have been backed up by the backup-archive client on the Hyper-V host.
dsmc query vm -vmbackuptype=hypervfull
Windows operating systems

Query VM examples (Hyper-V)

The following is an example of query VM command that displays information about Hyper-V virtual machines that have been backed up.
dsmc query vm -vmbackuptype=hypervfull

#   Backup Date  Mgmt Class  Type  A/I Virtual Machine                                    
---  -------------------  ----------  ----------- 
1   07/24/2014     DEFAULT   Full   A  Windows 2008 
                                      
2   07/25/2014     DEFAULT   Full   A  Windows 2008 
                                      
3   08/04/2014     DEFAULT   Full   A  Windows 2008
The next example shows output from a query VM that includes the -detail option. This command includes a virtual machine name so the output is only displayed for the specified virtual machine. The detailed output includes the type of backup that was performed, the size of the virtual machine, information about its disks, and statistics.
tsm> q vm HPV2VM1 -detail

Periodic Full - Full

Query Virtual Machine for Full VM backup

 #      Backup Date       Mgmt Class  Size         Type   A/I Virtual Machine
---  -------------------  ----------  -----------  ------ --- ---------------
  1  03/14/2014 09:58:44  STANDARD       60.00 GB  IFINCR  A  HPV2VM1
        The size of this incremental backup: 8.62 MB
        The number of incremental backups since last full: 4
        The amount of extra data: 0
        The TSM objects fragmentation: 3
        Backup is represented by: 174 TSM objects
        Application protection type: n/a
        Disk[1]Label:   Hard Disk 1
        Disk[1]Name:    na
        Disk[1]Status:  Protected
-----------------------------------------------------------------------------
        All averages are calculated only for incremental forever backups displayed above.
        The average size of incremental backup: 8.62 MB
        The average number of incremental backups since last full: 4
        The average overhead of extra data: 0
        The average TSM objects fragmentation: 3
        The average number of TSM objects per backup: 174
The following example shows the syntax to use to list all Hyper-V virtual machines that have been backed up by this node:
q vm -vmbackuptype=hypervfull