Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion

Bridged VirtFusion Setup (Debian 12)
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Bridged VirtFusion Setup (Debian 12)

emghemgh Member
edited March 8 in Tutorials

I fixed up the config I linked in https://lowendtalk.com/discussion/comment/3923186 somewhat, and decided to create a thread for it for others to use since I've seen a lot of questions of how to install VirtFusion with bridged networking (and also for myself since I often don't remember to backup my shit and so this will be my backup.) This will work without issues on MAC-filtered networks like OVH, just make sure to add the respective MAC-addresses to the IP's in the VirtFusion UI once done.

Paste of the Markdown below:

Bridged VirtFusion Setup (Debian 12)

Prerequisites

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:

  1. /etc/network/interfaces
  2. /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.

(ping @NessaCat in-case you're reinstalling using Debian 12.)

Comments

  • Instead of explicitly specifying the MAC on the bridge, you can use bridge_hw [Your network interface name]

    Thanked by 2emgh loay
Sign In or Register to comment.