I’ve a couple old x86 servers. They’re great servers, except for failed old SCSI disks, or controller’s battary has failed, etc. I want to make stable firewall/routers out of them.
Get pfSense (2.0.1+) nanobsd-vga and burn the image via physdiskwrite to a el-cheapo 4gb memory stick.
nanobsd runs entirely from ramdisks, and is quite fast. You can configure pfSense to periodically write configs, RRD’s and other data back to stick, at 1 hour intervals.
nanobsd-vga allows you to enjoy nanobsd’s fully embedded nature, with a traditional x86 VGA console/monitor and keyboard, while nanobsd requires a serial console.
This all works very well on physical hardware, but how can we run this exact same configuration on VMWare, and enjoy full virtual networking for testing?
What you’ll need
- VMWare, eg, Workstation 8
- Oracle VirtualBox (just for VBoxManage’s convert utility!)
- pfSense’s nanobsd-vga image (for 4gb pen-drives)
Extract pfSense-2.0.1-RELEASE-4g-i386-nanobsd_vga.img from the .gz file. Then run stuff like below, to first convert the embedded image to a VDI file, and then the VDI file to a VMDK image.
You can run VirtualBox’s VBoxManage on another machine if you like.
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" convertfromraw pfSense-2.0.1-RELEASE-4g-i386-nanobsd_vga.img pfSense-2.0.1-RELEASE-4g-i386-nanobsd_vga.vdi Converting from raw image file="pfSense-2.0.1-RELEASE-4g-i386-nanobsd_vga.img" to file="pfSense-2.0.1-RELEASE-4g-i386-nanobsd_vga.vdi"... Creating dynamic image with size 3999969792 bytes (3815MB)...
Now, convert the VDI to VMDK…
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" clonehd pfSense-2.0.1-RELEASE-4g-i386-nanobsd_vga.vdi pfSense-2.0.1-RELEASE-4g-i386-nanobsd_vga.vmdk --format vmdk 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Clone hard disk created in format 'vmdk'. UUID: a765f2e8-b810-46aa-9bb7-08748139ce13
Now, in VMWare, create new Custom Virtual Machine, choose “FreeBSD” as Operating system and attach the VMDK file you converted above. Add a lot of virtual adapters, boot it up and enjoy.
Once installed and interfaces configured, go to the web configurator’s System > Packages > Available, and install the Open-VM-Tools package (not strictly necessary…).
Enjoy pfSense in VMWare.
PS. Why not simply use the pfSense ISO installer in VMWare? Because that installs the non-embedded version of pfSense, which is somewhat different; configs are stored in the root partition, etc. System does not operate from RAM.