NetScaler: Generate a simple usage statistic per Vserver

One of my co-workers recently approached me, that he needed a simple shell script which would generate a simple report about a Vserver’s current connections. After ironing out a few things with him (he had the intention of it being on a CIFS share on our file-server - which I changed to a simple HTML page) I went to work. Out came two scripts. One is the collection instance, and the other is the processing instance. First the collection script runs, finds the current HA master node and then collects the Vserver’s current connections. After that script has dumped the information (date, time, current connections) into a file, the processing script will go and create a simple HTML page that’ll show exactly those informations. ...

November 21, 2013 · 4 min · 820 words · christian

VMware templates: post-processing for SUSE Linux Enterprise Server and openSUSE

Well, I’ve been fiddling around with SLES and openSUSE VMware templates. I know it’s a stupid idea when you have a PXE server from which you could install this in a matter of minutes (seriously the SLES PXE installation takes about 5 minutes). However, when dealing with DMZ’s (yeah, they exist!) you usually don’t have any PXE servers there. So I decided to go with simple VMware templates (like we do with Windows already), but had to iron out a few kinks. ...

November 21, 2013 · 3 min · 433 words · christian

MDS9100 firmware updates - generating copy commands

Well, I went to work today … yeah, I know it’s Sunday right ? I ended up updating two MDS9148 switches and I didn’t want to figure out everything all over again. So I put the system image and kickstart onto one of our FTP servers and ran a short bash loop on it: 1 2 3 4 root:(ftp.daheim.heimdaheim.de) PWD:~ Sun Oct 20, 08:57:24 [0] > for file in `ls /srv/ftp/firmware/mds9148/*6.2.3*`; do echo "copy ftp://10.0.0.55/`echo $file | sed 's,/srv/ftp/,,'` bootflash:/`echo $file | sed 's,/srv/ftp/firmware/mds9148/,,'`" done Now that’ll generate me two lines, which in turn I can use on the MDS’n: ...

October 20, 2013 · 1 min · 108 words · christian

XenServer 6-x: Update all hosts in pool

Well, what annoyed me in the past was that I had to patch each XenServer patch by patch (no bulk applying) and when used in combination with UCS blades (especially if those have >250GB RAM), it takes ages to keep a pool up-to-date. So I ended up writing yet another script (I know why I hate Citrix XenServer … the XenCenter GUI is lacking sooooo much) which will download new patches from a directory on a HTTP server and then print the lines necessary to apply the patches to all hosts in a pool. ...

September 15, 2013 · 4 min · 690 words · christian

XenServer 6-x: Quick VM Protection Policy to VM name-label script

Well, today I ended up writing a short script that’ll give me a list of VMPPs with the VMs that are associated to it. 1 2 3 4 5 6 7 8 9 10 11 12 #!/bin/bash # Get a list of VMPPs for vmpp in `xe vmpp-list params=uuid --minimal | sed "s/,/ /g"`; do VMPP_NAME=`xe vmpp-list params=name-label uuid=$vmpp --minimal` for vm in `xe vmpp-list params=VMs --minimal uuid=$vmpp | sed -e "s/;//g" -e "s/,//g"`; do VM=`xe vm-list params=name-label uuid=$vm --minimal` echo "$VMPP_NAME: $VM" done done

September 15, 2013 · 1 min · 85 words · christian

vmware-config-tools-pl finished with Could not find Parent Node

Well, today I encountered a old problem (or so I thought). Basically a specific udevadm version causes the vmware-config-tools.pl script to error out like this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 The vmblock enables dragging or copying files between host and guest in a Fusion or Workstation virtual environment. Do you wish to enable this feature? [no] !!! [EXPERIMENTAL] !!! VMware automatic kernel modules enables automatic building and installation of VMware kernel modules at boot that are not already present. By selecting yes, you will be enabling this experimental feature. You can always disable this feature by re-running vmware-config-tools.pl. Would you like to enable VMware automatic kernel modules? [no] No X install found. Could not find Parent Node... I’ve had encountered this before in the past, and before there was some explanation on the VMware forums, which I couldn’t locate. Lucky me, the VMware Tools updater keeps modified versions of vmware-tools-config.pl around. So I ended up creating this short diff, so that I may find it in the future - if I still need it: ...

September 9, 2013 · 2 min · 247 words · christian

DiskStation 213+: LAN throughput

Well, I’ve been moving stuff to my archive NAS, and in case anyone is wondering - the DS213+ actually nearly gets to the 1GE transmission limit… It’s near the CPU limit then anyhow, but … 😄

August 25, 2013 · 1 min · 36 words · christian

XenServer 6-0-2: Fixing Root-Disk-Multipathing with Boot-from-SAN

As the title pretty much tells, I’ve been working on fixing the Root-Disk-Multipathing feature of our XenServer installations. Our XenServer boot from a HA-enabled NetApp controller, however we recently noticed that during a controller fail-over some, if not all, paths would go offline and never come back. If you do a cf takeover and cf giveback in short succession, you’ll end up with a XenServer host that is unusable, as the Root-Disk would be pretty much non-responsive. ...

July 16, 2013 · 2 min · 281 words · christian

OpenWRT on DIR-615 H1 - Port mappings

Well, I’ve been fiddling with OpenWRT to replace my crappy Vodafone Easybox 602. Up till now I had DD-WRT on the DIR-615’s (yes, two) however recently (I think due to the Synology DiskStation in combination with a WDS setup) I had to filter SSDP broadcasts storms (which in turn kill the Easybox), which isn’t quite so easy on DD-WRT, but rather easy on OpenWRT. Today I went thinking about VLAN-Tagging and stuff, and I had to figure out the physical to logical port mapping for the DIR-615. So let’s run swconfig dev rt305x show on the DIR-615 after plugging in the RJ45 cable to a port. ...

June 22, 2013 · 2 min · 343 words · christian

Postfix, soft_bounce=yes and redelivering mails

Well, I’m setting up spam/virus filter at the moment. Somewhere I found, that when doing so one should enable soft_bounce=yes in your /etc/postfix/main.cf. Now, once I finished setting up my mailing setup, I wanted to manually force the delivery. 1 2 3 4 5 6 7 8 9 10 11 12 13 # Check for mails still in the mail-queue root:(eris.heimdaheim.de/mailing) PWD:~ Wed Jun 19, 17:57:10 [0] > mailq -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient------- B404F1B42C 2751 Wed Jun 19 17:58:01 christian.th.heim@gmail.com (user unknown) christian@heimdaheim.de C250F1B427 2770 Wed Jun 19 17:53:31 christian.th.heim@gmail.com (lost connection with 127.0.0.1[127.0.0.1] while receiving the initial server greeting) christian@heimdaheim.de -- 6 Kbytes in 2 Requests. Now, if you fixed the mail delivery, you just need to enter the following: ...

June 19, 2013 · 1 min · 174 words · christian