VirtualBox and trixbox. How to run trixbox as a virtual machine.
Installing and testing trixbox
- Our VirtualBox introduction dealt with the basic installation and configuration of a Guest OS running under VirtualBox on a Windows host.
- You can install a Guest OS either from a CDRom or from the ISO image.
- For this trial the test bed was a 1.4GHz laptop with 512M RAM, running Win XP. (It was spare at the time).
- We have installed trixbox versions 2.2.12; 2.4.0 and 2.4.2 using either a CD or the ISO image file.
- Both methods worked and all the versions we tested ran OK.
Our test setup
- Two Cisco 7940 or 7960 SIP phones
- One inbound Sipgate SIP trunk
- One outbound Gradwell IAX2 trunk
- One Dante IAX2 softphone
- Basic IVR
Setup and Testing
- Configure each Centos trixbox guest to have the same IP so that it was possible to move from one trixbox guest to another without reconfiguring the phones.
- Log into trixbox and the freePBX control panel.
- This works from a browser either on the Host or from another PC on the network.
- Update a large selection of freePBX modules.
- Configure trixbox to connect to the phones and trunks.
- Setup voicemail for the phones
- Setup routes and configure the IVR.
- Make a simple IVR recording
- Check that calls can be placed and received.
- Leave and Receive Voicemail
- Test out the Dante softphone.
- Can make and receive calls with Dante on the Host and on another PC.
Swapping Guest OS’s
- You can either shutdown the Guest
- in which case next time you access the Guest it will reboot
- Or you can suspend the Guest to a disk file
- in which case next time you access the Guest the file will be reloaded and the Guest should carry on from when it was suspended
- If you were logged in before saving the state. You will still be logged in when you resume.
All these (above) were tried and worked.
The following have not been tried yet.
- You can save snapshots at a point in time.
- You can then revert to a previous snapshot if you make changes that break the system.
General Issues
- There were some issues, none of which seemed serious (Otherwise this How-to would not have happened)
- FreePBX
- On 2.2.12 we tried to update a large number of FreePBX modules at the same time.
- This update timed out (threw out an error) and some modules were not updated.
- Just went back to an earlier FreePBX page and re-ran the update for the missing module.
- Problem resolved.
- Guest OS date and time - see below
- Shutdown - see below
Specific Guest Version Issues
2.2.12
- This version offers two kernel options at boot time.
- The default is the SMP kernel - VB won’t boot this.
- Make sure you quickly select the single kernel version on the Grub screen on the first boot.
- Otherwise the VM will hang
- Then edit /boot/grub/grub.conf and change default=0 to default=1
- Date and Time
- This version syncs the date and time when it boots.
- This seems to work fine.
- A system in a “saved state” obviously gets out of sync, maybe it will catch up.
- A reboot updates the time.
- Shutdown from the VB Machine menu works fine.
2.4.0
- System time is wrong (over 2 days out!)
- ntpd was not updating properly
ntpq -p
- returned a connection error, so found this recent thread on the trixbox forum and ran
service ntpd stop ntpdate -u 0.pool.ntp.org service ntpd start
- Time is correct in V2.4.2
- VB will not generate a “shutdown” with 2.4.0 as a Guest.
- Solution shutdown from within the Guest OS and then use VB to power down.
2.4.2
- Date and Time correct
- Need to shut guest down from within Centos as with 2.4.0 and then use VB to power down.
Host CPU Utilisation
- On the 1.4G XP laptop with nothing else particularly going on, apart from running a Centos guest, the CPU utilisation ran at about 16 - 26%. If you push up the Centos load the host CPU load will go up. At times it reached 100% as to be expected.
Conclusion
- Overall the exercise worked out well. On the laptop a single instance of trixbox ran under VB 1.5.4 with very few problems.
- VirtualBox seems a very reasonable platform to test out new versions of trixbox
- The host hardware was not powerful enough to run with multiple live Guests, that’s for next time.
- No tests were carried out running VirtualBox on a Linux Host, again that’s for next time.
Caveats and Feedback
- Test VirtualBox on some spare hardware. If it or you screw up - don’t wreck your only PC.
- The Guest VM is only written to your host as a disk file, so you can delete it.
- We have only scratched the surface of the capabilities of VirtualBox.
- We were impressed and will continue testing.
- We did not try sharing the USB or Serial ports. Nor did we try sharing files between Guest and Host.
- Somewhere there may be a feature in VB that really causes problems. We did not find it but you might.
- We would like to know how you get on. Our Contact details.
- YMMV Good luck.