Bridged VirtFusion Setup
First, execute the following commands in your terminal:
apt-get update apt-get install ifupdown2 bridge-utils curl unzip nano cron at -y
apt-get purge cloud-init netplan.io -y
apt-get autoremove -y
rm -rf /etc/cloud/
rm -rf /var/lib/cloud/
Install VirtFusuion
curl https://install.virtfusion.net/install-hypervisor-kvm-debian-12.sh | sh -s -- --verbose
Files to Edit
You will need to edit the following files:
/etc/network/interfaces
/etc/systemd/resolved.conf
/etc/network/interfaces
This file configures your network interfaces. Here's the complete content for the file:
# The loopback network interface
auto lo
iface lo inet loopback
# Raw network port
auto enp1s0f0
iface enp1s0f0
# Uplink
auto br0
iface br0
address [Your primary IP]
gateway [Your gateway IP]
dns-nameservers 1.1.1.1 1.0.0.1
hwaddress [Your MAC address]
bridge-ports [Your network interface name]
bridge-stp off
bridge-waitport 0
bridge-fd 0
/etc/systemd/resolved.conf
This file is for systemd's network name resolution service. Here's the complete content for the file:
[Resolve]
DNS=1.1.1.1 1.0.0.1
Restart Services
After editing the files, restart the network services with these commands:
systemctl restart networking
systemctl restart systemd-networkd
systemctl restart systemd-resolved
Add to VirtFusion
The hypervisor can now be added to VirtFusion.
Optional: AWS CLI
cd /tmp
curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zip
unzip awscliv2.zip
./aws/install
rm -rf /tmp/aws
rm -f /tmp/awscliv2.zip
mkdir -p /root/.aws
/root/.aws/config
- Create the file
nano -w /root/.aws/config
- Configure it
Sample:
[profile virtfusion]
aws_access_key_id=[S3 Key ID]
aws_secret_access_key=[S3 Secret Key]
retry_mode = standard
max_attempts = 3
s3 =
addressing_style = path
/home/vf-data/conf/dr.json
- Create the file
nano -w /home/vf-data/conf/dr.json
- Configure it
Sample (backups daily at 02:00 and prunes thereafter):
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
0 2 * * * root /usr/bin/vfcli-hv dr:backup >/dev/null 2>&1 && /usr/bin/vfcli-hv dr:prune >/dev/null 2>&1
/etc/cron.d/virtfusion_dr
- Create the file
nano -w /etc/cron.d/virtfusion_dr
- Configure it
Sample (change settings to your liking):
{
"type": "S3",
"storeDirType": "Y-M-D",
"tmpDir": "home/vf-data/tmp",
"threads": 2,
"S3": {
"endpoint": "[Your S3 endpoint, such as https://s3.eu-central-003.backblazeb2.com]",
"region": "[Your S3 region, such as eu-central-003]",
"bucket": "[Your S3 bucket name]",
"compress": true,
"compressLevel": 8,
"prune": {
"enabled": true,
"keepLast": 13
}
}
}
Replace brackets.