Libvirt is a library to controls virtual machines (VMs). It manages the network, storage, start and shutdown VMs on Host start / shutdown. In a nutshell, it does anything that you need to control a VM. In IPFire, it can be used to extend the system functionality beyond the available addons.
Note - Support for macvtap has been dropped as of Core Update 156. Please use bridges instead.
Libvirt comes with the virsh command. It allows you to do everything from a shell, but it is not very easy to use.
In the moment, there is no Web interface, but there is another easy and very comfortable way to control the VMs via libvirt.
virt-manager is a desktop interface to control VMs. It can be used to create and control VMs on IPFire over an SSH connection.
There are some steps to make it possible to communicate over ssh with libvirt:
passwd libvirt-remoteNow, create a new connection in virt-manager and choose ssh to connect. As user choose "libvirt-remote". You should now able to connect with libvirt.
VMs can require a lot of disk space! So create storage pool only in /var or on an extra drive. Depending on your IPFire system the root partition may be too small to contain disk images of a VM. Remember 100 GB disk space in a VMs requires a little bit more disk space on the host.
On this host arch, it is possible to virtualize 32-bit guest and 64-bit guest.
To use this network configuration, you must have installed Core 103 or greater.
There are two and only these two supported network configurations, all other configurations like bridges, bonds, virtual networks are not supported and highly dangerous, you destroy you whole IPFire network if you try to use them and not the supported configuration.
How the supported network configuration works:
Now reboot to apply the changes.
You have to do this step only one time. The next time you can start with step 2.
Create a new VM and in choose for the network:
When the mode of the zone is 'bridge' then choose:
The option may be called a little bit differently. (For example: "Host device green0phys: macvtap")
If there are questions then ask in the forum.
1. When I try to start a VM I get the the following error:
Could not access KVM kernel module: Permission denied
failed to initialize KVM: Permission denied
The should happen only one time after the installation! If this error occur more than one time please file a bug in the bug tracker.
solution:
On a machine with a CPU from intel do as root:
modprobe -r kvm_intel
modprobe -r kvm
modprobe kvm_intel
On a machine with a CPU from AMD, do as root:
modprobe -r kvm_amd
modprobe -r kvm
modprobe kvm_amd