Hacking VM for peak performance

[Cyber Explorer] recently ditched his collection of physical computers acting as servers by virtualizing the lot of them. But with every change there’s a drawback. Although it wasn’t too hard for him to set up the virtual machines, he did end up spending quite a bit of time trying to improve the bandwidth. Luckily he posted an article chronicling all of the VM tweaks he used to improve the system.

The experience involves both a Windows 8 machine, as well as a some Linux boxes meaning there’s something here for everybody. At each step in the process he performs some throughput tests to see how the boxes are performing. Tweaks are numerous, but include trying out different Ethernet drivers, making sure all modules are up to date, squashing at least one bug, and giving jumbo-frames a try.

[Thanks Omri]

This hack can refill your Stratasys 3D printer

[Dan] has his own Stratasys Dimension SST 768 3D printer. It’s a professional grade machine which does an amazing job. But when it comes time to replace the cartridge he has to pay the piper to the tune of $260. He can buy ABS filament for about $50 per kilogram, so he set out to refill his own P400 cartridges.

Respooling the cartridge must be quite easy because he doesn’t describe the process at all. But the physical act of refilling it doesn’t mean you can keep using it. The cartridge and the printer both store usage information that prevents this type of DIY refill; there’s an EEPROM in the cartridge and a log file on the printer’s hard drive. [Dan] pulled the hard drive out and used a Live CD to make an image. He loaded the image in a virtual machine, made some changes to enable SSH and zap the log file at each boot, then loaded the image back onto the printer’s drive. A script that he wrote is able to backup and rewrite the EEPROM chip, which basically rolls back the ‘odometer’ on how much filament has been used.

[Image Source]

MythTV library on Apple TV without a jailbreak

[Dan] wrote in to share a link to his MythTv to Apple TV setup. He found a way to make the recordings he made on his Linux box available on the 2nd Generation Apple TV. Our first thought is that he would use XBMC on a jailbroken device  but that is not the case. The secret is to roll iTunes into the mix.

Take a look at the diagram above. The system starts with an Arch Linux box that runs MythTV, an open source program which allows you to record from tuner or encoder hardware. But actually watching those recordings on an iOS device is difficult for a couple of reasons. First, Apple likes to keep their devices locked up tight in hopes that you buy your entertainment rather than watching over-the-air records. Second, if you’re recording ATSC channels the files may be 1080i or 1080p, neither of which can be handled by the Apple TV 2. [Dan] gets around this by first using the command line version of Handbrake to transcode the recordings to an h264 format. He then uses iTunes running on an Windows 7 virtual machine (on the Linux box) to host the transcoded files in a library the Apple TV can access.

Using a Mac and XCode as a Linux development platform

[Ricard Dias] wrote in to tell us about his guide for developing Linux applications on a Mac. He really enjoys the development environment provided by XCode, and it doesn’t take much to make it work as an all-in-one solution for Linux development.

The real trick here is the use of SSH to access a Linux environment. In this example he uses Ubuntu running as a virtual machine, but also mentions that the same thing can be done just as easily with a separate box as long as it is on the same network as the Mac. SSHFS (the SSH Filesystem) lets him mount the development directory on the Linux box locally. This is where the XCode project and files will be stored, but building the program will be done by the Linux machine via a script calling the make comand via SSH. To test out the newly built program, [L] tunnels in using X11 forwarding for ssh, and the application will be shown as a window in OSX, even though it is running on the Ubuntu machine.

We love SSH and use it all the time. It’s amazing how hand it can be.

Virtual Machine for microcontrollers lets you run Python on AVR chips

[Clifford Wolf] wrote in to let us know about a project he recently completed called EmbedVM. It’s a virtual machine for AVR microcontrollers. The package has a relatively small overhead, taking up about 3kB of program memory. The VM can execute 74,000 instructions per second, and runs asynchronously from the microcontroller. As [Clifford] demonstrates in the videos after the break, this can be handy for preloading commands to prevent slowdown during heavy VM processor loads.

The snippet in the image above is an example program written in the C-like VM code which will play some [Rick Astley] on a speaker. This code can be run from RAM, EEPROM, or even external storage like an SD card. Recently there was a supplemental compiler project that even takes Python code and compiles it into VM byte-code. What a nice abstraction tool for making inexpensive microcontroller-based designs easily programmable for those that have a bit of Python experience.

If you don’t recognize the name, [Clifford Wolf] is also the author of OpenSCAD, a tool that is quite popular with 3D printing.

Continue reading “Virtual Machine for microcontrollers lets you run Python on AVR chips”

TI Evalbot development under Linux

We have some beefs about how Texas Instruments does things, the biggest of which is their lack of support for development under Linux operating systems. But if they build it, someone will try to get Linux involved in one form or another. This time around, [BLuRry] put together a guide to developing for the Evalbot under Linux. He got a shove in the right direction from the code package that went along with that nunchuck-controlled Evalbot. Picking apart that example to the bare essentials he wrote up the process of setting up the cross-compiling toolchain in a virtual machine so as not to clutter your system. From there he details how to set up and use Eclipse when starting a new project. What what did he choose for a Hello World experience? Well a plain “Hello World” was first but right on its heels is the “Hello Hack-A-Day” seen above. So if you’ve got one of these on hand get out there and start coding for it.

25C3 international Capture the Flag

Capture the Flag (CTF) is a long running tradition at hacker conventions. It pits teams of security researchers against each other on the same network. Every team gets an identical virtual machine image. The VM has a set of custom written services that are known to be vulnerable. The teams work to secure their image while simultaneously exploiting services on the machines of other teams. A scoring server monitors the match as it progresses and awards points to teams for keeping their services up and also for stealing data from their competitors.

The Chaos Communication Congress in Berlin December 27-30, 2008 will host a CTF competition. Most CTF matches are done head to head in the same room. While 25C3 will have local teams, it will also be wide open for international teams to compete remotely. Remote teams will host their own images on a VPN with the other competitors. Now is a good time to register and familiarize yourself with the scoring system. It will certainly be interesting to see how this competition plays out now that teams that can’t make the trip can still compete.