lunedì 25 giugno 2012

Macintosh: VirtualBox vs Intel Hardware Accelerated Execution Manager


Recently the Android Emulator increased the speed thanks to the Intel Hardware Accelerated Execution Manager: you can read the install instructions at http://developer.android.com/tools/devices/emulator.html.
I've installed it on my Macintosh 10.7.4: cool, all ready in short time!
Now, I've a problem: my virtual machines managed by VirtualBox could not run… What has appended? 
Surprise: there's a conflict between the virtualbox and intelhaxm modules!
How to fix it?
Well, a dirty solution is to prevent that the system loads the intelhaxm driver:
# go to the kernel module installation directory
cd /System/Library/Extensions/intelhaxm.kext/Contents/Resources
# rename the script used at boot time
sudo mv haxm_start.sh haxm_start_manual.sh
# create a dummy script in order to have a message in /var/log/system.log
cat > /tmp/haxm_start.sh << END
#!/bin/sh
echo "NOTE: intelhaxm is disable at boot time"
echo "NOTE: read the module with sudo /System/Library/Extensions/intelhaxm.kext/haxm_start_manual.sh"
exit 0
Now I'm able to work with my virtual machines!