In researching my recent VoIP articles I have been playing around with a version of Asterisk designed specifically to run within a VMWare environment. I will expand on this is much more detail in part 3 of the Telephony article series, but I have been encountering what appears to be a common problem in this particular type of setup that seems difficult to resolve. Specifically, Asterisk in VMWare would appear to suffer from pretty bad audio playback problems to the point of making the audio almost unintelligible. Please note, though, that I am referring to pre-recorded audio such as the voicemail announcements, and not to any ‘live’ audio. Still very annoying and enough to cause someone to dump Asterisk.
However, there is a solution. Having tried all the usual angles that have been tried with varying degrees of success by many other people, such as amending grub.conf and setting the vmware process priority to high. I tried these and was not satisfied with the results, indeed found it difficult to discern a difference. I then remembered a problem I’d had with some older games on my shiny new (as it was then) dual-core AMD Athlon PC which had been resolved by setting the processor affinity. So I tried this hack with the relevant vmware-vmx.exe process (using Process Explorer from Sysinternals) and that seemed to do the trick.
However, I restart this PC on a regular basis as I don’t like to keep it running overnight, and the next time the PC was re-booted the audio problem returned. Of course, the processor affinity change doesn’t survive a reboot. However a little more exploring revealed that VMWare, in their wisdom, have included a means of excluding CPU’s from within the virtual machine’s configuration file – *.vmx All you need to do is add the line
processorN.use = “FALSE”
where N is the number of the processor you wish to exclude that VM from using. I’m pretty sure you can have multiple line with different values for N, in case you have more than 2 virtual or physical CPUs. Having set this value, next time you fire up your PBX in a virtual machine it only uses the processor(s) you have not excluded. I would recommend only using a single processor, after all Asterisk is not a huge resource hog.
So if you are experiencing an audio judder issue with any of the Asterisk-based packages within a VMWare environment, and nothing else has worked, then give this a go. It might just do it. I’d love to hear if it has helped anyone.
No Responses
Leave a Reply
Hello, my name is Alex, i’m a newbie here. I really do like your resource and really interested in things you discuss here, also would like to enter your community, hope it is possible:-) Cya around, best regards, Alex!
Alex,
It’s a blog…anyone (bar comment spammers) is welcome