Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Hyper-V integration installed with pfSense 2.0.1

    Scheduled Pinned Locked Moved Virtualization
    168 Posts 59 Posters 168.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      carlmeek
      last edited by

      I'm cross posting on this thread, and my own bounty thread.

      I've had success getting this up and running, but as soon as any proper traffic goes across it - Crash. Every time.  Then it reboots and the network cards are muddled up.

      Very sadly a show stopper.  I'm increasing bounty to $1000 for a fix.

      Sleeping thread (tid 100036, pid 12) owns a non-sleepable lock
      sched_switch() at sched_switch+0x102
      mi_switch() at mi_switch+0x176
      sleepq_wait() at sleepq_wait+0x42
      _sx_xlock_hard() at _sx_xlock_hard+0x305
      hn_start() at hn_start+0x57d
      if_transmit() at if_transmit+0xea
      ether_output_frame() at ether_output_frame+0x33
      ether_output() at ether_output+0x50d
      ip_output() at ip_output+0xda9
      tcp_output() at tcp_output+0xa7d
      tcp_do_segment() at tcp_do_segment+0xbbc
      tcp_input() at tcp_input+0xcb8
      ip_input() at ip_input+0x162
      netisr_dispatch_src() at netisr_dispatch_src+0x7b
      ether_demux() at ether_demux+0x169
      ether_input() at ether_input+0x191
      netvsc_recv() at netvsc_recv+0x202
      hv_rf_on_receive() at hv_rf_on_receive+0x147
      hv_nv_on_channel_callback() at hv_nv_on_channel_callback+0x38e
      hv_vmbus_on_events() at hv_vmbus_on_events+0xa8
      intr_event_execute_handlers() at intr_event_execute_handlers+0x104
      ithread_loop() at ithread_loop+0x95
      fork_exit() at fork_exit+0x11f
      fork_trampoline() at fork_trampoline+0xe
      –- trap 0, rip = 0, rsp = 0xffffff8000125d00, rbp = 0 ---
      panic: sleeping thread
      cpuid = 1
      KDB: enter: panic
      panic.txt0600001712274404005  7134 ustarrootwheelsleeping threadversion.txt06000022412274404005  7607 ustarrootwheelFreeBSD 8.3-RELEASE-p11 #0: Sun Sep 15 12:27:10 PDT 2013
          root@fbsd83minx64.corp.itbxb.com:/usr/obj.pfSense/usr/pfSensesrc/src/sys/pfSense_SMP.8

      1 Reply Last reply Reply Quote 0
      • R
        Rinzwind
        last edited by

        @swinn:

        First, it is randomly crashing and rebooting. The crash log reports a kernel panic due to a sleeping thread. I'm not sure what to do to fix that. If that was the only issue, I could probably live with it.

        The main issue I'm having is that when it reboots due to the crash, the interfaces are switching. For example, I set WAN to hn0 (mac xx::45), LAN to hn1 (mac xx::46). When it reboots, it is changing hn0 to the interface with mac xx::46 and hn1 to the interface with mac xx::45. So I have to reassign the interfaces. Does anyone know why it would do this or how to ensure that hn0 stays with a specific virtual network interface?

        I have the exact same issues… Really too bad... it's unstable. Randomly reboots (once or twice a day). And if it does, it does not come up cleanly (interfaces are wrongly assigned). I can fix that by shutting it down through hyperv with the button and start it up again.. and then magically interfaces are correct again...

        Panic String: sleeping thread

        1 Reply Last reply Reply Quote 0
        • I
          ittc
          last edited by

          @TRIUMF:

          I hope we'll see official pfsense for hyper-v this summer: http://blogs.technet.com/b/port25/archive/2012/05/11/freebsd-to-run-as-a-first-class-guest-on-windows-server-hyper-v.aspx

          Look at post date: 11 May 2012 11:35 AM

          All working good now!

          1 Reply Last reply Reply Quote 0
          • I
            ittc
            last edited by

            @zootie:

            Yes, 2.1 looks great. It has a long list of new features and improvements. IPv6 support is welcome, looking forward to trying it.

            Do you have how-to or build script?
            I want to use Hyper-V kernel with nightly builds…

            I'm using Hyper-V 2012 R2 as virtualization platform and want to test pfSense nightly builds!
            Don't want to use other virtualization platforms. No options for me without Hyper-V kernel  :(

            1 Reply Last reply Reply Quote 0
            • L
              Liceo
              last edited by

              Although i really like pfsense, i could not longer wait for official Hyper-V integration. I started using Sophos UTM 9.x. The personal edition is even for free…

              1 Reply Last reply Reply Quote 0
              • H
                hmh
                last edited by

                @Liceo:

                Although i really like pfsense, i could not longer wait for official Hyper-V integration. I started using Sophos UTM 9.x. The personal edition is even for free…

                I'm using release pfSense-LiveCD-2.1-RELEASE-amd64-hyperv-kernel-20130915-1129.iso in production, all servers 2012 R2 and one 2012
                No problems, kernel panic, etc…
                Longest up time 60 days without problems.

                1 Reply Last reply Reply Quote 0
                • C
                  chkchaitu
                  last edited by

                  using pfsense as a server loadbalancer for few years on a Dell PE server in my dev environment.

                  Found this post so wanted to move the aged box to VM. Have downloaded and installed the custom iso on server 2012 R2 hyper-v. Installation went smooth and restored backup to VM from the physical box.

                  Everything looks fine but none of the sites hosted being the VIPs of the loadbalancer are responding. These VIPs are configured as PARP.

                  Could not find any logs that can be of help.

                  Would be greatfull if any one can help me with this.

                  1 Reply Last reply Reply Quote 0
                  • B
                    bryan.paradis
                    last edited by

                    @hmh:

                    @Liceo:

                    Although i really like pfsense, i could not longer wait for official Hyper-V integration. I started using Sophos UTM 9.x. The personal edition is even for free…

                    I'm using release pfSense-LiveCD-2.1-RELEASE-amd64-hyperv-kernel-20130915-1129.iso in production, all servers 2012 R2 and one 2012
                    No problems, kernel panic, etc…
                    Longest up time 60 days without problems.

                    What are your VM settings? Are you giving it only 1 CPU by chance? There is code in the source that has something to do with tying to a certain CPU.

                    1 Reply Last reply Reply Quote 0
                    • Z
                      zootie
                      last edited by

                      A couple general news on this topic.

                      Looking in the git repository, there have been considerable improvements in the source code for the integration component drivers and are now at a 1.0 release level. I've been trying to figure out a way to inject these newer drivers into a running pfSense VM or to generate a new pfSense ISO build with this new code (been at it for a few days). I'll report back once I figure out a way to build it (or if I give up for the time being).

                      These newer drivers are considered stable enough to be included in FreeBSD 10. Hopefully, it'll be a considerable improvement that will solve some of the issues we've experienced. There is also the possibility that a near future version of pfSense (maybe 2.2) will be based on FreeBSD 10 (rather than 8.3 as 2.1), making it easier to support Hyper-V going forward.

                      1 Reply Last reply Reply Quote 0
                      • H
                        hmh
                        last edited by

                        @bryan.paradis:

                        What are your VM settings? Are you giving it only 1 CPU by chance? There is code in the source that has something to do with tying to a certain CPU.

                        I'am using 2 or 4 CPU and 1 Gb RAM

                        Config on my test lab:
                        2 CPU  1Gb RAM
                        WAN1 Link 1 Gigabit (True 1 Gigabit internet link)
                        WAN2 Link 5 Megabit (Backup link, and some services published to internet)

                        1 Reply Last reply Reply Quote 0
                        • Z
                          zootie
                          last edited by

                          hmh,

                          I tried those instructions on a vanila 2.1 installation, and it crashes the VM as soon as you try and enable the interface or to assign them. There are other users attempting similar strategies, but so far, all have reported that the precompiled (or trivially recompiled) drivers break pfSense (and we're having to go through hoops to try and compile a version that is more compatible with pfSense).

                          Can anyone confirm they got the new precompiled drivers using the instructions on https://github.com/FreeBSDonHyper-V/Hyperv-Ports/wiki/Install-pre&minus%3Bbuilt-FreeBSD-8-Hyper&minus%3BV-Integration-Components-using-packages? Are you sure you're using the synthetic driver (ie, shutdown and remove the Legacy NIC from the VM so it attemtps a reassign on the following boot). You can re-add the Legacy NICs to get the VM back online (and/or you should make a backup of your VHD before installing these drivers).

                          1 Reply Last reply Reply Quote 0
                          • P
                            PollyPy
                            last edited by

                            FreeBSD 10

                            Let's wait for branch.

                            1 Reply Last reply Reply Quote 0
                            • H
                              hmh
                              last edited by

                              @zootie:

                              ….........
                              Can anyone confirm they got the new precompiled drivers using the instructions on ...........

                              Confirm.

                              kldstat.jpg
                              kldstat.jpg_thumb

                              1 Reply Last reply Reply Quote 0
                              • Z
                                zootie
                                last edited by

                                That's not enough to confirm. You have to access the interfaces (that is when the VM crashes for me and other users). Please assign them an IP address (or run the assign interfaces command in the menu and assign WAN/LAN to the hnX adapters) and if it doesn't crash, please post the output of ifconfig showing the hnX interfaces with IP addresses.

                                Independently if these instructions work (which if they do, at best might only work on some systems). I just had a breakthrough and I finally was able to load recompiled hyperv-1.0 drivers on pfSense 2.1. I still need to do more testing and do my due diligence, but if the precompiled drivers don't work for you and/or if you're having issues with the August 2012 drivers (used in Alex Appleton method and in my and PollyPy's installer ISOs), don't waste too much time: a new improved version is likely coming in the next few days.

                                1 Reply Last reply Reply Quote 0
                                • H
                                  hmh
                                  last edited by

                                  @zootie:

                                  …. don't waste too much time: a new improved version is likely coming in the next few days.

                                  This is very good news!!! Thank you, i will wait few days, please post news in this thread!

                                  1 Reply Last reply Reply Quote 0
                                  • R
                                    rafaurl
                                    last edited by

                                    windows server 2012 with pfSense-LiveCD-2.1-RELEASE-amd64-hyperv-kernel-20130915-1129.iso + squid3 + lightsquid causes Panic String: sleeping thread (same as https://forum.pfsense.org/index.php?topic=72539.0). Uninstalling squid3  + lightsquid seems to solve the problem, but can't make more test as it's in production

                                    1 Reply Last reply Reply Quote 0
                                    • M
                                      mylle
                                      last edited by

                                      Waiting patiently :)

                                      1 Reply Last reply Reply Quote 0
                                      • Z
                                        zootie
                                        last edited by

                                        I started a new thread and uploaded the new drivers in https://forum.pfsense.org/index.php/topic,73258.0.html

                                        I decided to start a new thread because the new drivers are a considerable departure from the methods discussed on this thread, and to make it easier to find them (since the first couple pages in this thread are a bit preliminary and a bit obsolete).

                                        If you had issues with the old drivers, please give the new drivers a try and let us know how they work in your environment.

                                        1 Reply Last reply Reply Quote 0
                                        • H
                                          HC
                                          last edited by

                                          Hey everyone, so I got the image running in hyper-v (2008r2) but I cant make any changes to the firewall or NAT. It takes system preferences changes like users and passwords, dns changes but that's about it. any ideas?

                                          im also getting scrolling message every 5 min or so on the console.

                                          hv_kvp_negotiate_version
                                          Hyperv-utils1: detached
                                          hyperv-utils1 on vmbus0
                                          hyperv-utils1: Hyper-V service attching: Hyper-v sevice attaching; Hyper-v KVP Service
                                          
                                          1 Reply Last reply Reply Quote 0
                                          • ?
                                            Guest
                                            last edited by

                                            Please see the ESF response: https://forum.pfsense.org/index.php?topic=73258.msg402614#msg402614

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.