Friday 28 September 2012

XenServer - Technical Master Class 101

Another Citrix webinar covering XenServer can be found here - you will have to login to view.

When I first heard the presenters I thought Mark and Lard had found new jobs with Citrix (BBC Radio 1 in the early Noughties)

XenApp - Desktop Virtualisation for VMware vSphere

I was lucky enough (management buy) to listen to a Citrix webcast during work hours which covered XenApp deployment on VMware vSphere.

It covered some tips and tricks to get better performance out of XenApp and one of the speakers was Elias Khnaser who is a CTP and vExpert.

Webcast can be found here - you will have to register to watch it

Thursday 27 September 2012

VMware - RVTools 3.4 (new release)

Just read that the latest release of the excellent RVTools is available and can be found here.

Produces really good reports that can be exported to Excel and CSV - I've been using it in its various forms since 2008.

The Health tab is very useful as it warns you about Zombie VMDK files, VM Tools being out of date, Disks running out of space, inconsistent folder names, etc, etc.

Zombie VMDK files are interesting in the fact that they may, or may not, be still linked to the Guest still. Personally I've found a load of former snapshot files which have become "lost" in the system i.e. snapshot manager doesn't state there are any outstanding for the Guest so I remove them. You can always move them first before deleting on the safe side to see if there are any adverse reactions from the Guest!

Additional information about Zombies can be found on the Communities Forum (feedback to a question)


Friday 21 September 2012

Script - BE patching script

If you've read the previous blogs for the u10 BE patching process you'll know it is a bit long winded - so I've tried my hand a little bash scripting. It has been tried out on a test box and it works.....

The error handling isn't exactly what I want and therefore the script will be subject to change.

u10 upgrade script (updater)

#!/usr/bin/ksh
# Bash script for Solaris patching
# To be stored in /usr/local/sbin for Systems Administrator

# Prior to running script make sure enough free space is available on the target server.
# Enough space is required for:
# Patch bundle - 2Gb
# Extracted patch bundle - 4Gb
# BE patches - 20Mb
# New boot environment - 6Gb

clear
df -h
sleep 5

# Mount the NFS patch area
clear
if mount | grep /mp > /dev/null; then
    echo "/mp already mounted"
    sleep 3
    else
    if [ -d "/mp" ]; then
        mount -F nfs <mount_point> /mp  || { echo "Mount command failed"; sleep 3; exit 1; }
        echo "mounted sol_nfs_patch"
        sleep 3
        else
        mkdir /mp || { echo "Create /mp directory failed"; sleep 3; exit 1; }
        mount -F nfs <mount_point> /mp || { echo "Mount command failed"; sleep 3; exit 1; }
        echo "created /mp and mounted sol_nfs_patch"
        sleep 3
    fi
fi

clear
# check if /cpu folder exists, if not create
if [ -d "/cpu" ]; then
    echo "/cpu directory already exists"
    sleep 3
    else
    mkdir /cpu  || { echo "create /cpu failed"; sleep 3; exit 1; }
    echo "created directory /cpu"
    sleep 3
fi

clear
# Choose from available patches
ls /mp/cpu
echo "Choose a CPU: "
read CPU
clear
echo "$CPU is the file you have chosen"

clear
# Copy recommended zip file over to /cpu
if [ -f "/cpu/$CPU" ]; then
    echo "File already exists in /cpu"
    sleep 3
    else
    echo "Copying $CPU to /cpu"
    cp /mp/cpu/$CPU /cpu || { echo "Failed to copy $CPU file"; sleep 3; exit 1; }
    echo "Copied $CPU file to /cpu"
    sleep 3
fi

# unzip the CPU file
cd /cpu
unzip /cpu/$CPU || { echo "Failed to unzip $CPU file"; sleep 3; exit 1; }

# free space up on local server by removing zip file
if [ ! -f "/cpu/$CPU" ]; then
    echo "$CPU file not found"  
    sleep 3
    else
    cd /cpu
    rm $CPU || { echo "Unable to delete $CPU"; sleep 3; exit 1; }
    echo "$CPU file removed"
    sleep 3
fi

# The unzipped directory is
UDIR=$(ls -t /cpu | head -1)
echo "Unzipped directory is /cpu/$UDIR"
sleep 3

# Run pre-resquisite patchset install on existing BE
echo "Installing pre-resquisite patchset"
sleep 3
cd /cpu/$UDIR
./installcluster --apply-prereq --s10patchset || { echo "Unable to apply-prereq"; sleep 3; exit 1; }

# Create BE
echo "Creating a new BE called $UDIR"
sleep 3
lucreate -n $UDIR || { echo "Unable to create $UDIR BE"; sleep 3; exit 1; }
lustatus
sleep 3

# patch created BE
echo "Patching $UDIR BE"
sleep 3
luupgrade -n $UDIR -s /cpu/$UDIR/patches/ -t `cat /cpu/$UDIR/patch_order` || { echo "Patch of BE failed"; sleep 3; exit 1; }
echo "Script finished"
sleep 3
exit 0

Friday 7 September 2012

AIX - version and patch level

I had to look at a AIX server recently and had to look around to web to find out how I would find out what version and patch level it was at.

To see what the OS version is:
# oslevel

To see what the OS version and maintenance level
# oslevel -g
 Maintenance Level and Service Pack
# oslevel -s



5300 = AIX version
05 = Maintenance Level
00 = Service Pack

NOTE: I'm assuming the information I gathered from the web is correct along with my interpretation of it!