Installing a Ubuntu 22.04 hypervisor
curl https://install.virtfusion.net/install-hypervisor-kvm-ubuntu-22-04.sh | sh -s -- --verbose
Once the installer has completed, you may add it to the control server.
Currently, VirtFusion supports standard bridge networking and Libvirt routed networking.
Standard bridge networking
On Ubuntu a standard NetPlan configuration file will look similar to this. Your configuration can be found in
network: version: 2 ethernets: ens3: addresses: - <IPADDRESS> gateway4: <GATEWAY> nameservers: addresses: - <DNS1> - <DNS2>
This will need to be modified to the following.
network: version: 2 ethernets: ens3: dhcp4: false bridges: br0: interfaces: - ens3 addresses: - <IPADDRESS> gateway4: <GATEWAY> nameservers: addresses: - <DNS1> - <DNS2> parameters: stp: true forward-delay: 0 dhcp4: false
Once the bridge is set up, networking will need to be tested and restarted.
Libvirt routed networking
No modification of the main networking configuration is required.
Defining a Libvirt network is reasonably straightforward and should be low maintenance.
Create a file named network.xml with the following contents.
<network> <name>br0</name> <forward mode='route' dev="eth0"/> <bridge name='br0' stp='on' delay='0'/> <ip address='10.0.0.1' netmask='255.255.255.0'/> <ip family="ipv6" address="2001:db8:aa::1" prefix="64"/> </network>
- If you don't require IPv6 you may remove the
eth0with the device name of the main network.
10.0.0.1with your own subnet that is to be assigned to the server and the corresponding netmask.
- If you require IPv6, replace the
addresswith your own subnet and the corresponding
Define the network, set it to autostart and start it.
virsh net-define --file network.xml virsh net-autostart br0 virsh net-start br0
Network setup is now complete. You should use the main IP of the hypervisor as the gateway for the defined subnet.
Although it's not advised, you may install a hypervisor directly on the control server. This allows for a single server setup.