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

Creating Hyper-V VM to be exported on Azure

Scheduled Pinned Locked Moved Virtualization
9 Posts 4 Posters 4.6k 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.
  • I
    insalata_fresca
    last edited by Jan 22, 2016, 2:20 PM

    Hi guys,
    I am actively using Azure for my whole infrastructure but since Azure Gateway is crap I am looking forward to host a VM in Azure with pfSense on it which is really great.
    Here is the point where I am:
    1. I need to deploy an Azure VM in the new Resource Manager System (not a classic one)
    2. I have Windows 10 with Hyper-V installed which is where I create the vhd to create the VM for Azure
    3. I used as baseline this guide http://vaggeliskappas.com/2015/07/23/running-pfsense-as-an-azure-iaas-virtual-machine/

    I explain you the problems I am having.
    I am able to get in Hyper-V a VM running which is reachable in SSH and via http for the pfsense configuration. The machine is created with a vhd fixed size of 1gb and two Network Interfaces (legacy network interfaces are not working for me)
    When I upload the vhd to Azure creating the correct VM though it is no way to connect to the VM any more. I tried SSH and http but the machine seems to not exist.

    Can you help me on this issue?
    Am I creationg the VM wrong in Hyper-V?
    Am I missing something to configure on the pfsese in order to be Azure ready (I installet phthon and the Azure Agent on the pfsesne machine) ?
    Do you know of any topic or forum where someone tried something like that?

    Thanks a lot for the help :)

    1 Reply Last reply Reply Quote 0
    • A
      Aglover
      last edited by Jan 27, 2016, 2:10 PM

      I am stuck at the very same point as you.

      Azure support suggested i follow this article too

      https://t.co/redirect?url=https%3A%2F%2Ft.co%2FnTdPR4Ctrx%3Fcn%3DcmVwbHk%253D&t=1&cn=cmVwbHk%3D&sig=5d8806e4b46eb5f82bbd5895f9ad1212c90bfcde&iid=cc17b3d24bed43989103c6f8c672dd2a&uid=931340077&nid=27+1268

      I did the additional steps defined in this document namely the echo commands and i am now in the process of uploading my vhd.

      I will report back my progress.

      Please let me know if you have any luck also

      Regards
      Aaron

      1 Reply Last reply Reply Quote 0
      • V
        vkappas
        last edited by Jan 27, 2016, 7:48 PM

        Have you tried to connect to the pfSense VM from another Azure VM which is on the same subnet as pfSense's LAN interface ?

        1 Reply Last reply Reply Quote 0
        • I
          insalata_fresca
          last edited by Jan 28, 2016, 2:00 PM

          I tried that guide too.
          I see that the waagent is not running by deafult and I also enforced the launch with a script at boot.
          But no way to connect to the machine once uploaded.
          I als tried to connect from a nother vm within the same network, but with no success.
          If needed I can share the link to the vhd I created if someone wants to review it:
          https://sharedstoragearmaxpi.blob.core.windows.net/pfsense/pfsense.vhd

          1 Reply Last reply Reply Quote 0
          • A
            Aglover
            last edited by Jan 29, 2016, 6:24 AM

            Insalata_fresca

            Thank you for posting your VHD. Very helpful. Atleast it boots for in azure. There just seems to be a problem with the NICs.

            Here is the boot diagnostics from running YOUR vhd.

            A few questions;

            • Did you assign hn0 as WAN NIC?

            • Did you assign hn1 as LAN NIC?

            • Did you Enable networking Configure the hn0 interface so Azure can use /etc/rc.d/netif to stop and start networking:
              root@:~# echo 'ifconfig_hn0="SYNCDHCP"' >> /etc/rc.conf
              root@:~# service netif restart

            • Enable SSH Enable the SSH daemon in /etc/rc.conf:
              root@:~# echo 'sshd_enable="YES"' >> /etc/rc.conf
              root@:~# service sshd restart

            What Static IP Address did you assign to hn1? (Your LAN NIC) - It appears from the boot diagnostics capture that perhaps you set it to 172.24.10.11 ?
            The article uses 172.16.2.10

            We are soo close now I think. I wish I could get as far as you and have a booting VM!

            How exactly are you enabling the Azure waalinux agent? Can you please share the command. I am a complete noob.

            Are there any other steps you are doing whilst preparing the Hyper-V machine before upload?

            Happy to skype/email if you want to work at this issue together. As for timezones I am in Sydney Australia but can generally make myself available for chat at anytime.

            Thanks in Advance.
            Aaron

            1 Reply Last reply Reply Quote 0
            • A
              Aglover
              last edited by Jan 29, 2016, 7:07 AM

              So an Update.

              Insalata_fresca… you did set the LAN nic to "172.24.10.11" once I configured my vnets accordingly I could communicate to it from another VM on the SAME subnet. SSH directly the LAN interface 172.24.10.11

              I am now about to attempt the User Defined Routes and IP Forwarding for the vnet. I will report my progress.

              If I can do anything to assist you please let me know, if I can suggest turning on boot diagnostics from the azure preview portal, and then checking for the screenshot. that was the biggest help in diagnosing the issue with your image.

              Thank you again soo much for your working VHD!!!!

              1 Reply Last reply Reply Quote 0
              • V
                vkappas
                last edited by Jan 29, 2016, 8:42 AM

                I’ve uploaded the image that I used for my blog post to OneDrive and you can find it here:

                http://1drv.ms/1nR3bdw

                Details about this image

                Username: admin
                Password: pfsense
                WAN Interface: hn0 (DHCP)
                LAN Interface: hn1 (172.16.2.10/24)
                Blog Post URL: http://vaggeliskappas.com/2015/07/23/running-pfsense-as-an-azure-iaas-virtual-machine/

                S 1 Reply Last reply Dec 4, 2018, 7:47 AM Reply Quote 0
                • I
                  insalata_fresca
                  last edited by Jan 29, 2016, 9:27 AM

                  Hi Anglover,
                  I need some information from you.

                  I was not able to run your commands. Opening the vhd in Hyper-v
                  service sshd restart
                  service netif restart
                  are not existing in my vhd.

                  1. How have you read the logging in your screenshot? where you in a hyper V?
                  2. What VM have you created, a classic or a RM Azure Virtual Machine?
                  3. Can you share me your vhd and how you deployed the machien please?

                  Thank you

                  Ste

                  1 Reply Last reply Reply Quote 0
                  • S
                    Sowhit @vkappas
                    last edited by Dec 4, 2018, 7:47 AM

                    @vkappas

                    Can you share an working image of pfsense that can be uploaded to Azure, i have been trying to do this for quite some time.
                    I was able to upload and get it started, im stuck with HTTP referer error.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                      This community forum collects and processes your personal information.
                      consent.not_received