"query vm" command doesn't work

vkky2k

ADSM.ORG Member
Joined
Jun 17, 2017
Messages
36
Reaction score
0
Points
0
First of all, I am not sure on what node should this command be run. In any event, I tried it on TSM server and also on a Data Mover, it looks not working on either one of them.
Under TSM> prompt, I typed "query vm vm-name", then I got the message back and saying QUERY VM is not a recognized command.
Please help me out on what I did wrong?
Thanks!
 
Hi vkky2k
Are you running the query command in `dsmadmc`?
 
To query a vm, has to be ran on the datamover, from the dsmc.exe.
Make sure the dsmc is using the correct opt file that you use to backup all the vm's.
 
Thanks, they seem helpful.
Now, If I run "dmc query vm vmname", it will receive the following. It seems the command will search for data-mover-name, not vmname. Based on information you provided, it seems related to op file. What changes should I make to opt file, or what is next?

dsmc query vm vmname
IBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
Client Version 7, Release 1, Level 6.3
Client date/time: 08/20/2018 15:39:53
(c) Copyright by IBM Corporation and other(s) 1990, 2016. All Rights Reserved.

Node Name: data-mover-name
Please enter your user id <data-mover-name>: user-id

Please enter password for user id "user-id":

ANS1357S Session rejected: Downlevel client code version
 
Thanks, they seem helpful.
Now, If I run "dmc query vm vmname", it will receive the following. It seems the command will search for data-mover-name, not vmname. Based on information you provided, it seems related to op file. What changes should I make to opt file, or what is next?

dsmc query vm vmname
IBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
Client Version 7, Release 1, Level 6.3
Client date/time: 08/20/2018 15:39:53
(c) Copyright by IBM Corporation and other(s) 1990, 2016. All Rights Reserved.

Node Name: data-mover-name
Please enter your user id <data-mover-name>: user-id

Please enter password for user id "user-id":

ANS1357S Session rejected: Downlevel client code version




I alsotried:
dsmadmc -se=instance-name -id=user-id -password=password query vm vmname
I received Unknown command - QUERY VM
 
I alsotried:
dsmadmc -se=instance-name -id=user-id -password=password query vm vmname
I received Unknown command - QUERY VM

To double confirm, you are running dsmc on the data mover and not the TSM server? q vm can't be run from with dsmadmc. You can query what VMs you have within dsmadmc by running `q file`. So when I query VM backups I double check the naming from within `dsmadmc` on the TSM server. I then RDP over to the Hyper visor (in our case Hyper-V), load up `dsmc.exe` and then run a query against a vm. So say `q file` shows a vm called `windowsVM` I would then run:
Code:
q vm windowsVM -detail
That would then show a detailed view of that VM.This link to IBM KB is helpful for knowing what options you have or you could run
Code:
help q vm
from within your dsmc session. I hope that's of some help!
 
I tried the command from both TSM server and DataMover, all couldn't get through. I understand "q file.." part.
The question is, under what or where, should I run q vm ? I am not so good at TSM, as detail as you could please. When I run "q vm.." under dsmadmc session, I received "Unknown command - QUERY VMM". So, how could get I get to dsmc session, if this is where I can run "q m" command from?
Thanks,
 
When I run "dsmc query vm vmname", i got message as shown previously.
 
I tried the command from both TSM server and DataMover, all couldn't get through. I understand "q file.." part.
The question is, under what or where, should I run q vm ? I am not so good at TSM, as detail as you could please. When I run "q vm.." under dsmadmc session, I received "Unknown command - QUERY VMM". So, how could get I get to dsmc session, if this is where I can run "q m" command from?
Thanks,

Can you provide me with the steps you are taking? It sounds like you are running dsmc from within dsmadmc.
 
I have already shared all I have done. PLEASE check out my previous messages.

PLEASE let me know what steps I need to go through, in order to run "q vm"? how to run dsmc? I don't know.
 
I have already shared all I have done. PLEASE check out my previous messages.

PLEASE let me know what steps I need to go through, in order to run "q vm"? how to run dsmc? I don't know.

I did read your previous post which suggested to me you logged into dsmadmc and then ran dsmc from within dsmadmc.

Apologies if you are already aware of this, dsmadmc and dsmc are two different programs. The former allows you to perform day to day admin jobs, for example, checking tapes in and out of the library, performing reclamation. dsmc is the program you use to perform backups and archives, query backups and archives and perform restores from backups and archives. You can run both of these from the TSM server its self. However to run `q vm` to query your vm backups you must run the query from dsmc on the data mover, not the TSM server itself.

So in our environment, our TSM server runs on Linux and our VMs are stored on a type 2 hypervisor which is Windows server 2012 running Hyper V. Lets look at a real-world scenario. Say I want to query when the domain controller was last backed up. I'd take the following steps:

1. SSH onto the TSM server and log in to dsmadmc to run `q file` to check the VM names. For this case, let's call the VM `DC-001`
2. Log out of dsmadmc and close my SSH session.
3. RDP onto the hypervisor what is running the VM `DC-001`. I'd then load up dsmc on the hypervisor. Since it is windows, I can find the `Backup and Archive command line program` in `C:\Program Files\Tivoli\TSM\baclient\dsmc.exe`
4. In the command line, I'd run `q vm DC-001 -detail`. This will show me the details of DC-001including the last backup on the VM. I post a link in a previous reply on this thread to IBM docs showing the different options available to you.

Note that dsmadmc is not needed to query the VM backups. When I use dsmc on the Windows hypervisor I loaded up the dsmc.exe program so I did not need to type in `dsmc q vm DC-001 -detail`.
 
Thanks, they seem helpful.
Now, If I run "dmc query vm vmname", it will receive the following. It seems the command will search for data-mover-name, not vmname. Based on information you provided, it seems related to op file. What changes should I make to opt file, or what is next?

dsmc query vm vmname
IBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
Client Version 7, Release 1, Level 6.3
Client date/time: 08/20/2018 15:39:53
(c) Copyright by IBM Corporation and other(s) 1990, 2016. All Rights Reserved.

Node Name: data-mover-name
Please enter your user id <data-mover-name>: user-id

Please enter password for user id "user-id":

ANS1357S Session rejected: Downlevel client code version
What is the version of your TSM server?

The ANS1357S could be a few things.
First might be https://www-01.ibm.com/support/docview.wss?uid=swg22009407
or
http://www-01.ibm.com/support/docview.wss?uid=swg22015517

I'm not running the latest release so I cannot comment from personal experience, but if I recall correctly: If you are using an admin ID on a 8.1.2.x or higher client, you cannot use that admin id from a lower client (see links above).

Also, may help to have your dsmc.exe call your datamover optfile, that way you don't have to enter node names/user ids. You come in directly as the datamover client. You can specify optfile with the -opt=/path/to/dsm.opt
Code:
c:\Program Files\Tivoli\TSM\baclient>dsmc.exe -optfile=c:\tsm\cfg\vmdsm.opt
IBM Spectrum Protect
Command Line Backup-Archive Client Interface
  Client Version 8, Release 1, Level 0.0
  Client date/time: 08/21/2018 09:28:34
(c) Copyright by IBM Corporation and other(s) 1990, 2016. All Rights Reserved.

Node Name: xxxxxxxxx-DATAMOVER01
Session established with server TSM: AIX
  Server Version 7, Release 1, Level 7.0
  Server date/time: 08/21/2018 09:28:34  Last access: 08/21/2018 09:28:20

Accessing as node: xxxxxxxxxxxx-DATACENTER
Protect> q vm xxxxxxx-ws12
Query Virtual Machine for Full VM backup

 #      Backup Date       Mgmt Class  Size         Type   A/I Virtual Machine
---  -------------------  ----------  -----------  ------ --- ---------------
  1  08/21/2018 03:22:31  32D-MC        136.72 GB  IFINCR  A  xxxxxxx-ws12


Hope the above helps.
 
Finally, I got it work. Thank you all!

Now, a follow-up. why when I run "q vm", it only outputs a few VM's. I am expecting it should result in all VM's being backed up. We have several DM nodes, I tried all options.

Which command could list VM's being backed up, if not "q vm"?
 
You have to login as each data mover one by one and query the VMs that this data mover backs up.

If you want a complete list of all the VMs from all the data movers, go in the Operation Center, on the Overview page, click on Virtual Machines:
1534953300834.png
 
I might be missing something here. I have several TSMDM option files. Used the same command several times on several option files as below:
dsmc -optfile=/opt/tivoli/tsm/client/ba/bin/dsm.TSMDM0*.opt

They came out only a few VM's in total, versus there should be a lot of VM's being backed up, as I know.

What could go wrong? and what other commands can I use to list all VM's

I would like to use commands instead of GUI.

Thank you all for your patience.
 
dsmc -optfile=/opt/tivoli/tsm/client/ba/bin/dsm.TSMDM0*.opt
You can't pass multiple option files to dsmc. By using a wildcard, it would use the first one it finds and ignores the rest.
You need to do:
dsmc -optfile=/opt/tivoli/tsm/client/ba/bin/dsm.TSMDM01.opt
dsmc -optfile=/opt/tivoli/tsm/client/ba/bin/dsm.TSMDM02.opt
dsmc -optfile=/opt/tivoli/tsm/client/ba/bin/dsm.TSMDM03.opt
dsmc -optfile=/opt/tivoli/tsm/client/ba/bin/dsm.TSMDM0n.opt
 
My bad, I didn't really use the wildcard in my command. Commands you listed were exactly ones I ran one by one.

So, total vm's I got from all commands are only a few VM's. Any idea?
 
It should list all the VMs backed up for that node.

On the server, do you see more if you look at the filespaces?
select * from filespaces where FILESPACE_TYPE='API:TSMVM'
q fi * \VM*
 
You have to login as each data mover one by one and query the VMs that this data mover backs up.

Not sure if it would help vkky2k, but how I have it set up is:
datamover01 has a proxynode target of data_center_name
datamover02 has a proxynode target of data_center_name
Then the data_center_name has proxynode agents for datamover01 and 02.
So all vm's are backed up under the filespace of the data_center_name.
That allows me to pass asnodename=data_center_name in the dsm.opt file of all datamovers and query any vm backed up.

Everyone's environment is different, but I found that works well for us. I can go into more detail if anyone wishes about the above setup. I'm not saying its great, or even right by any means. Just found that it works pretty well for our needs.
 
Back
Top