My goal is to have a FreePBX VM that I could keep up to date and that acts as my template when I want deploy a new VOIP server.
I tried this today and ran into a problem.
My template is the latest FreePBX distro that is shutdown before the initial admin password wizard is run on the Web UI.
The IP was already set during the CLI installation.
I cloned this VM to a new VMware machine for testing.
I changed the MAC, IP and hostname in the CLI.
All of the settings in FreePBX are configured with the new IP.
When it came time to provision the first phone (using HTTP), the phone screen showed as trying to pull its configuration from the IP of the template server.
So my question is: Is there a viable way to create new FreePBX servers from a template without problems? How would I check which configuration is making the phone attempt to pull its config from the IP of the template?
Iām currently running a recursive grep on my server to find old traces of the template IP address.
We later tried to provision through TFTP with a DHCP option 66 and it worked flawlessly with the new IP of the server that was deployed from the template.
Lets say I created my template with the IP 192.168.1.10.
I then cloned this template server to a new VM.
I set the IP of the new VM to 192.168.1.11.
When everything is said and done (Extensions, Users, Apps, etc.) and I go to provision a phone for the new FreePBX server (192.168.1.11), the phone still attempts to pull its configuration from the IP address of the template (192.168.1.10).
Hence, either the FreePBX distro doesnāt like to be cloned, or I missed a configuration change somewhere.
We are using Sangoma phones. We have a deployment in our Sangoma portal that points to the IP of the new server (192.168.1.11). The phone, which is part of the deployment, is still trying to grab its config from the old IP (192.168.1.10).
The only relation that the phone has to the IP 192.168.1.10 is that it was the IP of the template server used to create the new server.
Now, when you setup a new FreePBX VM, right after all of the packages have installed it runs you through a wizard where you get to specify the IP address. Is there any way to re-run that wizard?
Yes. We had factory reset the phone many times. We also manually updated the firmware to the latest stable version.
We also tried rebooting the server, still no luck.
If the phone gets provisioned with TFTP it works fine, but not HTTP. It still points to the IP of the template.
It boggles my mind. This is why I believe that there are still traces of the old IP still in there.
If you are using redirect server then you must have in our portal the wrong IP set as that is a internal IP so you must be setting it in the portal with the wrong IP. Anyways this is something with your setup you need to figure out and has nothing to do with your cloning a machine.
OK, so maybe Iām asking the wrong question. What makes you think the cloning has anything to do with it?
From what I can gather, youāre factory resetting a phone, and then itās immediately trying to connect to the wrong IP address. Why do you believe that has something to do with cloning a VM?
Edit: Have you checked the contents of the config file?
We have checked the config file and the correct IP is there. For some reason when we try to provision the phone using HTTP the wrong IP always shows up.
The only relation between the new server and the 192.168.1.10 IP is that it belonged to the template server from which the new server was created from.
We never even activated the template server. We never setup the admin password for it. The minute it the template server was able to be accessed via the web, we shut it down and cloned it to make the new server.
Nowhere have we ever configured 192.168.1.10. Not on our firewalls, not on our Sangoma portal.
When we cloned the VM, the new server didnāt get an IP because of the MAC address change. I had to edit the network scripts file with the correct name and MAC.
So based on our findings, we are assuming that there are still some traces of the old IP (192.168.1.10) that is still on the new server. I mean, theres no other way that the phone would even know to look for its config at 192.168.1.10. This is why Iām GREPāing the entire file system of the new server for the template IP. It just doesnāt make any sense.
In the new server, the provisioning protocol is HTTP and the authentication is set to āNoneā. No DHCP options are specified.
When we boot the phone, on the bottom of the screen, it shows trying to provision itself using the IP of the template server (192.168.1.10). Please note that we never configured this IP anywhere else but on the template server which is offline at this point.
Since that process doesnāt work we tried testing with the DHCP option 66. This method works and when the phone boots it provisions itself from the correct server (192.168.1.11).