pfSense Gold Subscription

Author Topic: Hyper-V - PFsense 2.0.1 - Some tips.  (Read 26814 times)

0 Members and 2 Guests are viewing this topic.

Offline heuristik

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Hyper-V - PFsense 2.0.1 - Some tips.
« on: December 31, 2011, 03:56:24 am »
Issue 1:  The AMD proc-specific boot fail.   If you can't even get Pfsense to load in your VM beyond the initial "post," you know what I'm referring to here.  You'll see
              something like the following:
                 Stopped at pmap_invalidate_cache_range+0x40 clflushl 0(%ebx)
                 db>
             Workaround: At initial menu, choose option 7 to escape to the command line.  Type the following at the OK prompt:
                      Set hw.clflush_disable=1
                      boot
     
             Installation will continue as normal.  After reboot, you need to escape again to the command line, re-enter the same command and boot into PFSense.

             Now you can make the fix permanent.  Once PFsense is at the main menu, shell out to a command prompt.  Type the following:
                     vi /boot/loader.conf
              arrow down to the last line, press "a" to append (make sure cursor is on a new line after last entry in file).  on new line type:
                      hw.clflush_disable=1  
            press return, then escape, then the keys "wq!" to write the changes to the file.
              Verify your changes by typing "more /boot/loader.conf" and look for your entry at the end.

Issue 2: No NICs found.  You have to use Legacy NICs, the default nics are not recognized by Free BSD.

Issue 3: PFSense doesn't receive a DHCP address.
             So you get all the way through the install, you can hit PF's Web configurator just fine, but it won't pick up dhcp from your WAN provider, huh?
             Yeah, this one had me stumped for a bit.  Thanks to some great posts in this forum, I was able to find a quick resolution, so I'm just
             summarizing here and hopefully providing a consolidated reference for those seeking help in the future.
             For whatever reason, DEx nics don't immediately listen for dhcp assignments in Hyper-V.  If you down the adapter, bring it back up, then listen,
             it works just fine.  Shell out to the command prompt and type the following:
                        ifconfig de(x) down [where (x) corresponds to the nic you are troubleshooting for dhcp]
                       ifconfig de(x) up
                        dhclient de(x)

             now make the change permanent.  create an /etc/rc.local file (vi /etc/rc.local), add those commands, save the file, then type
                         chmod 755 /etc/rc.local
             to make it an executable for root.
 

                      
« Last Edit: December 31, 2011, 09:42:48 am by heuristik »

Offline ChrisH1

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Hyper-V - PFsense 2.0.1 - Some tips.
« Reply #1 on: December 31, 2011, 04:15:27 am »
Issue 4: CARP won't work due to a bug in the "de" network driver. See http://forum.pfsense.org/index.php/topic,44529.0.html
No workaround known yet.

Offline heuristik

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Hyper-V - PFsense 2.0.1 - Some tips.
« Reply #2 on: December 31, 2011, 09:47:22 am »
thanks for the heads up on that, Chris.  I just started trying to get that working between vms on a couple of HV hosts...

I think I read recently that Microsoft just updated its linux integration services disk a couple of weeks ago.  Anyone look to see if there's some love for freebsd yet?

Offline behzad

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Hyper-V - PFsense 2.0.1 - Some tips.
« Reply #3 on: May 28, 2012, 06:08:07 am »
Hi,
Thanks for the tips.
I'm trying to install pfSense 2.0.1 on Microsoft hyper-v with 2 legacy adapters.
system halts at startup and the first tip has no effect on it!
What can I do now?
Thanks.

Offline cicero44bc

  • Jr. Member
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: Hyper-V - PFsense 2.0.1 - Some tips.
« Reply #4 on: July 18, 2012, 04:34:30 am »
Thanks for the tips heuristik & ChrisH1. I noticed that for some reason DHCP wasn't dishing out IPs on the LAN interface either. I fixed this in a similar method with ifconfig de1 down and ifconfig de1 up, where de1 is the LAN. I added this to /etc/rc.local and its been fine ever since.

behzad I had some similar issues when using dynamically expanding disks. When I created a fixed disk on IDE it was fine after that.

Offline jceb3167

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
    • OPTTIC
Re: Hyper-V - PFsense 2.0.1 - Some tips.
« Reply #5 on: July 24, 2012, 04:28:00 am »
I don't think that Pfsense is ready to work well on HyperV since this hypervisor does not support FreeBSD 8.1.
It may work but I doubt it will be suitable for production equipment.
I would recommend to use ESXi instead.

http://www.opttic.com

Offline cicero44bc

  • Jr. Member
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: Hyper-V - PFsense 2.0.1 - Some tips.
« Reply #6 on: July 25, 2012, 11:27:26 am »
I agree, for a test environment though its been fine for me. I have not used it beyond basic routing however.

Offline janneb

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Hyper-V - PFsense 2.0.1 - Some tips.
« Reply #7 on: August 04, 2012, 05:09:04 pm »
I have successfully used your tips to install pfsense on hyper-v 2.0 (Win8 / Srv2012) today and will use it as my primary home firewall. Very convenient to run my firewall on my workstation (Hyper-V is built in win8). I will let you know what I find out. One obvious limitation is that the legacy adapters are 100mbit  :'(

Offline janneb

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Hyper-V - PFsense 2.0.1 - Some tips.
« Reply #8 on: August 08, 2012, 11:08:11 am »
Quote
SOpenness 6 Aug 2012 9:46 AM
Thank you for your interest in the FreeBSD support for Hyper-V!  Check back on the blog later this week, when we’ll have more details on the release and where to get the code

http://blogs.technet.com/b/openness/archive/2012/05/10/freebsd-support-on-windows-server-hyper-v.aspx

C'mon c'mon c'mon ..

Offline cicero44bc

  • Jr. Member
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: Hyper-V - PFsense 2.0.1 - Some tips.
« Reply #9 on: August 14, 2012, 06:30:14 am »
Thanks Janneb. Fortunately the drivers are already released (I foolishly hadn't thought to check until you posted this!) http://blogs.technet.com/b/openness/archive/2012/08/09/available-today-freebsd-support-for-windows-server-hyper-v.aspx which links to building the kernel with the new drivers here - https://github.com/FreeBSDonHyper-V/freebsd/wiki/Build-the-kernel-with-the-HyperV-drivers I'm yet to try it but it sounds exciting.

Offline ericsche

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Hyper-V - PFsense 2.0.1 - Some tips.
« Reply #10 on: August 16, 2012, 09:07:44 am »
Hello,

drivers are for FreeBSD 8.2 and beyond so we need to use PFSense 2.1

I've been trying for a few days with no luck :(
Any idea how to patch the kernel ?

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14976
  • Karma: +4/-0
    • View Profile
Re: Hyper-V - PFsense 2.0.1 - Some tips.
« Reply #11 on: August 20, 2012, 02:09:29 pm »
Even if you manage to get it to work, they still have a lot of work to do before it would be useful on a firewall.

See http://lists.freebsd.org/pipermail/freebsd-stable/2012-August/069148.html
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline cicero44bc

  • Jr. Member
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: Hyper-V - PFsense 2.0.1 - Some tips.
« Reply #12 on: August 20, 2012, 04:56:32 pm »
Thanks for the heads up jimp.

Offline iskull

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +0/-0
    • View Profile
Re: Hyper-V - PFsense 2.0.1 - Some tips.
« Reply #13 on: October 09, 2012, 08:32:54 am »
I'm trying to use pfSense w/ Hyper-v on Windows 2008 R2, but I'm not getting  :-\

My pfsense version:

Code: [Select]
[2.0.1-RELEASE][admin@maybach.prosperi.local]/root(30): uname -a
FreeBSD maybach.prosperi.local 8.1-RELEASE-p6 FreeBSD 8.1-RELEASE-p6 #0: Mon Dec 12 18:15:35 EST 2011     root@FreeBSD_8.0_pfSense_2.0-AMD64.snaps.pfsense.org:/usr/obj./usr/pfSensesrc/src/sys/pfSense_SMP.8  amd64


I'm getting this messagens in dmesg:

Code: [Select]
calcru: runtime went backwards from 5 usec to 2 usec for pid 17 (vmdaemon)
calcru: runtime went backwards from 166 usec to 92 usec for pid 16 (pagedaemon)
calcru: runtime went backwards from 435 usec to 247 usec for pid 9 (pfpurge)
calcru: runtime went backwards from 36 usec to 19 usec for pid 8 (sctp_iterator)
calcru: runtime went backwards from 7720 usec to 4033 usec for pid 7 (fdc0)
calcru: runtime went backwards from 8496 usec to 4631 usec for pid 14 (yarrow)
calcru: runtime went backwards from 1121396 usec to 603195 usec for pid 4 (g_down)
calcru: runtime went backwards from 818454 usec to 429006 usec for pid 3 (g_up)

And searching on the web I found this:

http://xtravirt.com/disabling-virtual-machine-guest-host-time-synchronization-multiple-hypervisors
http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/troubleshoot.html#calcru-negative-runtime
http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/troubleshoot.html#COMPUTER-CLOCK-SKEW

I tried all solutions above, but no success yet :( any suggestions?

Offline tester_02

  • Full Member
  • ***
  • Posts: 194
  • Karma: +0/-0
    • View Profile
Re: Hyper-V - PFsense 2.0.1 - Some tips.
« Reply #14 on: October 16, 2012, 08:33:16 am »


I tried all solutions above, but no success yet :( any suggestions?


  Move on for now.   I've moved on to vmware until hyper-v on freebsd gets sorted out.   I'd love to come back and run hyper-v as I would not have to install other software on the windows machines I am running it on.
  Oracle solution seems good too.