[SOLVED] how to set up pfsense as a hyper-v virtual machine in minutes!
In order to complete this tutorial successfully the following items are required. Please ensure to have these items available before taking implementation action on this tutorial :
1) Desktop or Laptop computer with Windows 7, 8, 10, Server 2008 and up installed
2) Internet connection (optional)
3) PFSENSE disk image file (ISO)
3) Microsft Hyper-V
5) 2 physical or virtual network interface cards / 2 HYPER-V virtual switch’s
1) Download the PFSENSE ISO file fro the official PFSENSE downloads page
2) Open MICROSOFT HYPER-V and create a new FREEBSD virtual machine
3) During the virtual machine creation process ensure to configure two network adapters and to attach the PFSENSE ISO file to the VM
4) Start the virtual machine and install PFSENSE
5) Open a web browser, log into the PFSENSE web based configurator and complete the post installation setup wizard.
Step 1: Download The PFSENSE Disk Image File (ISO)
1) To get started setting up PFSENSE as a Microsft Hyper-V virtual machine download the official pfsense installation ISO file HERE.
On the downlad page, choose AMD(64) on the ARCHITECTURE drop down and choose a mirror location closest to you on the MIRROR dropdown menu.
Step 2: Create PFSENSE Hyper-V Virtual Machine And Install PFSENSE Firewall.
2) Launch the HYPER-V Manager and right click on an available host server. Select “NEW > VIRTUAL MACHINE” and the “NEW VIRTUAL MACHINE WIZARD” will be displayed.
PRO TIP : if you do not have hyper-v enabled, open the windows control panel select “PROGRAMS” and choose the “TURN WINDOWS FEATURES ON OR OFF” option. On the “WINDOWS FEAUTURES” dialog box select the “HYPER-V” checkbox and click “OK”. Windows will automatically download any necessary files and install HYPER-V on to your computer.
3) On the “NEW VIRTUAL MACHINE” wizard click on the “NEXT” button to create a virtual machine with a custom configuration.
4) On the “SPECIFY NAME AND LOCATION” section, add a meaningfull virtual machine name in the “NAME” text input box. By default HYPER-V stores all virtual machines in the “C:\\PROGRAMDATA\MICROSOFT\WINDOWS\HYPER-V” folder. You can also store the PFSENSE virtual machine files in a different location on your computer. To do this click on the “STORE VIRTUAL MACHINES IN A DIFFERENT LOCATION” check box and browse to the location you want.
5) On the “SPECIFY GENERATION” section select the “GENERATION2” radio button.Ifyou are going to install an older version of PFSENSE choose “GENERATION 1”.
6) The next step is to configure memory settings for the PFSENSE VIRTUAL MACHINE on the “ASSIGN MEMORY” section. The minimum recommended amount of memory for PFSENSE is 512MB however 2 GB is recommended.
7) On the “CONFIGURE NETWORKING” section select a virtual switch on the “CONNECTION” drop down menu. PFSENSE requires a minimum of two network interface cards, the second network interface card will be added after the virtual machine has been created.
8) Proceed by creating a virtual hard disk where PFSENSE will be installed on the “CONNECT VIRTUAL DISK” section. Here you can also chnage the name of the hard disk in the “NAME” text input box, and also specify a location where the disk will be stored in the “LOCATION” input box. Specify the size of the virtual hard disk on the “SIZE” input box. 25GB is suitable but you may specify a smaller or larger value for the disk size.
Click on the “NEXT” button to proceed.
9) On the “INSTALLTION OPTIONS” page, click on the “INSTALL AN OPERATING SYSTEM FROM A BOOTABLE FILE” radio button. Click on the “BROWSE BUTTON” and select the PFSENSE disk image file in the image file ISO text input box.
10) On the summary section, you’ll see a summary of the settings you have selected in the previous steps. Click on the “FINISHE” button to complete the virtual machine creation wizard.
11) On the Hyper-v Manager, right click on the newly created PFSENSE virtual machine and click on the “SETTINGS” option.
12) On the “ADD HARDWARE section, choose the “NETWORK ADAPTER” option from the list, and then click ADD.
PRO TIP : A virtual switch allows virtual machines created on Hyper-V gain access to network adapters on the HOST computer as well as communicate with other virtual machines and computer. To create a virtual switch, click on “VIRTUAL SWITCH MANAGER” under the “ACTIONS” tab. Select the type of virtual switch you would like to create from available options ( EXTERNAL, INTERNAL, PRIVATE). Attach a physical or virtual network interface card and click on the “CREATE VIRTUAL SWITCH” option.
13) Next, Select the VIRTUAL SWITCH for the adapter on the “VIRTUAL SWITCH” drop down menu. You can also configure the maximum and minimum bandwidth permitted on the network adapteron the “BANDWIDTH MANAGEMENT” section. Click on the “OK” button to proceed.
14) On the Firmware section, select the boot device as the PFSENSE disk image file (ISO). this will ensure that the virtual machine will boot into the installation disk at first time startup.
15) The final preflight step, is to disable the secure boot setting to allow the PFSENSE virtual machine to boot using the PFSENSE disk image file. To do this select the “SECURITY” section on the “SETTINGS” page and uncheck the “ENABLE SECURE BOOT” checkbox.
Step 4: Power On The Virtual Machine And Install PFSENSE!