===== TSM Data Protection for Virtual Environment v7 on Linux =====
For info:\\
If you only want to backup VM using command line, and not schedule, VMCLI config is not needed. VMCLI node is used by TDP for VE GUI
Install Centos 6.4 x64 minimal Desktop OS (base OS installation)
=== Disable Log4J ===
Current security issue, with Log4J. As workaround disable it
export LOG4J_FORMAT_MSG_NO_LOOKUPS=true
=== Disable SElinux ===
Required, else nothing will work
> cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disable
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
#SELINUXTYPE=targeted
=== Disable firewall ===
[root@luittdpve ~]# echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
[root@luittdpve ~]# echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6
[root@luittdpve ~]# /etc/rc.d/init.d/iptables stop
[root@luittdpve ~]# /etc/rc.d/init.d/ip6tables stop
[root@luittdpve ~]# chkconfig iptables off
[root@luittdpve ~]# chkconfig ip6tables off
=== Disable IPV6 ===
Optional
[root@luittdpve ~]# vi /etc/modprobe.d/disable-ipv6.conf
install ipv6 /bin/true
[root@luittdpve ~]# vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=luittdpve
GATEWAY=192.168.0.1
[root@luittdpve ~]# echo “net.ipv6.conf.all.disable_ipv6 = 1″ >> /etc/sysctl.conf
Reboot
=== Install TSM BA client ===
[root@luittdpve bacli]# rpm -Uhv gskcrypt64-8.0.14.28.linux.x86_64.rpm gskssl64-8.0.14.28.linux.x86_64.rpm
[root@luittdpve bacli]# rpm -Uhv TIVsm-API64.x86_64.rpm TIVsm-BA.x86_64.rpm
It also recommended to install CIT package, to collect host information: CPU, OS, PVU...
[root@luittdpve bacli]# yum install libgcc.i686
[root@luittdpve bacli]# yum install libstdc++.i686
[root@luittdpve bacli]# yum install compat-libstdc++-33.x86_64
[root@luittdpve bacli]# yum install compat-libstdc++-33.i686
[root@luittdpve bacli]# rpm -Uhv TIVsm-APIcit.x86_64.rpm TIVsm-BAcit.x86_64.rpm
=== Install TSM TDP for Virtual Environment v7 ===
I have installed VNC server to te able to connect using graphical environment.
Prerequisite:
[root@luittdpve ~]# yum install tigervnc-server.x86_64
[root@luittdpve ~]# yum install glibc.i686
[root@luittdpve ~]# yum install fuse-libs.x86_64 fuse.x86_64
Start a graphical interface (vncserver :1).
Install TDP for VE:
[root@luittdpve ~]# cd /soft/CD/Linux/DataProtectionForVMware
[root@luittdpve DataProtectionForVMware]# ./install-Linux.bin -DLICENSE_ACCEPTED=TRUE
Just follow the steps
Check all installed components (only for information):
[root@luittdpve bin]# /usr/ibm/common/acsi/bin/de_lsrootiu.sh
InstanceID[IU,FBJRE,mrid:http://w3.ibm.com/namespaces/2003/OS_componentTypes:Operating_System,6.0.0.6,/opt/tivoli/tsm/tdpvmware,13479DD2941344CCABF4E4FFF58987E8]
13479DD2941344CCABF4E4FFF58987E8
FBJRE
6.0.0.6
mrid:http://w3.ibm.com/namespaces/2003/OS_componentTypes:Operating_System
/opt/tivoli/tsm/tdpvmware
InstanceID[IU,TDPVMwareGUI,mrid:http://w3.ibm.com/namespaces/2003/OS_componentTypes:Operating_System,7.1.0.657,/opt/tivoli/tsm/tdpvmware,2DB5517644B94A88A5A11EB351411577]
2DB5517644B94A88A5A11EB351411577
TDPVMwareGUI
7.1.0.657
mrid:http://w3.ibm.com/namespaces/2003/OS_componentTypes:Operating_System
/opt/tivoli/tsm/tdpvmware
InstanceID[IU,TDPVMwareMount,mrid:http://w3.ibm.com/namespaces/2003/OS_componentTypes:Operating_System,7.1.0.657,/opt/tivoli/tsm/tdpvmware,9C0C30FE3F524FAF94505495ACA760F4]
9C0C30FE3F524FAF94505495ACA760F4
TDPVMwareMount
7.1.0.657
mrid:http://w3.ibm.com/namespaces/2003/OS_componentTypes:Operating_System
/opt/tivoli/tsm/tdpvmware
InstanceID[IU,JavaHelp,mrid:http://w3.ibm.com/namespaces/2003/OS_componentTypes:Operating_System,1.0.0.0,/opt/tivoli/tsm/tdpvmware,BE23B87E95544C9FB2CD5A220FB8BCE3]
If you are on a VM install VMware Tools
=== Configure TDP for VE ===
Now connect to the TDP for VE using a web browser:
https://:9081/TsmVMwareUI
=== Configure backup client for DataMover ===
Create a dsm.opt file (trace can be uncommented in case of trouble)
[root@luittdpve ~]# cd /opt/tivoli/tsm/client/ba/bin
[root@luittdpve bin]# cat dsm.opt
SERVERNAME TSMPRD_DM
*traceflag vm enter exit options
*tracefile vmbackup.trc
Create a dsm.sys file
[root@luittdpve ~]# cd /opt/tivoli/tsm/client/ba/bin
[root@luittdpve bin]# cat dsm.sys
SERVERNAME TSMPRD_DM
PASSWORDACCESS GENERATE
TCPSERVERADDRESS 10.5.5.3
TCPPORT 1500
COMMMETHOD TCPIP
NODENAME VMPRD_LUXEMBOURG_DM
ERRORLOGNAME "/opt/tivoli/tsm/client/ba/bin/dsmerror.log"
ERRORLOGRETENTION 30 D
SCHEDLOGNAME "/opt/tivoli/tsm/client/ba/bin/dsmsched.log"
SCHEDLOGRETENTION 7 D
MANAGEDSERVICES WEBCLIENT SCHEDULE
SCHEDMODE PROMPTED
*DOMAIN.VMFULL "ALL-WINDOWS;"
VMCUSER root * On a Vcenter appliance under Linux
VMCHOST vc
REVOKEREMOTEACCESS NONE
INCLUDE.VMTSMVSS compta * VM compta will be snapshoted using Windows VSS, for example if you use MSSQL
INCLUDE.VMTSMVSS postgres * VM postgres will use LVMsnapshot on linux
QUERYSCHEDPERIOD 1
RETRYPERIOD 1
MAXCMDRETRIES 5
*VMMC "STANDARD"
*VMCTLMC "STANDARD"
VMPROCESSVMWITHPRDM yes
VMPROCESSVMWITHINDEPENDENT yes
VMENABLETEMPLATEBACKUPS yes
VMMAXPARALLEL 30
VMLIMITPERHOST 5
VMVSTORTRANSPORT "HOTADD:NBDSSL:NBD"
VMLIMITPERDATASTORE 5
[root@luittdpve ~]# cd /opt/tivoli/tsm/client/ba/bin
[root@luittdpve bin]# dsmc
IBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
Client Version 7, Release 1, Level 0.0
Client date/time: 11/07/2013 10:53:28
(c) Copyright by IBM Corporation and other(s) 1990, 2013. All Rights Reserved.
Node Name: VMPRD_LUXEMBOURG_DM
Please enter your user id :
Please enter password for user id "VMPRD_LUXEMBOURG_DM":
Session established with server TSMSRV: AIX
Server Version 6, Release 3, Level 4.200
Server date/time: 11/07/2013 10:53:35 Last access: 11/07/2013 10:32:16
tsm> quit
[root@luittdpve bin]# dsmc -asnode=VMPRD_LUXEMBOURG
IBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
Client Version 7, Release 1, Level 0.0
Client date/time: 11/07/2013 10:53:58
(c) Copyright by IBM Corporation and other(s) 1990, 2013. All Rights Reserved.
Node Name: VMPRD_LUXEMBOURG_DM
Session established with server TSMSRV: AIX
Server Version 6, Release 3, Level 4.200
Server date/time: 11/07/2013 10:54:05 Last access: 11/07/2013 10:53:44
Accessing as node: VMPRD_LUXEMBOURG
tsm>
[root@luittdpve bin]# cat dsmwebcl.log
11/07/2013 10:55:25 (dsmcad) IBM Tivoli Storage Manager
11/07/2013 10:55:25 (dsmcad) Client Acceptor - Built Oct 7 2013 13:55:17
11/07/2013 10:55:25 (dsmcad) Version 7, Release 1, Level 0.0
11/07/2013 10:55:25 (dsmcad) ANS3000I TCP/IP communications available on port 55111.
11/07/2013 10:55:25 (dsmcad) Dsmcad is working in Webclient Schedule mode.
11/07/2013 10:55:25 (dsmcad) ANS3000I HTTP communications available on port 1581.
11/07/2013 10:55:25 (dsmcad) Command will be executed in 1 minute.
11/07/2013 10:55:49 (dsmagent) IBM Tivoli Storage Manager
11/07/2013 10:55:49 (dsmagent) Remote Client Agent - Built Oct 7 2013 13:54:42
11/07/2013 10:55:49 (dsmagent) Version 7, Release 1, Level 0.0
11/07/2013 10:55:49 (dsmagent) ANS3002I Session started for user VMPRD_VMCLI (TCP/IP 10.10.3.87).
11/07/2013 10:55:49 (dsmagent) ANS8809E The LD_LIBRARY_PATH is either not set or is set incorrectly. Ensure that the LD_LIBRARY_PATH environment variable contains the installation directory /opt/tivoli/tsm/client/ba/bin.
[root@luittdpve bin]# cat dsmerror.log
11/07/2013 10:55:49 ANS9331W VMware vCenter or ESX Server userid and password for VMC Host VMC Userid <> could not be read from encrypted pwd file.
11/07/2013 10:55:49 ANS8809E The LD_LIBRARY_PATH is either not set or is set incorrectly. Ensure that the LD_LIBRARY_PATH environment variable contains the installation directory /opt/tivoli/tsm/client/ba/bin.
11/07/2013 10:55:49 ANS4152E Failure initializing VMware virtual machine environment. RC=4387. Refer to IBM Tivoli Storage Manager error log for detailed error messages.
[root@luittdpve bin]# dsmc SET PASSWORD -type=VM vc root xxxxx
IBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
Client Version 7, Release 1, Level 0.0
Client date/time: 11/07/2013 10:59:27
(c) Copyright by IBM Corporation and other(s) 1990, 2013. All Rights Reserved.
ANS0302I Successfully done.
If you plan to use snapshot VSS (on Windows), using INCLUDE.VMTSMVSS or LVMsnapshot (on Linux) then you have to set also a password for VMGUEST for each VM using the following command:
[root@luittdpve bin]# dsmc SET PASSWORD -type=VMGUEST vc root xxxxx
IBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
Client Version 7, Release 1, Level 0.0
Client date/time: 11/07/2013 10:59:27
(c) Copyright by IBM Corporation and other(s) 1990, 2013. All Rights Reserved.
ANS0302I Successfully done.
[root@luittdpve bin]# dsmc SET PASSWORD -type=VMGUEST sqlserver 'mydomain\administrator' xxxxx
It will be stored into /etc/adsm/TSM.PWD
Add into the startup script: /etc/init.d/dsmcad the line LD_LIBRARY_PATH=/opt/tivoli/tsm/client/ba/bin
#!/bin/sh
#
# (C) Copyright IBM Corporation 2011
#
# chkconfig: 35 95 5
# description: TSM Client Acceptor Daemon
#
### BEGIN INIT INFO
# Provides: dsmcad
# Required-Start: $local_fs $remote_fs $network
# Required-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: TSM Client Acceptor Daemon
# Description: Start dsmcad to enable scheduler and Web GUI.
### END INIT INFO
DSMCAD_DIR=/opt/tivoli/tsm/client/ba/bin
export JAVA_HOME=/opt/tivoli/tsm/tdpvmware/common/jre/jre
export LD_LIBRARY_PATH=$DSMCAD_DIR:$JAVA_HOME/lib/amd64/classic
export PATH=$JAVA_HOME/bin:$PATH
DSMCAD_BIN=$DSMCAD_DIR/dsmcad
......
To start automatically after reboot:
chkconfig dsmcad on
If you want to test a backup or restore VM from the datamover server, use the option asnode
dsmc -asnode=VMPRD_LUXEMBOURG
dsmj -asnode=VMPRD_LUXEMBOURG
Test the backup in preview mode:
[root@luittdpve ~]# export LD_LIBRARY_PATH=/opt/tivoli/tsm/client/ba/bin:/opt/tivoli/tsm/tdpvmware/common/jre/jre/bin/classic
[root@luittdpve ~]# dsmc -asnode=VMPRD_LUXEMBOURG
IBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
Client Version 7, Release 1, Level 0.0
Client date/time: 11/15/2013 16:41:31
(c) Copyright by IBM Corporation and other(s) 1990, 2013. All Rights Reserved.
Node Name: VMPRD_LUXEMBOURG_DM
Session established with server ARWEN: AIX
Server Version 6, Release 3, Level 4.200
Server date/time: 11/15/2013 16:41:24 Last access: 11/15/2013 16:40:45
Accessing as node: VMPRD_LUXEMBOURG
tsm> ba vm -preview *
Full BACKUP VM of virtual machines '*'.
1. vmName: LUITTDPVE
DomainKeyword: vm=*
toolsRunningStatus: guestToolsRunning toolsVersionStatus: guestToolsCurrent
consolidationNeeded: No
VMDK[1]Label: 'Hard disk 1' (Hard Disk 1)
VMDK[1]Name: '[LUITPRD_Drive_11] LUITTDPVE/LUITTDPVE.vmdk'
VMDK[1]Status: Included
2. vmName: IIT-APPLIANCE3
DomainKeyword: vm=*
toolsRunningStatus: guestToolsRunning toolsVersionStatus: guestToolsCurrent
consolidationNeeded: No
VMDK[1]Label: 'Hard disk 1' (Hard Disk 1)
VMDK[1]Name: '[LUITPRD_Drive_9] IIT-APPLIANCE3/IIT-APPLIANCE3.vmdk'
VMDK[1]Status: Included
Here is the syntax to using bash command
[root@luittdpve ~]# dsmc ba vm '*' -preview -asnodename=VMPRD_LUXEMBOURG
To list ALL VM on the Vcenter use:
[root@luittdpve ~]# export LD_LIBRARY_PATH=/opt/tivoli/tsm/client/ba/bin:/opt/tivoli/tsm/tdpvmware/common/jre/jre/bin/classic
[root@luittdpve ~]# dsmc show vm all -optfile="/opt/tivoli/tsm/client/ba/bin/dsm.opt"
=== For information, here are the TSM clients registered, and grant for a TDP for VE environment: ===
REGISTER NODE VMPRD_VMCLI ?***? domain=PRDLUX backdel=yes auth=local sslreq=no
REGISTER NODE VMPRD_VCVC ?***? domain=PRDLUX backdel=yes url=https://xx.xx.xx.xx:9081/TsmVMwareUI
REGISTER NODE VMPRD_LUXEMBOURG ?***? domain=PRDLUX backdel=yes maxnummp=20
REGISTER NODE VMPRD_LUXEMBOURG_DM ?***? domain=PRDLUX backdel=yes
GRANT PROXYNODE target=VMPRD_VCVC agent=VMPRD_VMCLI
GRANT PROXYNODE target=VMPRD_LUXEMBOURG agent=VMPRD_VMCLI,VMPRD_LUXEMBOURG_DM
GRANT PROXYNODE target=VMPRD_VCVC agent=VMPRD_LUXEMBOURG
The best way to schedule VM backup, is using the Web interface, but it's also possible in TSM command line:\\
Sample of schedule:
tsm: TSMPRD>q sched PRD TEST_VM2 f=d
Session established with server TSMPRD: AIX
Server Version 6, Release 3, Level 4.200
Server date/time: 11/08/13 16:25:13 Last access: 11/08/13 16:24:49
Policy Domain Name: PRD
Schedule Name: TEST_VM2
Description:
Action: Backup
Subaction: VM
Options: -vmfulltype=vstor -vmbackuptype=fullvm -asnodename=VMPRD_LUXEMBOURG -domain.vmfull="VM=HMCv7" -MODE=IFIncremental
Objects:
Priority: 5
Start Date/Time: 11/08/13 15:30:00
Duration: 1 Hour(s)
Schedule Style: Enhanced
Period:
Day of Week: Fri
Month: Any
Day of Month: Any
Week of Month: Any
To define a TSM scheduler for the node VMPRD_LUXEMBOURG_DM, take care to the syntax:
TSM> def sched PRD TEST_VM2 act=b subact=VM options='"-vmfulltype=vstor -vmbackuptype=fullvm -asnodename=VMPRD_LUXEMBOURG -domain.vmfull="VM=HMCv7" -MODE=IFIncremental"' startt=......
=== File level restore ===
Not yet complete ..............
To use TDP mount, iscsi is required, install the following packages:
[root@luittdpve bin]# yum install iscsi-initiator-utils.x86_64
[root@luittdpve bin]# yum install lsscsi.x86_64
https://www-304.ibm.com/support/docview.wss?uid=swg21473127
==== Problem Determination ====
**Do not setup DSMI_DIR for a TDP VE client**
Why does the vmcli overwrite the existing dsm.sys configuration file?
Cause
TSMCLI module writes its own dsm.sys file on every instantiation.
TSMCLI will use DSMI_DIR, if set.
Otherwise TSMCLI will use:
/opt/tivoli/tsm/tdpvmware/tsmcli/bin64/dsm.sys
**VMCLI default location**
Default location of vmcli command :
Windows :
C:\Program Files (x86)\Common Files\Tivoli\TDPVMware\VMwarePlugin\scripts\vmcli.cmd
Linux :
/opt/tivoli/tsm/tdpvmware/common/scripts/vmcli
Default location of vmcliprofile :
Windows :
C:\Program Files (x86)\Common Files\Tivoli\TDPVMware\VMwarePlugin\scripts\vmcliprofile
Linux :
/opt/tivoli/tsm/tdpvmware/common/scripts/vmcliprofile
/home/tdpvmware/tdpvmware/config/profile
**VMCLI command line to test connection to Vcenter**
As tdpvmware user:
[tdpvmware@luittdpve ~]$ /opt/tivoli/tsm/tdpvmware/common/scripts/vmcli -f inquire
#TASK 27 backup 20131107110714806
#PARAM TASK_NAME=test_vm
#PARAM BACKUP_TYPE=TSM_IFINCR
#PARAM DATACENTER_NODE_NAME=VMPRD_LUXEMBOURG
#PARAM OFFLOAD_HOST_NAME=VMPRD_LUXEMBOURG_DM
....
**Backup the DB Apache Derby using on TDP VE plugin**
DB location: /home/tdpvmware/tdpvmware/VMCLIDB/
Journal backup DB: /home/tdpvmware/tdpvmware/VMCLIDB/BACKUP.HISTORY
DB backup location: /opt/tivoli/tsm/tdpvmware/common/derby_backups/
You can change the number of version of DB backup, the time of the backup, activate a trace to debug...
[tdpvmware@luittdpve config]$ cat /home/tdpvmware/tdpvmware/config/profile
>>> VMWARE
VCENTER_SERVER 10.5.5.2
VCENTER_SERVER_USER root
<<<
>>> VMCLI
VE_TSM_SERVER_NAME 10.5.5.3
VE_TSM_SERVER_PORT 1500
VE_TSMCLI_NODE_NAME VMPRD_VMCLI
VE_VCENTER_NODE_NAME VMPRD_VCVC
VMCLI_TRACE NO
#VE_TSM_SERVER_NAME tsmservername # -s
#VE_TSM_SERVER_PORT 1500 # -p
#VE_TSMCLI_NODE_NAME tsmclinodename # -n
#VE_VCENTER_NODE_NAME vcenternodename # -v
VE_TRACE_FILE tsmcli.trace # -x tsmcli trace file
VE_TRACE_FLAGS api api_detail # -y trace flags
#VE_DATACENTER_NAME datacentername::datacenternodename
VMCLI_TASK_EXPIRATION_TIME 864000 # in seconds, defaults to 864000s = 10 days
VMCLI_RESTORE_TASK_EXPIRATION_TIME 2592000 # in seconds, defaults to 2592000s = 30 days
VMCLI_GRACE_PERIOD 2592000 # in seconds, defaults to 2592000s = 30 days
VMCLI_SCHEDULER_INTERVAL 60 # in seconds, defaults to 1s
VMCLI_DB_HOST localhost
VMCLI_DB_PORT 1527
VMCLI_CACHE_EXPIRATION_TIME 600 # in seconds, defaults to 600s = 10 min
VMCLI_DB_NAME VMCLIDB
VMCLI_RECON_INTERVAL_FCM 600 # backend specific recon interval setting in seconds default 600s = 10 min
VMCLI_RECON_INTERVAL_TSM 1200 # backend specific recon interval setting in seconds default 1200s = 20 min
VMCLI_DB_BACKUP AT 00:00
VMCLI_DB_BACKUP_VERSIONS 3
VMCLI_LOG_DIR logs
DERBY_HOME /home/tdpvmware/tdpvmware
VE_DATACENTER_NAME Luxembourg::VMPRD_LUXEMBOURG
<<<
If you change a parameter, don't forget to restart the service:
/etc/rc.d/init.d/vmcli restart