Running sphinx in VirtualBox¶
This tutorial explains how to run Sphinx in a virtual machine (VM) environment using VirtualBox.
Setup the virtual machine¶
- Download and install VirtualBox.
- To capture a USB device with a filter, you need to install the VirtualBox Extension Pack.
- Create a virtual machine using one of the supported Linux distributions.
- It is recommended to allocate at least 8 GB of base memory and 12 MB of video memory.
- Configure your VM to use VirtualBox 3D acceleration:
- Make sure you install the Guest Additions into the Linux guest (Host+D)
- Enable 3D acceleration in the VM settings: .. image:: images/virtualbox.png
- Start the guest OS and install Sphinx.
Start running Sphinx¶
From the running VM, you can now run Sphinx with the option
--port-forwarding set to the host IP address to forward all required ports
to the host:
sphinx-server --port-forwarding=<host_ip> /opt/parrot-sphinx/usr/share/sphinx/drones/anafi4k.drone
sphinx-client on the host, you must specify the IP address and
port of the VM:
Receive access to the network¶
To enable bridged networking, open the Settings dialog of a virtual machine, go to the Network page and select Bridged Network in the drop-down list for the Attached To field. Select a host interface from the list at the bottom of the page, which contains the physical network interfaces of your systems.
Use a USB WiFi adapter¶
To use the WiFi dongle of the host in the virtual machine, you must capture the USB device using a USB filter.
Open the VM settings, go to the USB page and create a USB filter. Delete all values except Name, Vendor ID and Product ID.
To find which WiFi PCI device is currently installed on your system, you can type the following commands on the host:
lsusb | grep -i wireless lsusb | grep -i intel
Running sphinx on an headless virtual machine¶
On an headless virtual machine, you can use
xvfb to start an X server that
emulates a dumb framebuffer using virtual memory:
sudo apt-get install xvfb Xvfb :99 -screen 0 1x1x24+32 -fbdir /var/tmp & export DISPLAY=:99 sphinx-server --port-forwarding=<host_ip> /opt/parrot-sphinx/usr/share/sphinx/drones/anafi4k.drone