Add New Page: You are not allowed to add pages Select section/namespace. New page title.
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

development_resources:testing:virtualization:virtualbox_and_real_meshes [2014/05/12 20:35] (current)
Line 1: Line 1:
 +====== VirtualBox and Real Meshes ======
  
 +These instructions cover how to deploy Commotion as a guest under VirtualBox, with a USB wifi adapter providing the physical radio that connects with a live mesh and/or real wifi clients. ​ Do note that VirtualBox only supports guests compiled for the *x86* platform.
 +
 +A big caveat is that VirtualBox'​s ability to attach a guest VM directly to a USB peripheral appears to be quite flakey, and it may not work at all.  [[development_resources:​testing:​vmware_player|Vmware-Player]] may be your required alternative,​ in that case.
 +
 +A section at the bottom lists the VirtualBox hosts and USB wifi adapters tested successfully thus far.
 +
 +===== VirtualBox host settings =====
 +
 +First off, you will need to install the "​VirtualBox Extension Pack":​https://​www.virtualbox.org/​wiki/​Downloads to connect USB peripherals to a guest VM.
 +
 +Next, to use a USB wifi adapter with a VirtualBox guest VM, you may have to configure your host OS to ignore the USB adapter (i.e. not try to configure it).  For Ubuntu Linux with the NetworkManager tool, you can exclude specific network adapters from being auto-configured by including the adapters'​ MAC addresses in /​etc/​NetworkManager/​NetworkManager.conf as such:
 +
 +<​code>​
 +[keyfile]
 +unmanaged-devices=mac:​64:​70:​02:​09:​0e:​9a;​mac:​90:​f6:​52:​e5:​28:​f4;​
 +</​code>​
 +
 +Do make sure to restart the NetworkManager service after applying this change to its conf file.
 +
 +In addition, you will need to add your username under the host OS to the "​vboxusers"​ group to ensure you have appropriate permissions to access the USB wifi adapter via VirtualBox.
 +
 +===== Commotion-OpenWRT with a real mesh =====
 +
 +The instructions below describe how to deploy "​Commotion-OpenWRT":/​projects/​commotion-openwrt as a guest under VirtualBox, and with a USB wifi adapter.
 +
 +Compatible images, VirtualBox appliance files, and Commotion-OpenWRT config tarballs may be downloaded from https://​code.commotionwireless.net/​projects/​commotion/​files
 +
 +==== Commotion-OpenWRT gateway node ====
 +
 +Below are screenshots of VirtualBox network and USB settings used for a Commotion-OpenWRT gateway node.  This node uses the host's Internet connection on its first network adapter as its wired gateway, and the USB wifi adapter to connect to clients and repeater nodes.
 +
 +Note that the General, System, Display, Storage, and Serial Port settings for this gateway node are identical to those described for a "​stand-alone node under VirtualBox.":/​projects/​commotion/​wiki/​Virtual-Box#​CreateConfigure-the-Commotion-OpenWRT-VM-guest
 +
 +Furthermore,​ note that USB 2.0 support has been disabled in the next to last screenshot below. ​ Likewise, please note the option "​Remote"​ is set to "​Any"​ in the USB Filter settings pictured in the last screenshot.
 +
 +{{:​development_resources:​testing:​commotion-openwrt-vbox-net1.png|}}
 +Net Adapter 1 settings for Commotion-OpenWRT node under VirtualBox
 +
 +{{:​development_resources:​testing:​commotion-openwrt-vbox-net2.png|}}
 +Net Adapter 2 settings for Commotion-OpenWRT node under VirtualBox
 +
 +{{:​development_resources:​testing:​commotion-openwrt-vbox-usb.png|}}
 +USB settings for Commotion-OpenWRT node under VirtualBox
 +
 +{{:​development_resources:​testing:​commotion-openwrt-vbox-usb-edit.png|}}
 +USB wifi adapter filter for Commotion-OpenWRT node under VirtualBox
 +
 +==== Commotion-OpenWRT repeater node ====
 +
 +The repeater node configuration is nearly identical to that described for the gateway node above, with the exception that the repeater'​s Network Adapter 1 is not connected to the outside Internet via VirtualBox'​s NAT, but rather to an Internal Network with a unique name like *OpenWRT-nonet2*. ​ This arrangement will force the repeater node to find its gateway in the wireless mesh.
 +
 +==== Usage notes for Commotion-OpenWRT and USB under VirtualBox ====
 +
 +  * The virtual serial console which VirtualBox provides lacks copy/paste ability, which can be annoying. ​ You can use "SSH trickery":/​projects/​commotion/​wiki/​Virtual-Box#​CreateConfigure-the-Commotion-OpenWRT-VM-guest to log into the node from the host and get a proper console.
 +  * If the USB adapter does not load its driver on boot, try inserting the adapter as the VM's kernel is booting, but before it loads the root FS.  This may be a "known problem":​https://​help.ubuntu.com/​community/​HardwareSupportComponentsWirelessNetworkCardsTP-Link with the TP-Link adapters tested.
 +  * An unknown problem causes the VM to crash after running for a few hours. ​ Recovery from this also requires pulling the USB adapter and then reinserting it as the VM kernel boots.
 +  * The TP-Link USB sticks may have problems with inadequate heatsinking. ​ This "​link":​http://​forum.doozan.com/​read.php?​2,​6300 suggests turning down TX power to 12dB, i.e. 60% of maximum. ​ This tx power setting is already included in the pre-built, downloadable images mentioned above.
 +  * The OpenWRT command "/​sbin/​reboot"​ doesn'​t apppear to work fully when USB adapter is inserted, with the VM hanging on "​machine restart." ​ In that case, just force a Power-Off via VirtualBox host.  Sometimes the Power-Off might take a minute or two; be patient.
 +
 +===== Commotion-Android with a real mesh =====
 +
 +TBA
 +
 +===== Commotion-Linux with a real mesh =====
 +
 +TBA
 +
 +===== Commotion-Windows with a real mesh =====
 +
 +TBA
 +
 +===== VirtualBox USB Wifi Compatibility =====
 +
 +This section lists Host OS / VirtualBox / USB wifi adapter combinations which have been tested successfully,​ or otherwise, for use in simulating Commotion nodes.
 +
 +**Tested Successfully**
 +
 +|_.Host|_.VirtualBox|_.USB Adapter|
 +|Dell Dimension 9150 Desktop, 4Gb RAM OS: Ubuntu Precise 12.04.1 LTS 32bit under x86 Kernel: 3.2.0-34-generic-pae | v4.2.4-81684 for Linux|TP-Link TL-WN821Nv3 (ath9k_htc) |
 +|Dell Dimension 9150 Desktop, 4Gb RAM OS: Ubuntu Precise 12.04.1 LTS 32bit under x86 Kernel: 3.2.0-34-generic-pae|v4.2.4-81684 for Linux|TP-Link TL-WN722N (ath9k_htc)|
 +
 +**Tested Quasi-successfully**
 +
 +|_.Host|_.VirtualBox|_.USB Adapter|_.Notes|
 +|Mac OS X 10.5.8|v4.1.23 for OSX|SMC SMCWUSB-N2 (carl9170)|- adhoc mesh VAP won't come up, but ap comes up - need to update compat-wireless to 2012-09-07+ for multi-VAP capabilities (new carl9170 firmware)|
 +|Windows 7 64bit under x86_64|v4.2.4-81684 for Windows|SMC SMCWUSB-N2 (carl9170)|- adhoc mesh VAP won't come up, but ap comes up
 +- need to update compat-wireless to 2012-09-07+ for multi-VAP capabilities (new carl9170 firmware)|
 +
 +**Tested Unsuccessfully**
 +
 +|_.Host|_.VirtualBox|_.USB Adapter|_.Notes|
 +|HP NW8240 P4 2GHz Laptop, 2Gb RAM OS: Ubuntu Precise 12.04.1 LTS 32bit under x86 Kernel: 3.2.0-35-generic-pae|v4.2.4-81684 for Linux|TP-Link TL-WN821Nv3 (ath9k_htc)|"​target is unresponsive"​ when OpenWRT tries to load ath9k_htc firmware|
 +|HP NW8240 P4 2GHz Laptop, 2Gb RAM OS: Ubuntu Precise 12.04.1 LTS 32bit under x86 Kernel: 3.2.0-35-generic-pae|v4.2.4-81684 for Linux|SMC SMCWUSB-N2|VBox complains about read error attaching to USB adapter|
 +|HP Pavilion dv5000 2GHz amd64 Laptop, 2GB RAM OS: Ubuntu Precise 12.04.1 LTS 32bit  (Linux Mint Maya) under x86 Kernel: 3.2.0-34-generic|v4.2.4-81684 for Linux|TP-Link TL-WN821Nv3 (ath9k_htc)|"​target is unresponsive"​ when OpenWRT tries to load ath9k_htc firmware|
 +|HP Pavilion dv5000 2GHz amd64 Laptop, 2GB RAM OS: Ubuntu Precise 12.04.1 LTS 32bit under x86 Kernel: 3.2.0-35-generic-pae|v4.2.4-81684 for Linux|SMC SMCWUSB-N2 (carl9170)|VBox complains about read error attaching to USB adapter|
 +|Windows 7 64bit under x86_64|v4.2.4-81684 for Windows|TP-Link TL-WN821N (carl9170)|"​target is unresponsive"​ when OpenWRT tries to load ath9k_htc firmware|
 +|Windows 7 64bit under x86_64|v4.2.4-81684 for Windows|TP-Link TL-WN722N (carl9170)|"​target is unresponsive"​ when OpenWRT tries to load ath9k_htc firmware|
 +|Mac OS X 10.5.8|v4.1.23 for OSX|TP-Link TL-WN722N (ath9k_htc)|"​target is unresponsive"​ when OpenWRT tries to load ath9k_htc firmware|
development_resources/testing/virtualization/virtualbox_and_real_meshes.txt · Last modified: 2014/05/12 20:35 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported