Browsing this Thread:   1 Anonymous Users






Installing pfSense on KVM
#1
Just popping in
Just popping in


See User information

We download the latest release of pfSense as a gzipped ISO, then extract it and pass it to virt-install to get the VM up and running. Interactive portions of setup are handled with a VNC viewer because the pfSense installer doesn't seem to be able to work with virt-install's native console redirection, at least not out of the box. I'd love a tip from anyone if it's possible to fix that somehow.

Instructions

Find the latest release here.

Download the gzipped ISO from a mirror into a directory that KVM can access, then unzip it:

mkdir -p /opt/vm/pfSense
cd /opt/vm
curl -O https://nyifiles.pfsense.org/mirror/do ... .4.2-RELEASE-amd64.iso.gz
gunzip pfSense-CE-2.4.2-RELEASE-amd64.iso.gz

Now call virt-install to begin your installation.

  • The --network lines will show up in this order as your virtual nics.
virt-install \
--name pfSense \
--memory 1024 \
--noautoconsole \
--graphics vnc,listen=0.0.0.0 \
--disk /opt/vm/pfSense/disk0.qcow2,size=10,format=qcow2 \
--autostart \
--os-type unix \
--cdrom /opt/vm/pfSense-CE-2.4.2-RELEASE-amd64.iso \
--network bridge=brteam0.4094,model=virtio \
--network bridge=brteam0.10,model=virtio \
--debug

Allow the VNC server through the firewall:

firewall-cmd --add-service vnc-server --zone internal --permanent

Connect to your private IP on port 5900 with a vnc viewer app. Finish the installation.

Restart pfSense when it shuts down after installation

virsh start pfSense

Re-connect to it with VNC to finish interface assignment.

Cleanup

Add the EPEL repo if you don't have it already:

Install xmlstarlet:

sudo yum install -y xmlstarlet

Unbind the VNC server from the running VM:

virsh qemu-monitor-command pfSense --hmp change vnc none

And finally, remove the VNC Server from the VM config:

virsh dumpxml pfSense | xmlstarlet ed -d "domain/devices/graphics" > /tmp/pfSense.xml
virsh define /tmp/pfSense.xml
rm -f /tmp/pfSense.xml

Posted on: 1/21 22:37
Top








Themes

(2 themes)
Login
Username:

Password:


Lost Password?
Register now!
Categories