Hosting Virtual Machines requires some configurations steps, even
with SlapOS. If you want to serve VMs instances from your SlapOS
node(s), follow this guide.
If your node has been installed from dedicated disk image (such as USB key), there is no need of this configuration.
We can now start proper network configuration of SlapOS to host Virtual
If you want to host virtual machines, you will need to configure a
bridge in order to support multiple tap interfaces used in virtual
machines like KVM. Then we can run slapformat and get ready to use the
Using bridges on your computer/server can sometimes be tricky. This is
why it is not enabled by default on SlapOS. For example, it won't work
properly if using Wi-Fi.
Please also note that KVM instances won't have internet access if you
don't configure bridge, but if you only plan to only develop/test it, it
should not be a problem.
Note : the VIFIB cloud, handled by SlapOS team, uses bridge configured
automatically by the SlapOS disk image.
iface eth0 inet manual
iface br0 inet dhcp
/opt/slapos/bin/slapformat -c /etc/opt/slapos/slapos.cfg
Note: this will not work with Wi-Fi connection.
On a Debian based distribution (Debian, Ubuntu, Mint, ...), setting up
a bridge can be achieved by changing the file /etc/network/interfaces
and restarting network. Make sure you add relevant physical interfaces
to the bridge. Make also sure that if you add a bridge to a remote
server, you still have a way to contact the server in case of failure
of the configuration (this happens very frequently).
brctl addbr br0
brctl addif br0 eth0
ip l s dev br0 up
Note : this will not work with Wi-Fi connection.
On a generic GNU/Linux distribution, bridge setup can be achieved
entirely from /etc/rc.local, together with slapformat. This is not the
most beautiful way to achieve the expected result but it works.
Please also take not that any interface added to a bridge should no
longer be configured by the system. The configuration file for that
interface should just be removed.
# nano /etc/opt/slapos/slapos.cfg
Change under [slapformat] parameters to show:
interface_name = br0
create_tap = true
Then run slapformat again:
# slapos node format --now
Here we need to tell SlapOS installation that we should use our newly
created "br0" bridge as interface to use.
Then we ask slapformat (the tool that allocates IPs for each partition) to
create "TAP" virtual interfaces for each partition, then connect them to
Note: make sure you are using latest SlapOS version. "create_tap" option is
not available in old releases.
# modprobe kvm
# modprobe kvm_intel
# modprobe kvm_amd
# chmod 666 /dev/kvm
use_tap = true
Make sure you have activated virtualization technology in the BIOS
of your computer.
Load the required kernel modules (Debian: # modprobe kvm kvm-intel or
modprobe kvm kvm-amd) and then change the rights of /dev/kvm to 777.
Powered by Python, Zope and ERP5
(c) 2001-2011 Nexedi & ERP5 Community. All Rights Reserved.