Asterick not works on VM

Get help with installing and running AsteriskNOW.

Moderators: Moderator, Support

Asterick not works on VM

Postby gerardrev » Tue Apr 21, 2015 4:57 am

Hello my name is Gerard, I am new here.
I installed asterisk on a VM (virtualbox), after I entered freepbx administration and I created two new extensions.
Then I configure the extension on a client softphone, one extension on the same computer (100 extension) and another on other computer (101 extension).
With the same configuration on client softphone, only can connect the client the extension 100.
I can do ping between computers. Work only clients configured on the same machine, never on another pc, mobile etc

I think the problem may be in the network mode on virtualbox. I try with bridged adapter, and NAT, with NAT I can't do ping from other computer into VM, but yes if output (from VM to client).
*The documentation says that the NAT can provide connectivity problems.
But with bridge mode should work right?
Any ideas?

Thank you very much.
Posts: 1
Joined: Tue Apr 21, 2015 4:45 am

Re: Asterick not works on VM

Postby jwsmythe » Wed May 13, 2015 1:17 am

Asterisk can work as well on a VM as it does on a stand-alone PC. There are a lot more variables involved though.

I happened to have used VirutalBox and VMware extensively, so I can help a little bit.

VirtualBox is only for running on a regular desktop computer. Unfortunately that means that the VM will be competing for resources with everything else on your computer. Even if you set up a headless Linux box with no GUI to run VirtualBox on, you'll still most likely run into performance problems.

VMware Player is the same situation as VirutalBox.

For it to work satisfactorily, you'll want to get the current VMware ESXi hypervisor. They have a free license now, but I haven't tried it to see the limitations. You'll want to find everything you can about tuning for low-latency applications, which will involve a lot of tuning. You can disregard people insisting that you have to use [whatever] vendor's hardware. Any decent x86_64 based hardware will perform well, *IF* you designed the hardware well. Picking up the cheapest eMachines box and trying may run, but you won't be satisfied.

Through my own experience, using local storage, even under ESXi, doesn't work well. You'll want to use SAN to a iSCSI server or better, with a well built RAID 5 or better. You can use open source iSCSI servers. I happen to be using them under Linux with great success at a few sites.

With all that said, that's probably why it's no one recommends using VMs, and probably why no one has answered you yet.

For your question about bridging, yes, that exposes your virtual network card to the outside world with no visible layers in between. It doesn't provide NAT or any filtering. You absolutely do *NOT* want to use VirtualBox's NAT. That will break everything. That's only good if you're setting up a VM to use locally, like a VM with a desktop OS that you want to try out. Getting in to that VM from anywhere off of that physical computer isn't going to work. Heck, even trying to get to it from the host or another VM is going to be troublesome at best if you're lucky.

If you have the Asterisk VM configured with the bridge adapter, *and* it is working properly, you should be able to ping it from another computer.

CentOS and all Redhat derived distros remember your network device. If you remove one and add a new one, it will be seen as a second interface and will need to be configured like a second (or third, or fourth) network card.

When you change a network interface, you'll need to ...

Go into /etc/sysconfig/network-scripts/ifcfg-eth* , and remove the HWADDR and UUID lines. You'll also need to go into /etc/udev/rules.d/ and delete any files relating to the network. 70-persistent-net.rules is auto-generated at boot time, and will remember that whatever your network interface is. After doing those, you'll need to reboot. That's a gotcha on physical machines too, that I've seen admins fight with for days because they don't know everything about the system they're working with.

On the VM, you'll need to make sure iptables and ip6tables did not start, or at least stop them.

On the VirtualBox host, you'll need to make sure the OS doesn't have any firewalls blocking things. If you're using Windows as a host, you can be pretty sure the new found network device automatically got a firewall enabled on it. You may need to disable the firewall on the physical device also. For the sake of testing, disable the Windows firewall entirely. If you have any other firewalls, which may even be included with your antivirus software, you need to make sure they are disabled.

At this point, you'll be wishing you just went ahead and found an old PC to put Asterisk on. :)

I'm only doing it in a VM, because I have a good business purpose for doing it, *AND* I have massive resources on my hosts that I can dedicate to this.

I'd love to help you diagnose it, but there are so many variables to look at, and I'd really need to be sitting there to check over every piece of it to figure out what you did wrong. I've tried to talk people through such problems over the phone or via email, and when I finally go there in person I find that when I said "check this", they thought they did but were looking at the wrong thing.

I'm not an official anybody, just another guy getting things working for his setup. :)
Posts: 2
Joined: Mon Apr 20, 2015 10:12 pm

Return to AsteriskNOW Support

Who is online

Users browsing this forum: No registered users and 1 guest