Categories
blog server virtualization

Install HP offline bundle on VMWARE ESXi v5

EDIT: You can always just download HP’s ready made install ISO for Vpshere 5.

When using the VMWARE iso image on HP Proliant you should install the HP offline bundle for hardware status and event log viewing in the Vsphere client.
Download the files. Check if there are newer versions.
http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=15351&prodSeriesId=4091412&swItem=MTX-dd492ace50c6427389678df8be&prodNameId=4091432&swEnvOID=4115&swLang=8&taskId=135&mode=4&idx=1
http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=15351&prodSeriesId=4091412&prodNameId=4091432&swEnvOID=4115&swLang=8&mode=2&taskId=135&swItem=MTX-48fa6d3608514c60979531d921

Place host in maintenance mode via the Vsphere Client.
Upload the files to the root folder of the datastore.
My datastore is called DAS600GBRAID10, look up your name and change the path in the commands accordingly.

Run these commands from the Vsphere CLI v5.
esxcli.exe -s 192.168.101.60 -u root software vib install -d /vmfs/volumes/DAS600GBRAID10/hp-esxi5.0uX-bundle-1.0-20.zip
esxcli.exe -s 192.168.101.60 -u root software vib install -d /vmfs/volumes/DAS600GBRAID10/hp-nmi-esxi5.0-bundle-2.0-11.zip

Change the IP, path and username according to your situation. Password will be prompted for.

If you want to run the command without vCLI then run them on the host in Local Shell or SSH like this:
esxcli software vib install -d /vmfs/volumes/DAS600GBRAID10/hp-esxi5.0uX-bundle-1.0-20.zip
esxcli software vib install -d /vmfs/volumes/DAS600GBRAID10/hp-nmi-esxi5.0-bundle-2.0-11.zip

Change path according to your situation.

Categories
blog server virtualization

HP ESXi 5.0 image license problem

The vmware.lic file is read only with a free ESXi key inside.

Execute on the command line of the particular ESX host:
esxcli software vib remove -n hp-esx-license --no-live-install
Connect with the VI client directly as root to the host and select by right-click to “shutdown” the host.

Categories
blog howto server windows

Errors with ntbackup caused by shadow copy.

Portions of FILENAME cannot be read. The backed up data is corrupt or incomplete. This file will not restore correctly.

I would receive this error numerous times in my ntbackup log.

In my case the C: drive would backup without any issue, but the D: drive would show these errors for every file in use.

My backup destination was a 2TB USB disk (G:) with a newer cluster size that is greater than 512. This is not really an issue for storing the backups. But somehow my shadow copy settings on the D: drive were using the G: backup drive as the place to store the shadow copies for the D: drive. And storing shadow copies on a drive with cluster size != 512 will fail. Note: on the G: drive itself shadow copies are disabled. Not needed for backup drive and will fail anyways because of above mentioned reason.

Categories
blog howto linux server

Ubuntu upgrade from 10.10 to 11.04 broke grub

After upgrading my Ubuntu server from 10.10 to 11.04 using the “do-release-upgrade” method, my system would no longer boot.
It was stuck on a GRUB shell. I downloaded the liveCD, booted from that and ran the excellent Boot-Repair utility. I had to install it using apt-get, so you need an internet connection. They should include it in the liveCD. I belive you can also download a Boot-Repair ISO file to boot from.

But the Boot-Repair tool worked great and fixed my GRUB in no time.
I see a lot of problems with GRUB after the upgrade. Maybe it’s a bug that affects people who, in the past, already upgraded from 9.x or 8.x to 10.x. So people who had GRUB v1 at some point in time.

Categories
blog howto

SIPTAPI and Cisco UC520

I have succesfully configured SIPTAPI by IPCOM for use with the Cisco UC520.

Follow the installation instructions and then configure like this.
SIP DOMAIN: IP for the UC520, this can either be the LAN IP or the CallManager IP.
SIP PROXY: leave this empty
user: leave this empty
password: leave this empty
extension: your extension number

If configured like this, whenever you dial from dialer.exe or outlook your own extension will ring, pick it up and the number you requested will be dialed.

Categories
blog howto linux

Send PCL code for landscape to raw printer in Linux

When the CUPS printer is in RAW mode (no driver or PPD file), you can send PCL codes to the printer in plain text. You can just insert & append the codes on your job.
Here is how I did it:

#!/bin/bash
#
# Created on 01 march 2011 by Stan Gobien
# http://ares.gobien.be:8080/2011/03/pcl-code-landscape-raw-linux/
#
# Insert PCL code for landscape at beginning and append PCL reset code at end
# PCL codes tested on HP Laserjet
# The script expects input via stdin and sends output to stdout
# usage: cat somefile | ./landscape.sh | lp -dPRINTER
cat | sed -e ‘1i^[&l1O’ | sed -e ‘$a^[E’

Note: You can’t simply copy/paste the ^[ code. This is the VI representation of the ESCAPE character. You have to create it like this: CTRL+V ESC (this means press CONTROL and V key together then press ESCAPE key). Tested on Vi IMproved 7.0

Categories
blog howto virtualization

Upgrade ESXi (free) 4.0 to 4.1.0 U1 (Update 1)

Are you upgrading from 4.0 to 4.1U1 ? Then read on or you will end up like me browsing trough the ZIP file and the XML files inside to find out the correct bulletin name. It’s not pleasant to do this when you just entered maintenance mode in a small time frame to stop production vm’s.

Procedure from the Upgrade guide:

Procedure
1 Download the following upgrade ZIP bundle from the VMware Web site to a location that is accessible
to the vSphere CLI machine.
upgrade-from-ESXi4.0-to-4.1.0-0.0.build#-release.zip
The upgrade ZIP bundle contains and esxupdate bulletin and an upgrade bulletin.
2 Power off any virtual machines that are running on the host and place the host into maintenance mode.
3 Install the esxupdate bulletin by running the following command on the vSphere CLI machine.
vihostupdate –server host name or IP address -i -b location of the ESXi upgrade ZIP bundle –
B ESXi410-GA-esxupdate
4 Install the upgrade bulletin by running the following command on the vSphere CLI machine.
vihostupdate –server host name or IP address -i -b location of the ESXi upgrade ZIP bundle -B ESXi410-GA
5 Verify that the bulletins are installed on the ESXi host by running the following command.
vihostupdate.pl –server host name or IP address –query
6 Reboot the host.

What they fail to mention is that the bulletin name in step 4 has changed. So in step 4 the command should now read:

vihostupdate –server host name or IP address -i -b location of the ESXi upgrade ZIP bundle -B ESXi40-TO-ESXi41UPDATE01

PS: After the upgrade I had some problems connecting to the management IP. I did a restart management but no effect. I then changed the mgmt IP and I could connect. However I had to update my client before I could login.

Categories
blog howto windows

Windows XP expired but activation screen won’t show

If you have repaired windows XP with an older CD, you could get the windows expired message, after completing setup, asking you to activate first. If you click YES, the activation screen doesn’t show and you get logged off (immediately or after 20 mins with only the background visible). If you choose NO you get logged off as well. Safe mode without networking allows you in, but activation can’t be done under safe mode. Quite the problem.

I found a solution in the newsgroups, I’ll copy it here for keeps sake:

I was having the same issue with Windows XP Media Center Edition. Installing SP2 over SP3 was not the problem for me, though I thought it was at the beginning. I had to change out a motherboard, and then had to reinstall windows. I was unable to enter safe mode or normal mode without the Activation popup, and then after clicking yes to activate, it would show my wallpaper and do nothing else. Have been searching for a few days for an answer with no luck. Found alot of information on wpa.dbl licence and registry fixes and people saying that it was due to having an OEM copy of XP. None of these were the case for me.
HERE’S THE FIX…
Download Internet Explorer 8 and Hotfix KB946501, burn them to disc
Hotfix KB946501 http://support.microsoft.com/default.aspx/kb/946501
Internet Explorer 8 http://www.microsoft.com/windows/internet-explorer/default.aspx
Start your PC and repeatedly hit F8 to get the safe mode menu.
Choose safe mode with command prompt only (if you are unable to enter safe mode otherwise)
When the command prompt appears type “explorer”
Should load the Windows GUI behind the cmd window
Install the KB946501 hotfix from your disc (reboot may be needed after this)
Install IE8
Reboot normally in to Windows, you should be able to activate as usual.
Apparently the activation Window is dependant upon IE.
Hope this works, let me know.

All credit goes to RowdyRocket, original topic can be found here.

Categories
blog howto network

Netscreen policy based routing cross virtual router

EDIT: Also read the comments, before implementing.

For a customer at work i was implementing PBR on his Netscreen NS25. Normally you have just 1 virtual router called trust-vr, which contains your trust and untrust interfaces. Inside this trust-vr you then have a routing table with a 0.0.0.0/0 route towards your ISP gateway. My customer had a second ISP connection in place to offload some of the traffic trough this connection. I connected the 2nd ISP to an unused interface and placed it in the “trust-vr” virtual router.
Problem: My new interface was not static, but PPoE (same like DHCP) and thus get it’s IP address automatically. However also the gateway is automatically received and set in the virtual router. Unfortunately automatically received gateway is set as connected type with a higher priority then any statically set default gateway. This means i got a second entry for 0.0.0.0/0 with ISP2 gateway and higher priority (thus making it the default), and all traffic went over this 2nd ISP instead of the 1st. This was not desired.

What to do ?
Make a new virtual router, for example call it “ISP2-vr” and a new zone “ISP2”. Assign your interface with the ISP2 connection to zone “ISP2” and to virtual router “ISP2-vr”. This means your automatically received default gateway is placed in the routing table of “ISP2-vr” and nothing get’s messed up.

Redirect traffic.
To redirect the desired traffic, in my case http & https, i use PBR (Policy based routing). Note the PBR should be created inside “trust-vr” virtual router, because there the traffic is originating. First we create an extended ACL. Give the ACL a number, for example 10 and assign a sequence (example number 1). In this sequence you provide the requirements. Let’s say all trafic to port 80 (http) should be redirected, then you just choose port 80, protocol TCP and leave the rest blank. Next you create a match group what basically is just an ID and name where you can assign multiple ACL’s to. Next you make an action group, where you can define an action. Now this action should be next-hop ISP2gatewayIP (this is important !) and not contain an interface. The reason is that the interface is not known to “trust-vr” virtual router so it won’t work. Combine it all in a PBR policy and assign the policy to the trust-vr.

For the next-hop action to work we need to do some tricks. First of all inside the routing table for “ISP2-vr” you need to create route like this: ISP2-gateway/32 to ISP2-gateway/32 interfaceX. Don’t ask me why but this is needed for the PBR and explained in a Juniper KB.

Now normally this should do it. But in my case my ISP2-gateway IP was not inside the ISP2-ip and subnetmask. This appears strange but is mostly the case when using PPoE. To get around this, i need to add a route in the “trust-vr” virtual router for ISP2-gatewayIP to “ISP2-vr” virtual router. That’s it PBR is operational.

You should create a policy from “Trust” zone to “ISP2” zone and allow traffic AND important enable SOURCE NAT on this policy, because your NAT set on the Trust interface won’t work because you are not routing to Untrust.

In this CLI example ethernet1 is the Trust interface, ethernet3 is the Untrust interface and ethernet4 is my ISP2.

set vrouter "trust-vr"
set source-routing enable
set sibr-routing enable
unset add-default-route
set route 0.0.0.0/0 interface ethernet3 gateway 81.246.22.xx
set route 212.71.0.yy gateway ISP2-vr
set access-list extended 20 dst-port 80-80 protocol tcp entry 1
set match-group name port80
set match-group port80 ext-acl 20 match-entry 10
set action-group name toISP2
set action-group toISP2 next-hop 212.71.0.yy action-entry 2
set pbr policy name PBRport80
set pbr policy PBRport80 match-group port80 action-group toISP2 1
exit
set vrouter "ISP2-VR"
set source-routing enable
set sibr-routing enable
set route 212.71.0.yy/32 interface ethernet4 gateway 212.71.0.yy
exit
set interface ethernet1 pbr PBRport80

Categories
blog linux

Munin config example

/etc/munin.conf

# Example configuration file for Munin, generated by ‘make build’
# The next three variables specifies where the location of the RRD
# databases, the HTML output, and the logs, severally. They all
# must be writable by the user running munin-cron.
dbdir /var/lib/munin
htmldir /var/www/munin
logdir /var/log/munin
rundir /var/run/munin

# Where to look for the HTML templates
tmpldir /etc/munin/templates

# Make graphs show values per minute instead of per second
#graph_period minute

# Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime
# something changes (OK -> WARNING, CRITICAL -> OK, etc)

contact.yourname.command mail -s “MUNIN – [${var:host}] ~ ${var:graph_title} ~ warnings: ${loop<,>:wfields ${var:label}=${var:value}} ~ criticals: ${loop<,>:cfields ${var:label}=${var:value}}” your.email@domain.tld

#
#
# For those with Nagios, the following might come in handy. In addition,
# the services must be defined in the Nagios server as well.
#contact.nagios.command /usr/sbin/send_nsca -H nagios.host.com -c /etc/send_nsca.cfg

# a simple host tree
[location1-wms1.otherdomain.tld]
address 169.254.30.86
use_node_name yes

load.load.warning 15
load.load.critical 30

memory.apps.warning 6442450944
memory.committed.warning 8589934592
# memory.committed.warn 8589934592
memory.committed.critical 17179869184

df._dev_cciss_c0d0p1.warning 75
df._dev_mapper_VolGroup00_LogVol00.warning 90
df._dev_mapper_VolGroup00_LogVol01.warning 90
df._dev_mapper_VolGroup00_LogVol02.warning 90
df._dev_mapper_VolGroup00_LogVol04.warning 90
df._dev_mapper_VolGroup01_LogVol00.warning 90
df._dev_mapper_VolGroup02_LogVol00.warning 90
df._dev_mapper_VolGroup03_LogVol00.warning 90

df._dev_cciss_c0d0p1.critical 95
df._dev_mapper_VolGroup00_LogVol00.critical 95
df._dev_mapper_VolGroup00_LogVol01.critical 95
df._dev_mapper_VolGroup00_LogVol02.critical 95
df._dev_mapper_VolGroup00_LogVol04.critical 95
df._dev_mapper_VolGroup01_LogVol00.critical 95
df._dev_mapper_VolGroup02_LogVol00.critical 95
df._dev_mapper_VolGroup03_LogVol00.critical 95

[location1-wms2.otherdomain.tld]
address 169.254.30.88
use_node_name yes

load.load.warning 15
load.load.critical 30

memory.apps.warning 6442450944
memory.committed.warning 8589934592
memory.committed.critical 17179869184

df._dev_cciss_c0d0p1.warning 75
df._dev_mapper_VolGroup00_LogVol00.warning 90
df._dev_mapper_VolGroup00_LogVol01.warning 90
df._dev_mapper_VolGroup00_LogVol02.warning 90
df._dev_mapper_VolGroup00_LogVol04.warning 90
df._dev_mapper_VolGroup01_LogVol00.warning 90
df._dev_mapper_VolGroup02_LogVol00.warning 90
df._dev_mapper_VolGroup03_LogVol00.warning 90

df._dev_cciss_c0d0p1.critical 95
df._dev_mapper_VolGroup00_LogVol00.critical 95
df._dev_mapper_VolGroup00_LogVol01.critical 95
df._dev_mapper_VolGroup00_LogVol02.critical 95
df._dev_mapper_VolGroup00_LogVol04.critical 95
df._dev_mapper_VolGroup01_LogVol00.critical 95
df._dev_mapper_VolGroup02_LogVol00.critical 95
df._dev_mapper_VolGroup03_LogVol00.critical 95

[location1-ts1.otherdomain.tld]
address 169.254.30.90
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[location1m-fc1.otherdomain.tld]
address 169.254.30.94
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[location1-mfc2.otherdomain.tld]
address 169.254.30.96
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[location1-ts2.otherdomain.tld]
address 169.254.30.92
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used
memory.apps.label usage
memory.unused.label pagefile

[location2-wms1.otherdomain.tld]
address 169.254.20.20
use_node_name yes

load.load.warning 15
load.load.critical 30

memory.apps.warning 6442450944
memory.committed.warning 8589934592
memory.committed.critical 17179869184

df._dev_cciss_c0d0p1.warning 75
df._dev_mapper_VolGroup00_LogVol00.warning 90
df._dev_mapper_VolGroup00_LogVol01.warning 90
df._dev_mapper_VolGroup00_LogVol02.warning 90
df._dev_mapper_VolGroup00_LogVol04.warning 90
df._dev_mapper_VolGroup01_LogVol00.warning 90
df._dev_mapper_VolGroup02_LogVol00.warning 90
df._dev_mapper_VolGroup03_LogVol00.warning 90

df._dev_cciss_c0d0p1.critical 95
df._dev_mapper_VolGroup00_LogVol00.critical 95
df._dev_mapper_VolGroup00_LogVol01.critical 95
df._dev_mapper_VolGroup00_LogVol02.critical 95
df._dev_mapper_VolGroup00_LogVol04.critical 95
df._dev_mapper_VolGroup01_LogVol00.critical 95
df._dev_mapper_VolGroup02_LogVol00.critical 95
df._dev_mapper_VolGroup03_LogVol00.critical 95

[location2-wms2.otherdomain.tld]
address 169.254.20.22
use_node_name yes

load.load.warning 15
load.load.critical 30

memory.apps.warning 6442450944
memory.committed.warning 8589934592
memory.committed.critical 17179869184

df._dev_cciss_c0d0p1.warning 75
df._dev_mapper_VolGroup00_LogVol00.warning 90
df._dev_mapper_VolGroup00_LogVol01.warning 90
df._dev_mapper_VolGroup00_LogVol02.warning 90
df._dev_mapper_VolGroup00_LogVol04.warning 90
df._dev_mapper_VolGroup01_LogVol00.warning 90
df._dev_mapper_VolGroup02_LogVol00.warning 90
df._dev_mapper_VolGroup03_LogVol00.warning 90

df._dev_cciss_c0d0p1.critical 95
df._dev_mapper_VolGroup00_LogVol00.critical 95
df._dev_mapper_VolGroup00_LogVol01.critical 95
df._dev_mapper_VolGroup00_LogVol02.critical 95
df._dev_mapper_VolGroup00_LogVol04.critical 95
df._dev_mapper_VolGroup01_LogVol00.critical 95
df._dev_mapper_VolGroup02_LogVol00.critical 95
df._dev_mapper_VolGroup03_LogVol00.critical 95

[location2-ts1.otherdomain.tld]
address 169.254.20.24
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[location2-ts2.otherdomain.tld]
address 169.254.20.26
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[location2-mfc1.otherdomain.tld]
address 169.254.20.28
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[location2-mfc2.otherdomain.tld]
address 169.254.20.30
use_node_name no
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

[otherdomain.tld;Totals]
update no

load1.graph_title Loads-WMS1
load1.graph_order location1wms1=location1wms1.otherdomain.tld:load.load location2-wms1=location2-wms1.otherdomain.tld:load.load

load2.graph_title Loads-WMS2
load2.graph_order location1wms2=location1wms2.otherdomain.tld:load.load location2-wms2=location2-wms2.otherdomain.tld:load.load

load3.graph_title Loads on top of each other
load3.dummy_field.stack location1wms1=location1wms1.otherdomain.tld:load.load location2-wms1=location2-wms1.otherdomain.tld:load.load location1wms2=location1wms2.otherdomain.tld:load.load location2-wms2=location2-wms2.otherdomain.tld:load.load
load3.dummy_field.draw AREA # We want area instead the default LINE2.
load3.dummy_field.label dummy # This is needed. Silly, really.

memory1.graph_title Memory SWAP WMS
memory1.graph_order location1wms1=location1wms1.otherdomain.tld:memory.swap location2-wms1=location2-wms1.otherdomain.tld:memory.swap location1wms2=location1wms2.otherdomain.tld:memory.swap location2-wms2=location2-wms2.otherdomain.tld:memory.swap

memory2.graph_title Memory Committed WMS
memory2.graph_order location1wms1=location1wms1.otherdomain.tld:memory.committed location2-wms1=location2-wms1.otherdomain.tld:memory.committed location1wms2=location1wms2.otherdomain.tld:memory.committed location2-wms2=location2-wms2.otherdomain.tld:memory.committed

# load3.graph_title Loads summarised
# load3.combined_loads.sum location1wms1.otherdomain.tld:load.load location2-wms1.otherdomain.tld:load.load
# load3.combined_loads.label Combined loads # Must be set, as this is
# # not a dummy field!

[ip-wms1.domain.tld]
address 127.0.0.1
use_node_name yes

load.load.warning 15
load.load.critical 30

memory.apps.warning 6442450944
memory.committed.warning 8589934592
memory.committed.critical 17179869184

[ip-wms2.domain.tld]
address 192.168.101.51
use_node_name yes

load.load.warning 15
load.load.critical 30

memory.apps.warning 6442450944
memory.committed.warning 8589934592
memory.committed.critical 17179869184

[windows-pc.domain.tld]
address 192.168.101.26
use_node_name yes
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used

/etc/munin-node.conf

#
# Example config-file for munin-node
#

log_level 4
log_file /var/log/munin/munin-node.log
port 4949
pid_file /var/run/munin/munin-node.pid
background 1
setseid 1

# Which port to bind to;
host *
user root
group root
setsid yes

# Regexps for files to ignore

ignore_file ~$
ignore_file \.bak$
ignore_file %$
ignore_file \.dpkg-(tmp|new|old|dist)$
ignore_file \.rpm(save|new)$

# Set this if the client doesn’t report the correct hostname when
# telnetting to localhost, port 4949
#
host_name location1-wms1.otherdomain.tld

# A list of addresses that are allowed to connect. This must be a
# regular expression, due to brain damage in Net::Server, which
# doesn’t understand CIDR-style network notation. You may repeat
# the allow line as many times as you’d like

#allow ^127\.0\.0\.1$
allow ^169\.254\.25\.10$

Happy learning !