DHCP
VirtFusion has the ability to run a DHCP server on each hypervisor in a cluster to serve the primary IPv4 of virtual servers. This is ideal if you boot from a live CD or do an install from ISO.
Previously Kea was used to serve requests until April 2023, however Dnsmasq is now the new default.
Dnsmasq Setup (for those using Kea)
Stop Kea on the hypervisor:
systemctl stop vf-kea-dhcpd4
systemctl disable vf-kea-dhcpd4
If the file /home/vf-data/conf/config.json
doesn't exist on the hypervisor, you may do the following:
mkdir -p /home/vf-data/conf
echo '{"dhcp4":{"service":"dnsmasq"}}' > /home/vf-data/conf/config.json
If the config file already exists, edit and add:
"dhcp4": {
"service": "dnsmasq"
}
Install Dnsmasq for Debian/Ubuntu hypervisors:
apt install dnsmasq
Install Dnsmasq for RHEL hypervisors:
dnf install dnsmasq
Edit /etc/dnsmasq.conf
and add the following:
conf-dir=/home/vf-data/conf/dnsmasq/,*.conf
Make sure the config directory exists:
mkdir -p /home/vf-data/conf/dnsmasq
Then start Dnsmasq.
systemctl enable dnsmasq
systemctl restart dnsmasq
ISC DHCP Setup
As an alternative, ISC DHCP is also supported.
Stop Kea on the hypervisor:
systemctl stop vf-kea-dhcpd4
systemctl disable vf-kea-dhcpd4
If the file /home/vf-data/conf/config.json
doesn't exist on the hypervisor, you may do the following:
mkdir -p /home/vf-data/conf
echo '{"dhcp4":{"service":"isc-dhcp"}}' > /home/vf-data/conf/config.json
If the config file already exists, edit and add:
"dhcp4": {
"service": "isc-dhcp"
}
Install ISC DHCP for Debian/Ubuntu hypervisors:
apt install isc-dhcp-server
systemctl enable isc-dhcp-server
systemctl restart isc-dhcp-server
Install ISC DHCP for RHEL hypervisors:
dnf install dhcp-server
systemctl enable --now dhcpd
systemctl restart dhcpd