Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 252940

Installation notes for small vSphere cluster

$
0
0

We just completed an upgrade from vSphere/ESX 4.1 to ESXi 5.1.  Under 4.1 we used VCB with NetBackup (7.1, I believe).  We had purchased NetBackup Enterprise client licenses for some of the ESX servers (four of the six), and our reseller had led us to believe that we would only need ONE Enterprise license under ESX 5.1, as a single ESX host could act as the backup host for the entire cluster.  When Symantec informed us otherwise, and also mentioned that three of our existing licenses needed to be upgraded (incorrect tier), and that the price would be $10k to get started and then $3500/year for updates/support in subsequent years, we went shopping.

 

We ended up finding ghettoVCB, and so far it is really everything we need.

 

As mentioned, we currently have six ESXi 5.1 servers.  The systems use either NFS storage servers or Fibre Channel.  We have a very cost effective secondary storage array that serves up NFS from a very large ZFS pool...we use this for the ghettoVCB backups, which we eventually spin off to tape.  We created a VIB file to persistantly enable emailing logs (firewall hole).  Once the VIB is created you need to run a couple of commands to install it:

esxcli software acceptance set --level=CommunitySupported
esxcli software vib install -v /vmfs/volumes/NFS:deadspace:disk0/smtp-firewall-1.0.x86_64.vib

 

You also need to enable the ESXi shell and SSH on each host.  I did this in the vSphere client (under the Configuation tab, then Security Profile, then Services/Properties...).  When you do that, vSphere will show a host warning about the ESXi shell being enabled, which you can disable in the Advanced Settings section of the Software section in the Configuration tab (last entry in UserVars, which is UserVars.SuppressShellWarning, set this to 1).

 

 

I run the backups from a cron job on a Unix/Linux host.  The script is very basic:

 

 

#!/bin/bash

ssh -i /.ssh/esxi/ghettoVCB-esxi host1 < /dev/null > /dev/null 2>&1

ssh -i /.ssh/esxi/ghettoVCB-esxi host2 < /dev/null > /dev/null 2>&1

ssh -i /.ssh/esxi/ghettoVCB-esxi host3 < /dev/null > /dev/null 2>&1

ssh -i /.ssh/esxi/ghettoVCB-esxi host4 < /dev/null > /dev/null 2>&1

ssh -i /.ssh/esxi/ghettoVCB-esxi host5 < /dev/null > /dev/null 2>&1

ssh -i /.ssh/esxi/ghettoVCB-esxi host6 < /dev/null > /dev/null 2>&1

 

The cron job simply runs this script at the desired time:

 

0 18 * * 2 /usr/local/etc/ghettoVCB-run

 

The final piece is setting up a private SSH key to run the actual job.  To do that, you need to create a key for OpenSSH and install that in the authorized_keys file on each ESXi host (in the /etc/ssh/keys-root folder).  The private key is the one specified in the script above (-i), and the public key goes in the file.  The entire thing ends up on one line and will end up looking like this:

 

 

command="/vmfs/volumes/NFS:deadspace:disk0/ghettoVCB.sh -g /vmfs/volumes/NFS:deadspace:disk0/ghettoVCB.conf -a > /dev/null",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-dss SSH_KEY_HERE root@cronhost

 

We use a ghettoVCB configuration file (specified above) so that all the ESXi hosts are configured the same, and the backup repository is on the same server as the scripts (VM_BACKUP_VOLUME is /vmfs/volumes/NFS:deadspace:disk0/backups).  There is also a basic install script to run the esxcli commands and install the authorized_keys file on the same volume.

 

One of the nice features of doing it this way is that you can vMotion any VM between hosts and they are simply backed up.

 

 

I just wanted to try to summarize some of this to make it easier for others to make use of this very useful script.  Thanks to everyone that has contributed!

 


Viewing all articles
Browse latest Browse all 252940

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>