Jul 27

Sometimes VMs in ESX get into a bad way and just won’t shut down. When you absolutely, positively have to kill every reference to a VM, nothing does the job quiet like your Fathers light sabre the vmsupport command.

vm-support -x

Will give you a list of all of the running VMs and their VMIDs.

vm-support -X VMID

Will kill that VM like Qui-Gon Jinn.

Jul 22

Jolicloud and ubuntu netbook remix are minimal linux distributions designed to run on netbooks. Netbooks don’t have CDROMs but can boot from USB.  VirtualBox doesn’t support booting from USB, but can boot from CDROM.  I am running Alpha 2 of Jolicloud and wanted to install it in VirtualBox before I put it onto any real silicon, but since VB doesn’t have USB BIOS support, I quickly ran into a hurdle.  I figured the easiest way around this little problem was to simply create a VB disk image (vdi), write the jolicloud boot image to that vdi and just boot it that way.  Fortunately, this turns out to be a simple one liner. Substitute the correct path if you are on a linux host.

“C:\Program Files\Sun\xVM\VirtualBox\vboxmanage” convertfromraw jolicloud-robby-alpha2b-live.img jolly.vdi

When that finishes, you will have a 600MB file called jolly.vdi. Just add that to VBs disk manager as the primary drive in a new VM, add another disk as a secondary drive and install away!

Jul 21

I recently had to make some changes to my MythTV box to increase the buffers that the ivtv driver has available to it for the mpeg encoder. I made my change, rebooted the box but had no confirmation in the boot log as to whether or not my options took. Fortunately, the linux /sys filesystem can show you the parameters in use for the kernels active modules, assuming that the driver was coded properly to show that information. In my example, I’m working with the ivtv driver and I set enc_mpg_buffers=16 and enc_vbi_buffers=8.

cat /sys/module/ivtv/parameters/enc_mpg_buffers
16
cat /sys/module/ivtv/parameters/enc_vbi_buffers
8

Jul 15

I have a box at home that gets lots of information, but is more of an appliance then most of my machines. I would like it to be able to send events that get displayed to my MythTV frontends, but installing mythtvosd isn’t an option. Fortunately, in this case, MythTV uses a non encrypted XML over UDP scheme to get messages sent to the various frontend nodes. This means I can use netcat in UDP mode to just shoot an xml file out over my network and get the data I want on my TV screen without having to shoehorn mythtvosd onto the appliance.
I’ve created a file called message.xml that has the message that I would like to display on my TV in the format of my choosing. I prefer the scroller, but you can use the CID or alert XML schemas if you so choose. See the main.c source code file for mythtvosd in the contrib directory for the schemas.

<?xml version=”1.0″?>
<mythnotify version=”1″><container name=”news_scroller”><textarea name=”text_scroll”><value>Testing</value></textarea></container></mythnotify>

Then I just use netcat to send that message via UDP to my main frontend. I could broadcast this out to all of my frontend nodes, but prefer to do these messages in a targeted manner.

cat message.xml | nc -uv -q1 serenity 6948

The end result is that I can now get messages on my TV for everything from RSS updates to stock reports to firewall alerts. Anything that can be sent as a text string can be displayed!

Jul 15

Whenever WHIA encounters an error, I have it send me a twitter message letting me know.  Using the twitter API and curl, this is a simple operation.

curl –basic –user “Twitter_Username:Twitter_Password” –data status=”Twitter Message Here” http://twitter.com/statuses/update.xml

replace Twitter_Username with your username and Twitter_Password with your password, keeping the colon “:” as the separator.

« Previous Entries Next Entries »