วันพฤหัสบดี, ธันวาคม 26, 2556

OSX: Solution: Virtualbox 4.x bridged network not working on OSX 10.9 Mavericks

Thai: แก้ปัญหา Virtualbox 4.2, 4.3 ใช้ bridged network บน OSX 10.9 ไม่ได้ 

    I'm using Virtualbox 4.2, 4.3 with OSX 10.9 the bridged network not working. The error message look like this 
'HostInterfaceNetworking-en0' (VERR_SUPDRV_COMPONENT_NOT_FOUND). 

    I'm googled, someone said if we uninstall and re-install it the problem will gone, but it's not working for me, after several reboot the problem still arise. 

    So, this is another solution. By using this script before start the Virtualbox would help/solve the problem :) 

#!/bin/bash
 
unload() {
  sudo ifconfig bridge0 down
  sudo ifconfig bridge0 unplumb
  kextstat | grep "org.virtualbox.kext.VBoxUSB" > /dev/null 2>&1 \
  && sudo kextunload -b org.virtualbox.kext.VBoxUSB
  kextstat | grep "org.virtualbox.kext.VBoxNetFlt" > /dev/null 2>&1 \
  && sudo kextunload -b org.virtualbox.kext.VBoxNetFlt
  kextstat | grep "org.virtualbox.kext.VBoxNetAdp" > /dev/null 2>&1 \
  && sudo kextunload -b org.virtualbox.kext.VBoxNetAdp
  kextstat | grep "org.virtualbox.kext.VBoxDrv" > /dev/null 2>&1 && \
  sudo kextunload -b org.virtualbox.kext.VBoxDrv
}
 
load() {
  sudo kextload /Library/Extensions/VBoxDrv.kext -r /Library/Extensions/
  sudo kextload /Library/Extensions/VBoxNetFlt.kext -r /Library/Extensions/
  sudo kextload /Library/Extensions/VBoxNetAdp.kext -r /Library/Extensions/
  sudo kextload /Library/Extensions/VBoxUSB.kext -r /Library/Extensions/
  sudo ifconfig bridge0 plumb
  sudo ifconfig bridge0 inet 192.168.2.1 netmask 255.255.255.0 broadcast 192.168.2.255 up
}
 
case "$1" in
  unload|remove)
    unload
    ;;
  load)
    load
    ;;
  *|reload)
    unload
    load
    ;;
esac


the script was from this blog. I believed that the original script was from here, forums.virtualbox.org but this one is the improved & working one :)

ไม่มีความคิดเห็น :