VMware

Jonathan Marrott's VM Scripting Blog

A swell blog containing some of the scripts I have written for VM management.

22 Posts 1 2 Previous Next
0

SSH - Enable for Root

Posted by froboy Sep 28, 2007

Here is a quick 2 line change to enable ssh for root.

cp /etc/ssh/sshd_config /etc/ssh/sshd_config.orig
sed 's/PermitRootLogin no/PermitRootLogin yes/' /etc/ssh/sshd_config > /etc/ssh/sshd_config

If you want the changes immediately before a reboot also execute:
service sshd restart

Again, very handy in kickstart.

0 Comments Permalink
0

One of the initial issues I had with Virtual Center is that it did not always show the correct firewall settings. The command esxcfg-firewall seemed to be the authority on open ports. By executing 'service mgmt-vmware restart' at the command prompt it syncs up VC with esxcfg-firewall. If you decide to script this and plan on having commands after this, you will want to add a 'sleep 20' command on the next line so that the VM management service has a chance to finish the sync.

0 Comments Permalink
1

VmPerl - Auto Install

Posted by froboy Sep 28, 2007

I hacked the installation script for VmPerl so it would auto-install with the defaults. Have fun!

1 Comments Permalink
0

TSM - Application Installation

Posted by froboy Sep 28, 2007

TSM v5.4.1.0 Installation
1. Execute: rpm -ivh TIVsm-API.i386.rpm
2. Execute: rpm -ivh TIVsm-BA.i386.rpm
3. Create/edit config files.

Configuration
The way I like to do it is to copy my config files from a static source and then edit them on the fly with a few replace commands. This facilitates kickstart deployment. I have included my sample config files below.

Commands to execute for tsm server and node replacement
sed -i.old -e 's/tcpserveraddr tsm1/tcpserveraddr tsm3/g' /opt/tivoli/tsm/client/ba/bin/dsm.sys
sed -i -e 's/nodename yourvm-bu/nodename vm01-bu/g' /opt/tivoli/tsm/client/ba/bin/dsm.sys

Included files:
dsm.sys - Base config file for TSM on ESX
dsm.opt - Base config file. Not typically used on ESX but included just to be safe.
inclexcl - Include/exclude file. This dynamically changes with my TSM backup script.

0 Comments Permalink
0

TSM - First Run Script

Posted by froboy Sep 28, 2007

When running TSM for the first time on ESX, you are prompted for a username and password. Here is a script to auto answer the first run questions. It assumes that the dsm.sys file exists and is correct. It also assumes that the node has been created on the TSM server.

I would recommend this script if you wish to auto-configure TSM during kickstart.

Requirements:
TSM Configured
perl module IO::Tty
perl module Expect.pm

0 Comments Permalink
2

TSM - Backup Script

Posted by froboy Sep 28, 2007

Here is a TSM backup Script that I automate on each of my servers. I actually run this off of a mount.

tsmex and tsmvm.pl should be in the same directory.

tsm is a cron job file that goes in /etc/cron.d. After copying execute the following statements:
chmod 0644 /etc/cron.d/*
service crond restart

2 Comments Permalink
0

NTP - Server Script

Posted by froboy Sep 28, 2007

Here is a simple way to change you NTP settings. I have found this perl script handy to run during kickstart. Open the script and replace ntp1.yourserver.com and ntp2.yourserver.com with your NTP servers.

0 Comments Permalink
1 2 Previous Next
Click to view froboy's profile Member since: Jun 26, 2006

A swell blog containing some of the scripts I have written for VM management.

View froboy's profile

Communities