Ubuntu 14 LTS KVM VT-d passthrough with Z97 and i5-4590

Ha, that title looks ridiculous!

There are tons of tutorials on how to get VT-d working with KVM/libvirt/Qemu/etc. It’s still a fairly new and unused feature, which means that it is getting updated pretty frequently. Unfortunately, the Internet doesn’t update as quickly, so most of the documentation out there is not accurate or the best approach. This post serves as a snapshot of how I set up my system on September 14th, 2014.  As I make progress I’ll try to update this post. I hope it helps other people save some time. Good luck!

Most of this was discovered through these posts:


  • Intel onboard ethernet passthrough
  • GPU passthrough (not complete)


General steps

Enable vt-d on the host system

Add the following to /etc/modules:


Edit /etc/default/grub:


Some instructions mention that you may also need an extra parameter:

GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1"

Disable AppArmor for libvirtd

ln -s  /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/
ln -s /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper /etc/apparmor.d/disable/
apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
apparmor_parser -R /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper

Reload and reboot

reboot now

Configuring VM

I’ve added the configuration I’m using for my Windows 8 VM. I’m using webvirtmgr to manage it.

  • changed cpu mode to host-passthrough
  • added <hostdev> for passthrough Intel ethernet device

Resolving an Eclipse instance that stalls/freezes during splash/loading

I have a particular Eclipse workspace that has a pretty elaborate setup. For a long time, I had an issue where once in a while, Eclipse would just freeze during startup with no way to load the workspace. In the past, I would have to rebuild the workspace from scratch. But just today I found a post on Stack Overflow (http://stackoverflow.com/a/9832027) that explains how easy it is to fix this.

  1. Close Eclipse if it’s open.
  2. Open a terminal window.
  3. cd to your workspace directory.
  4. rm .metadata/.plugins/org.eclipse.core.resources/.snap
  5. Reopen Eclipse.


I wanted to create a tool that could verify if a given SWF references the Stage instance. The only reason to reference the Stage is if you want to call one or more of its member functions or properties. So I set up this test to simulate DisplayObjects being added to the Stage. I wanted to verify the sequence of events so I created the same sequence of DisplayObjects that actually were added to the Stage and then create a Sprite as the root and manually fired ADDED_TO_STAGE events as display children were added to it. The resulting code is below. Feel free to use it however you need…

IAB VAST ActionScript 3 Library

As a personal project, I wanted to put together a parser for VAST responses. So I created an ActionScript library on GitHub. It’s basic but takes care of the monotonous XML to AS3 mappings. It also allows for custom extension parsers.

For more info, visit the project page: http://nathanhinish.github.com/AS3-IABLib/

UPDATE: I think a WP update borked the page. If there’s interest I’ll put it up. Otherwise, here’s the link to the GitHub repo. https://github.com/nathanhinish/AS3-IABLib

UPDATE #2: There is growing interest in the library so I wanted to make sure the documentation is available online. To that end, I created a GitHub project page that has a link to the documentation. http://nathanhinish.github.com/AS3-IABLib/

Flex Quick Tips: More Advanced Responders

I just came across a Flex framework class I was previously unaware of.  It’s the AsyncResponder class and has a nifty extra parameter in addition to the ‘result’ and ‘fault’ parameters of the normal Responder class.  The third parameter allows you to pass-through data in the form of a token object.  This could definitely come in handy when trying to use the Command pattern if you don’t want lingering commands. For more info, check the link below.

AsyncResponder Flex Docs

Ant scripts for Robotlegs and Signals projects

I’ve put together a set of Ant scripts build targets to create the boilerplate code for a Robotlegs/Signals project.  You can either clone the code using Git at git clone https://bitbucket.org/nathan.hinish/flex-rl-generator

It can create a basic project structure with or without the Flash Builder specific files like .flexProperties and .actionscriptProperties. The project creation targets will set up the necessary libraries, create the project folders, and create a default project SignalsContext with mappings for the StartupCommand.  Then you have a variety of targets that can create client signal loops, service signal loops, view mediators, models, etc.

In addition to the creation targets, there are a couple extras to run Flex-PMD to verify the quality of your code and to build a production-ready SWF. To see more info, you can check out the Project Wiki.

Enjoy, and if you have questions, feel free to comment below.  Or if you have an idea for a better project name, please suggest them.  I’ve been trying to think of one but couldn’t.

Best Flash iPhone Apps Vs. Worst XCode Apps

This is another short post about something that’s been floating around in my thoughts. It deals with the current Apple opposition to Flash-created iPhone native apps.

The main thought that I am basing my opinion on is this: “The best Flash-created app is likely to be better for the end-user than the worst XCode-created app.”

Why not give end-users more choice in apps? Sure there’s already a lot of choice there. But does it degrade the App Store to allow more apps in? Developers have been creating for the iPhone for 3 years. Flash development has been going on for 6 years. (ActionScript 2.0 was released with MX 2004) Flash devs have a huge head start in getting comfortable with the language and building a community. Though Flash may not be around forever, it’s here as a viable tool now, so why not use it? Sure, improvements in the intermediary layer (Flash cross-compiler) may lag, but there is substantial proof that you don’t need bleeding edge features to have a very popular or successful platform. (Twitter, Facebook, Hulu)