Hot-plugging USB into a Xen VM from a script

Xen Panda

I have been run­ning a hybrid Linux/Windows box for some time now, using Xen.  Xen is a bare-met­al hyper­vi­sor with many pow­er­ful fea­tures, includ­ing the abil­i­ty to map phys­i­cal hard­ware (say, a graph­ics card) to guest VMs.  I have strug­gled with get­ting USB to work seam­less­ly, how­ev­er.  My hard­ware pre­vents me from map­ping a phys­i­cal USB device to the guest, so I need­ed a dif­fer­ent solu­tion.

Xen allows emu­lat­ed USB con­trollers to be mapped to the guest, and this works well.  One impor­tant fea­ture is miss­ing, how­ev­er.  It is not pos­si­ble to auto­mat­i­cal­ly con­nect a device to the guest when it is plugged in.

A lot of research and some div­ing into the code brought me to a solu­tion, how­ev­er.  Utilizing the udev inter­face in lin­ux and the low-lev­el hyper­vi­sor inter­faces, I can hot-plug devices at run-time.  This post describes how I got there.

The source code dis­cussed in this arti­cle can be found, in full, at https://bitbucket.org/sczetty/auto-usb-attach/src/master/

Continue read­ing “Hot-plug­ging USB into a Xen VM from a script”

Getting the most out of a networking event

Last week, I attend­ed a net­work­ing event, as a “dry run” for an upcom­ing push toward get­ting out there with our new con­sult­ing arm, ModPii. I observed some things that I found inter­est­ing, and would prob­a­bly be of use to oth­ers out there.

(tl;dr)

Networking for fun

The most impor­tant rule: have fun!  If you aren’t hav­ing fun, you will allow the pres­sures of the moment effect you.  It doesn’t mat­ter who you are, peo­ple enjoy a relaxed, fun demeanor more than a “get it done” one.

So, relax.  Have a snack.  Joke with peo­ple around you.  Talk about your hob­bies.  Have fun!

Continue read­ing “Getting the most out of a net­work­ing event”