I recently needed to update an ESXi 4.0 host to ESXi 4.1. After discovering that the host update utility was not supported with ESXi 4.1, I resorted to my other option, the vSphere CLI.
Here's the session (on Windows 7 64bit):
C:\Program Files (x86)\VMware\VMware vSphere CLI>bin\vihostupdate.pl --server my_server -b upgrade-from-ESXi4.0-to-4.1.0-0.0.260247-release.zip -i
The output:
Please wait patch installation is in progress ...
The update completed successfully, but the system needs to be rebooted for the changes to be effective.
Followed by a reboot:
C:\Program Files (x86)\VMware\VMware vSphere CLI> bin\vicfg-hostops.pl --server my_server -o reboot
Host my_server rebooted successfully.
Friday, August 27, 2010
Wednesday, August 11, 2010
Netgear GSM Switches and LAGs/Port channels
Setting up port-channels/lags is pretty easy on Netgear GSM switches. In this example, we are assuming that we are connecting two Netgear GSM7324 switches, and adding vlan 10 to them. We'll link together ports 23 and 24 on both switches.
1. create the interface:
configure
port-channel lag_01
2. assign it to two ports:
configure
interface range 0/23-0/24
addport 1
3. Allow VLAN 10 and 1 to travel over it. Require them both to be tagged:
configure
interface lag 1
vlan participation include 1
vlan tagging 1
vlan participation include 10
vlan tagging 10
1. create the interface:
configure
port-channel lag_01
2. assign it to two ports:
configure
interface range 0/23-0/24
addport 1
3. Allow VLAN 10 and 1 to travel over it. Require them both to be tagged:
configure
interface lag 1
vlan participation include 1
vlan tagging 1
vlan participation include 10
vlan tagging 10
Friday, July 30, 2010
New Console Game Out...
This is a fake game cover I made for a friend. Not computer related, but since no one reads this blog anyway, who cares?
Wednesday, June 23, 2010
Trouble sending out email from Bacula 5.0.2 and CentOS 5.5
I recently noticed that Bacula installations on CentOS 5.x (primarily 5.5) boxes were not sending out email after job completion. It was baffling as bsmtp worked fine on the command line... at least when I ran it as root. I tried running it as the bacula user (my Bacula director runs as the Bacula user, not root) and it failed:
$ su - bacula -s "/usr/sbin/bsmtp"
-bsmtp: error while loading shared libraries: libbac-5.0.1.so: cannot open shared object file: Permission denied
Ah... I checked the file permissions:
ls -la /usr/lib/libbac-5.0.1.so
-rwxr-x--- 1 root root 330240 Jun 22 12:46 /usr/lib/libbac-5.0.1.so
Simple fix:
chmod o+r /usr/lib/libbac-5.0.1.so
On 64 bit CentOS/Rhel, it will be /usr/lib64/libbac-50.0.1.so
I'm guessing that there was a problem in the spec file (I built it from an srpm.)
$ su - bacula -s "/usr/sbin/bsmtp"
-bsmtp: error while loading shared libraries: libbac-5.0.1.so: cannot open shared object file: Permission denied
Ah... I checked the file permissions:
ls -la /usr/lib/libbac-5.0.1.so
-rwxr-x--- 1 root root 330240 Jun 22 12:46 /usr/lib/libbac-5.0.1.so
Simple fix:
chmod o+r /usr/lib/libbac-5.0.1.so
On 64 bit CentOS/Rhel, it will be /usr/lib64/libbac-50.0.1.so
I'm guessing that there was a problem in the spec file (I built it from an srpm.)
Sunday, May 23, 2010
Bacula Windows Client and error 1067
I recently ran into an error starting the bacula-fd service on a windows client: error 1067. I looked it up... several people had this error, but no resolution. I looked at the application log on the windows client, but there was no bacula message.
To figure it out, I started the bacula-fd.exe file by hand from a command prompt. It gave the full error message (I had a minor typo in the bacula-fd.conf file.)
I corrected the typo and was able to successfully start the service.
Coincidentally, a useful one liner for bconsole on Linux:
watch -n 1 --differences "echo status 2 2 | bconsole | \
grep 'Files=' | sed -e 's/ */ /g' | cut -f 3 -d \" \""
In this case, my storage device is #2. It produces out put like this (every second):
Every 1.0s: echo status 2 2 | bconsole | grep 'Files=' | sed -e 's/ */ /g' | cut -f 3 -d " " Sun May 23 00:45:54 2010
Bytes=1,765,498,476
watch -n 1 --differences "echo status 2 2 | bconsole | \
grep 'Files=' | sed -e 's/ */ /g' | cut -f 3 -d \" \""
In this case, my storage device is #2. It produces out put like this (every second):
Every 1.0s: echo status 2 2 | bconsole | grep 'Files=' | sed -e 's/ */ /g' | cut -f 3 -d " " Sun May 23 00:45:54 2010
Bytes=1,765,498,476
Unfortunately, this won't work on FreeBSD as the watch command from ports has different syntax.
Thursday, April 29, 2010
Removing the Request Tracker (RT) Subject Prefix
I have an installation of Request Tracker that I use at work to manage helpdesk tickets, assets, projects, and other things. I recently added a support queue for the customer services people. They're using another program to actually manage the cases, but want to use RT for the auto responder.
That's not a big deal, of course. The problem was the RT subject header. You can modify the template subject as you wish, but you can never get rid of the RT name prefix:
[So and So's support queue #233] Autoreply: I need help on this problem
Since the support people are using another program to manage the cases, they didn't want to confuse users with an RT ticket number. Once the user sends in his or her email and the support team creates a case in the other package, the ticket will be closed. The requestor will receive only the autoreply from RT, and the rest of the correspondence will be through the other system.
I could not figure a way to leave off the prefix without affecting all the queue. I searched through the code and found the least invasive hack:
In the Interface::Email::SendEmail method... here's a diff:
Notice that it only affects messages sent out as Autoreply (i.e., responding to a Scrip creation event.) I could have been more sophisticated and added a custom field to the queues, and modified the actual Autoreply routine to look up the value... but I consider this to be a one off, and this was the simplest modification. I suppose I didn't absolutely need a temp variable, but I put one in anyway.
That's not a big deal, of course. The problem was the RT subject header. You can modify the template subject as you wish, but you can never get rid of the RT name prefix:
[So and So's support queue #233] Autoreply: I need help on this problem
Since the support people are using another program to manage the cases, they didn't want to confuse users with an RT ticket number. Once the user sends in his or her email and the support team creates a case in the other package, the ticket will be closed. The requestor will receive only the autoreply from RT, and the rest of the correspondence will be through the other system.
I could not figure a way to leave off the prefix without affecting all the queue. I searched through the code and found the least invasive hack:
In the Interface::Email::SendEmail method... here's a diff:
diff -ru Email.pm /usr/local/lib/perl5/site_perl/5.8.9/RT/Interface/Email.pm
--- Email.pm 2009-10-19 15:55:31.000000000 -0400
+++ /usr/local/lib/perl5/site_perl/5.8.9/RT/Interface/Email.pm 2010-04-29 17:34:52.000000000 -0400
@@ -308,6 +308,7 @@
=cut
sub SendEmail {
+
my (%args) = (
Entity => undef,
Bounce => 0,
@@ -315,6 +316,7 @@
Transaction => undef,
@_,
);
+
foreach my $arg( qw(Entity Bounce) ) {
next unless defined $args{ lc $arg };
@@ -329,6 +331,13 @@
my $msgid = $args{'Entity'}->head->get('Message-ID') || '';
chomp $msgid;
+#### 4.29.2010 - custom hack to skip ticket number on support queue
+my $tSub = $args{'Entity'}->head->get('Subject');
+if ($tSub =~ m/^\[MyCompany's Customer Support queue #[0-9]+\] (AutoReply:.*)$/) {
+ $args{'Entity'}->head->set('Subject' => "[MyCompany's Customer Support queue] $1");
+}
+#### end custom hack
+
# If we don't have any recipients to send to, don't send a message;
unless ( $args{'Entity'}->head->get('To')
Notice that it only affects messages sent out as Autoreply (i.e., responding to a Scrip creation event.) I could have been more sophisticated and added a custom field to the queues, and modified the actual Autoreply routine to look up the value... but I consider this to be a one off, and this was the simplest modification. I suppose I didn't absolutely need a temp variable, but I put one in anyway.
Monday, April 26, 2010
OpenBSD, Dual Gateways, and redirects
I wanted to allow users to ssh to an sftp server, but using the secondary ISP connection. The SFTP server is in a DMZ (actually, in this case, it's a VLAN off an internal NIC.) This is with OpenBSD version 4.4.
#As usual, we need to set up the pf.conf file so that NATing happens on both interfaces:
nat on $ext_if from !($ext_if) to ! -> ($ext_if:0)
nat on $ext_if2 from !($ext_if2) to ! -> ($ext_if2:0)
# here's the actual redirect
rdr pass on $ext_if2 proto tcp from any to ($ext_if2:0) port 40000 \
-> $sftp port 22
# I haven't tried this with 4.6 or later... anyway, keep state appears
# to break things, as later packets go out the primary ISP connection
# ($ext_if, not $ext_if2)
pass out on $dmz3_if proto tcp from any to $sftp port 22 no state
pass in on $dmz3_if route-to ($ext_if2 $gateway2) proto tcp from \
$sftp port 22 to any no state
It works for me.
#As usual, we need to set up the pf.conf file so that NATing happens on both interfaces:
nat on $ext_if from !($ext_if) to !
nat on $ext_if2 from !($ext_if2) to !
# here's the actual redirect
rdr pass on $ext_if2 proto tcp from any to ($ext_if2:0) port 40000 \
-> $sftp port 22
# I haven't tried this with 4.6 or later... anyway, keep state appears
# to break things, as later packets go out the primary ISP connection
# ($ext_if, not $ext_if2)
pass out on $dmz3_if proto tcp from any to $sftp port 22 no state
pass in on $dmz3_if route-to ($ext_if2 $gateway2) proto tcp from \
$sftp port 22 to any no state
It works for me.
Subscribe to:
Posts (Atom)