x64 Distro on hyper -v

I’m trying to install FreePBX on a server 20012 hyper-v virtual machine.

Downloaded the distro latest x64 stable distro: FreePBX-2.210.62-3-x86_64-Full-1357257745

of course, I get to the point of the install that asks for the network card driver as it can’t recognize hyper-v’s virtual nic. I looked around and found this forum link.

http://www.freepbx.org/forum/freepbx-distro/distro-discussion-help/install-freepbx-distro-on-hypet-v-no-driver-found

i downloaded the Linux Integration services at the bottom of the link but could not figure out how to use this with the distro. The instructions say to set this up after the linux installation, but the distro does not let me go beyond the “no driver found” screen. Hence I can;t install the integration services.

I’m pretty useless at linux, so i was hoping to install the distro the “easy way”. Can this still be done?

No we do not support Hyper V. Sorry.

Try using a legacy NIC

Hamfist,

Sorry, but I don’t understand. Could you explain a little more?

check the ‘Settings’ of the Virtual Machine you created for FreePBX. I haven’t played around with Hyper-V 2012 yet, but in 2008, you could specify a network card as type ‘Legacy’, and FreePBX will detect it just fine.

Change the setting then restart your installation.

Perhaps more constructively, try not to use Windows.

Pretty well anything from M$ will FU sooner or later, usually on Tuesday!!

JM2DWAE (D instead of C because of Bill, nice one Bill :slight_smile: )

Dicko - all flaming aside, What platform would you suggest running virtual instances of freepbx on?

Ideally a hardware based one like KVM (built into most modern linii), Xen and OpenVZ have their proponents, It depends on what hardware you have though. But the closer the machines are to the underlying hardware the better, That’s why M$ is not recommended.

I have freepbx running in Hyper-V 2012 and its doing pretty good. The machine that I’m running is not anything that’s new it’s a quad-core AMD machine from 2010 with 8GB or RAM. The thing that you want to make sure is that your processor supports VM. Now with that being said when you try to install FreePBX it will not recognize the Virtual NIC from Microsoft during the setup of the VM. So while you are in the Hyper-V management console (not while it’s running) under virtual switch make sure it says “Not Connected” then on the left side of the Management Console select add new hardware and select legacy NIC. This will allow you to complete the installation and set Freepbx up. Start VM and install Freepbx like normal.

I did notice some audio issues when playing back voice mail. I also have a sip trunk from Freepbx to Cisco Call Manager 4.3 and when playing voice mail through my Cisco phones the audio was a little choppy. So after you have Freepbx installed you will want to install linux integration service 3.4 for Hyper-V. You can get it from http://www.microsoft.com/en-us/download/details.aspx?id=34603 and there is also a .pdf on how to install it. When you do this you will be able to remove that legacy NIC and use the Hyper-V NIC.

Here are somethings that I ran into, once the integration services are installed (follow that .pdf) you will have to make a file under /etc/sysconfig/network-scripts/ to get the NIC to pull an IP via DHCP. I’m using a statically assigned IP. If you are not fimilar with linux just use the command:
vi ifcfg-ethX
where X is the NIC adapter. If you use the command :
ifconfig
you will see your nic probably diabled so use the command:
ifconfig ethX up
then use the command:
ifconfig
command and verify the MAC address and make sure is the one from hyper-V. In hyper-V you can see you NICs MAC by clicking the + next to the NIC and click adavance.
Now just the following lines to your ifcfg-ethX file:

DEVICE=ethX
ONBOOT=yes
BOOTPROTO=dhcp

All you have to do at this point shutdown your nic :
ifdown ethX
Then startup your nic :
ifup ethX

The audio is much better now, it wasn’t that bad before.
By the way vi is a command line text editor reminding me of the days of edlin so here are some tricks to use it if you are not fimilar:

When you first make a file you will not be ale to edit it until you press the I key, you should see INSERT on the bottom of the editor window. When you are done editing the file press ESC. The press the “:” key and type the command “wr”. That is how you save the file. Then press “:” key again and enter the command “q” to quit the program. If you want to know more about vi just bing it, there is a lot of information out there. Hope this helps.

PS you can run Hyper-V bare metal if you want.

1 Like

Mikeisfly1 -

Great job Mike, folks seem to confuse ‘we don’t support it’ with ‘it can’t be done’.

When one of the project managers says ‘we don’t support it’ it means:

1 - The development team has never tested it
2 - The development team has tested it and the PIAF vs reward factor was low
3 - One of the folks on the project thinks it’s bad idea and simply dismisses it(people will be people).

This is an Open Source project, as Mike has shown by know means are the developers of FreePBX (essentially a PHP app) the be all to end all server, platform, network et al experts.

Supported hardware is the most conservative track that is going to lead a newbie to success. If you have clear cognitive skills, a knowledge of the virtualization environment and some basic Linux skills by all means give it a run.

There are distributions and communities for running Asterisk (and sometimes Asterisk FreePBX) on a myriad of devices.

I want to send a case of booze and a couple of hookers to Mike’s place because he “gets it”. Open Source software is enabling, but you gotta do the legwork.

This content should get into the wiki.

1 Like

Nice write up Mike, and good info to put into the wiki for sure, hopefully someone with access will do it…

1 Like

mikeisfly1, It’s people like you that keep the community going! Thanks a bunch. I will give it a go in a few days!

I managed to install with the legacy NIC. All is working well except that now I can;t seem to connect to any SIPSTATION even though all the ports are open. I have not added integration services yep, will do now and see if that has something to do with this.

Installed Integration services and nothing changed. Noticed I had two virtual nics in Hyper-v and one I did not use, so I deleted the exta virtual card. My SIPTRUNKS showed a PASS with the firwall test, but still could not connect to the trunk. very strange. UDP 5060 and 10000-20000 are being forwarded to the PXB machine and still cannot connect to the trunk. If anyone has any ideas…

I just installed the latest distro on a 2012 Hyper-V host. It just “works” out of the box. It even works with the advanced (instead of legacy) network adapter. I did have a problem when trying to specify a static IP address as the virtual server could not “see” the internet.

Installing with the default DHCP option, and then changing the IP later worked just fine. The whole process took about 20 minutes.

Good luck to everyone trying to mix these two worlds.

I’ve been testing 2012std the last couple of weeks getting ready to migrate from Elastix dinosaur and Server2003 to a 2012HV/FPBX combo and was sure I had it running on HV before the last format. Thank you for showing how because be stuffed if I remembered how I did it and I was starting to throw … errr… dung around the place everywhere.

Next task after getting the VM’s stable, learn enough Powershell to remove the wasted GUI from the host (oh boy there goes the neighborhood… swear jar be full).

I just unfortunately can’t afford the compatible hardware to get USB passthrough to work with ESXi5 so I’m stuck with Windblows :(.

I have been running FreePBX on a Server 2012 R2 Hyper-V vm for a couple months now. It runs very well! I am still running with the Legacy adapter and have not experienced any audio issues or performance issues. I am now going to try the synthetic nic. Thanks.

My VM has a static IP and is on the local network with Internet connectivity. I have no static IP issues whatsoever.

Rob

1 Like