Translation(s): none
VirtualBox
This page will help you get started with using FreedomBox on a virtual machine using VirtualBox. While VirtualBox images are primarily used for testing and development, they can also be used for regular use if you have spare resources on one of your machines. This setup is useful if:
You don't own one of the supported hardware devices.
- You don't use Debian GNU/Linux as your operating system.
You don't want to disturb your Debian installation to try out FreedomBox.
Contents
Download
FreedomBox SD card images for this VirtualBox are available. Follow the instructions on the download page to download and verify VirtualBox images.
An alternative to downloading these images is to install Debian on VirtualBox and then install FreedomBox on it.
Creating a Virtual Machine
- Decompress the downloaded VDI image.
Create a new VirtualBox VM.
- When asked for a "Virtual Hard Disk" select the .vdi file you just extracted in step 1.
After a virtual machine is created, go to settings -> [Network] -> [Interface] and set on the following options.
Network Configuration
VirtualBox provides many types of networking options. Each has its advantages and disadvantages. For more information about how various networking types work in VirtualBox, see VirtualBox's networking documentation. https://www.virtualbox.org/manual/ch06.html
For a simple setup, it is recommended that you use a single network interface in your guest machine. This will make the first boot script automatically configure that interface as an internal network with automatic network configuration. Inside the guest machine, the networking is configured automatically and all the services are made available on this network interface. For more information on how networks are configured by default in FreedomBox, see Networks section.
What remains is to make those services available to the host machine or to other machines in the network. You must then choose one of the following types of networking for the network interface on your guest machine. To set a particular type of network for the guest's network adapter, go to the guest VM's settings then the network options and then select the adapter you wish to configure. There, set the network type from the available list of networks.
First and the recommended option is to use the Bridge type of network. This option exposes the guest machine to the same network that host network is connected to. The guest obtains network configuration information from a router or DHCP server on the network. The guest will appear as just another machine in the network. A major advantage of this of setup is that the host and all other machines in the network will be able to access the services provided by guest without requiring any further setup. The only drawback of this approach is that if the host is not connected to any network, the guest's network will remain unconfigured making it inaccessible even from the host.
Second method is Host only type of networking. With a guest's network interface configured in this manner, it will only be accessible from the host machine. The guest will not able access any other machine but the host. It, however, does not require that the host machine be connected to a network. All services all accessible from the host machine without any special configuration such as port forwarding.
The final option is to use the NAT type of network. This the networking type that VirtualBox assigns to a freshly created virtual machine. This option works even when host is not connected to any network. The guest is automatically configured and is able to access the Internet and local networks that host is able to connect to. However, the services provided by the guest require port forwarding configuration setup to be available outside.
To configure this go to VM settings -> [Network] -> [Adapter] -> [Port Forwarding]. Map a port such as 2222 from host to guest port 22 and you will be able to ssh into FreedomBox from host machine as follows:
ssh -p 4443 fbx@localhost
Map 4443 on host to 443 on the guest. This make FreedomBox HTTPS service available on host using the URL https://localhost:4443/ You will need to add a mapping for each such services from host to guest.
Summary of various network types:
|
Guest accessible from other machines |
Guest accessible from host |
Works without port forwarding |
Works without host connected to network |
Bridged Adapter |
|
|
|
|
Host only |
|
|
|
|
NAT |
|
|
|
|
Using
You can log in as the following user:
Username: fbx
Password: frdm
After logging in, you can become root with the command sudo su. See the FreedomBox ?usage page for more details.
Build Image
If you wish to build your own images instead of downloading available images, it can be done using Freedom Maker.
Tips & Troubleshooting
Networking Problems with macchanger
The package macchanger can cause network problems with VirtualBox. If you have a valid IP address on your guest's host network adapter (like 192.168.56.101) but are not able to ping or access the host (like 192.168.56.1), try uninstalling macchanger:
$ dpkg --ignore-depends=freedombox-setup --remove macchanger
You might have to manually remove the script /etc/network/if-prep-up/macchanger. If Debian complains about unmet dependencies when you use a package manager (apt-get, aptitude, dpkg), try to remove 'macchanger' from the dependencies of 'freedombox-setup' in the file /var/lib/dpkg/status.
Mounting Images Locally
If you want to mount images locally, use the following to copy built images off the VirtualBox:
$ mkdir /tmp/vbox-img1 /tmp/vbox-root1 $ vdfuse -f freedombox-unstable_2013.0519_virtualbox-i386-hdd.vdi /tmp/vbox-img1/ $ sudo mount -o loop /tmp/vbox-img1/Partition1 /tmp/vbox-root1 $ cp /tmp/vbox-root1/home/fbx/freedom-maker/build/freedom*vdi ~/ $ sudo umount /tmp/vbox-root1 # $ sudo umount /tmp/vbox-img1 # corruption here.
Intro |
Information |
Support |
Contribute |
Reports |
Promote |
|
|
|
|||||
|
|
|
HELP & DISCUSSIONS: Discussion Forum - Matrix - Mailing List - #freedombox irc.debian.org | CONTACT Foundation | JOIN Project
Next call: Saturday, April 13 at 14:00 UTC
This page is copyright its contributors and is licensed under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.