PTY allocation request failed on channel 0

Got this on your xen domU when trying to ssh?

There are 2 possible fixes (prolly even more, but ill show you 2 easy ones)

Fix 1: (Needs reboot)
apt-get install udev && reboot

Fix 2: (Needs no reboot)

Add to fstab:
none /dev/pts devpts defaults 0 0

Then do a couple of commands:
rm -rf /dev/ptmx
mknod /dev/ptmx c 5 2
chmod 666 /dev/ptmx
umount /dev/pts
rm -rf /dev/pts
mkdir /dev/pts
mount /dev/pts
/etc/init.d/ssh restart

World domination!

Tags: , , , , ,

Debian Lenny, Xen and live migration using iscsi storage backend

After alot of google-ing for iscsi powered live migration i found references to these two block-iscsi scripts:

http://kinkrsoftware.nl/contrib/xen/block-iscsi
http://www.suse.de/~garloff/linux/xen/scripts/block-iscsi

However none of them worked “out of the box” with Debian Lenny. After alot of messing around with adding debug output in the scripts i found the script in the first link to work when i changed the path to iscsiadm from /usr/sbin to /usr/bin (since the open-iscsi lenny package installs iscsiadm to /usr/bin) and when using the following in my VMs .cfg:

disk = [ 'iscsi:iqn.2006-01.com.openfiler:tsn.64b04dcbd835,hda1,w' ]

Dont forget to stick the block-iscsi script in /etc/xen/scripts and chmod +x ! :)

Tags: , , ,

Making munin plugins install and configure themselves if they are suitable for the system

The other day i was trying to graph some of my xen virtualization servers with munin. Munin gives you a default set of plugins which will install and configure themselves upon installation of the munin package.

So what happens when you want to add additional plugins? Well you can either stick the plugins directly in the /etc/munin/plugins directory directly or place them in /usr/share/munin/plugins and make a symlink to them from the /etc/munin/plugins dir (like at least debian does by default).

If you place them directly in the /etc/munin/plugins dir all you need to do is restart the munin-node. If you place them under /usr/……. and symlink them yourself its the same. Lets say you just copy the plugin to the /usr/…… dir and want to make munin automagically install it if it fits your system. Then you can issue the command

/usr/sbin/munin-node-configure --shell | sh
However in order to do so the plugin has to have the “autoconf” ability. To check if the plugin you want to install has this, just issue the following command

munin-run --servicedir /path/to/where/you/placed/your/plugin name_of_your_plugin autoconf
It should say just “Yes” if it has. So what if the if command above returns YES but still nothing happens? I had this problem the other day and i had to visit the #munin channel on irc.linpro.no to get answers from the dudes that knows this shit the best. It dialogue went like this:

18:39 < Kristian> does the plugin have the manual magic marker?
18:39 < me> :)
18:39 < me> which is ?
18:39 < me> hehe
18:40 < Kristian> a line in the script that reads something like: #%# family=manual
18:40 < me> ah
18:40 < me> h
18:40 < me> m
18:41 < me> it might not
18:41 < me> is that all it takes to make it do what i want?
18:41 < me> http://muninexchange.projects.linpro.no/?view&phid=185
18:41 < me> thats the code
18:41 < me> so nope it doesnt
18:43 < Kristian> ah, no family at all. One second :) (I'm really no expert here, I'm just equally curious)
18:43 < me> 14 #%# family=auto
18:43 < me> 15 #%# capabilities=autoconf
18:43 < me> i added those two
18:47 < me> works now :)
18:47 < me> thanks :)
18:47 < Kristian> well, munin-node-configure tries the family=auto by default, if the plugin doesn't have a family set, it's assumed to be contrib
18:47 < Kristian> so adding --families contrib,auto will do roughly what you want
18:47 < Kristian> but they still need the capabilities=autoconf marker
18:49 < me> right
18:49 < me> then that plugin i linked to should be updated
18:49 < Kristian> yeah
18:49 < me> since it has autoconf capabilities

So even tho the plugin presumably has autoconf ability, check if it also specifies it by including something like:

#%# family=auto
#%# capabilities=autoconf

Tags: , , , ,

Xensource xen paravirt ops (dom0) working!

I came across this rather amusing commit log message for paravirt ops on xensource’s mercurial server xenbits: “changeset: dom0 works!”

For all of us who are interested in the xen hypervisor, this does seem like a good thing :p

Direct link to the changeset here

More info on xen paravirt_ops here

Tags: , , , , , , ,