VMware Communities > VMTN > Desktop Products > VMware Workstation > Discussions
1 2 Previous Next
29 Replies Last post: Feb 20, 2008 9:33 AM by xbalanque
Reply

Make ALSA sound work in VMWare

Jan 17, 2006 5:56 AM

Click to view jamespharaoh's profile Lurker jamespharaoh 2 posts since
Jan 17, 2006
It is easy to get vmware to use alsa in linux, but this is not supported:

- Replace vmware-vmx with the following script:

#!/bin/sh
PATH_TO_VMWARE_BIN=`dirname $0`
LD_PRELOAD=libaoss.so exec $PATH_TO_VMWARE_BIN/vmw

This shouldn't cause any problems if the libaoss library is not installed or not setuid, it will simply work through the old OSS library as normal.

This could probably be quite easily be integrated as a configuration option into a future version of your product.

It does actually provide useful functionality as the sound is mixed with other applications using dmix.
Reply Re: Make ALSA sound work in VMWare Jan 17, 2006 6:25 AM
Click to view DaveP's profile Master DaveP 1,360 posts since
Aug 30, 2003
Thanks for that very useful.

Dave
Reply Re: Make ALSA sound work in VMWare Jan 17, 2006 8:32 AM
Click to view jamespharaoh's profile Lurker jamespharaoh 2 posts since
Jan 17, 2006
One more point actually, this tip is posted around the net for vmware 3 but used to break in 4 and 5. I think the reason it now works again is that the newer versions of libaoss override the open64 function in addition to the open function, the newer versions of vmware use this to open the sound device.
Reply Re: Make ALSA sound work in VMWare Jan 17, 2006 1:22 PM
Click to view crys0000's profile Lurker crys0000 4 posts since
Apr 9, 2004
Could you please explain what is "vmw" in your script? No files with that name exist, maybe you mean vmware-vmx-real?

This is my vmware-vmx script:

#!/bin/sh
PATH_TO_VMWARE_BIN=`/usr/lib64/vmware/bin $0`
LD_PRELOAD=libaoss.so exec $PATH_TO_VMWARE_BIN/vmware-vmx-real

Unfortunately now when I try to power on the virtual machine I get this fatal error:

Unable to change virtual machine power state: Failed to connect to peer process.

Where is the problem?
Thanks.

Reply Re: Make ALSA sound work in VMWare Jan 18, 2006 10:06 AM
in response to: crys0000
Click to view crys0000's profile Lurker crys0000 4 posts since
Apr 9, 2004
Finally I've made it work, it's very simple, you don't need to rename anything.
Just use this script:

#! /bin/bash
LD_PRELOAD=libaoss.so exec /opt/vmware/workstation/bin/vmware "$@"

Obviously the path depends on where you have vmware installed.

I hope this can help.
Cristiano
Reply Re: Make ALSA sound work in VMWare Feb 20, 2006 5:35 AM
in response to: crys0000
Click to view KnuX's profile Novice KnuX 19 posts since
Feb 26, 2005
I notice yesterday that running "/usr/share/alsa-base/snddevices" (as root) will set a working "/dev/dsp". Only a "/dev/snd" directory exists on my Debian Unstable if I doesn't run it.

All features are on : mixer, micro support, etc.

For the virtual machine, "/dev/dsp" is the sound card, windows mixer is OK :)

Message was edited by:
KnuX
Reply Re: Make ALSA sound work in VMWare Feb 20, 2006 10:28 AM
in response to: KnuX
Click to view KnuX's profile Novice KnuX 19 posts since
Feb 26, 2005
Hm sorry, vmware's sound are not mixed with alsa's sound (alsaplayer for example)
Reply Re: Make ALSA sound work in VMWare May 24, 2006 10:45 AM
in response to: KnuX
Click to view KnuX's profile Novice KnuX 19 posts since
Feb 26, 2005
I made a script called "starvmware" which is located in my ~/ directory :
#! /bin/bash
LD_PRELOAD=libaoss.so exec /usr/bin/vmware "$@"


It works, but for example I can't run a virtual machine which works without the script, I got this message :
Cannot open the disk '/home/knux/vmware/Windows XP Professional/Windows XP Professional.vmdk' or one of the snapshot disks it depends on.
Reason: File too large.


File is :
-rw------- 1 knux knux 2,9G 2006-05-18 18:56 Windows XP Professional.vmdk

The unique virtual machine I can use, is one with a 6Gb .vmdk file, pre-allocated. Others virtual machines have their .vmdk file > 2Gb, not pre-allocated.

Is there a workaround for this problem ? I'm on Debian Unstable and I don't understand why this happens :/
Reply Re: Make ALSA sound work in VMWare Jul 4, 2006 12:04 AM
in response to: KnuX
Click to view p2k's profile Novice p2k 10 posts since
Jul 3, 2006
Well I'd love to see that Petr's esd and arts wrappers would also support alsa natively. I once tried to patch something together, but never got very far.

I think that would really solve everyone's problems. Or even better, get ALSA support natively into vmware. Maybe for version 6.0?

thanks
Philipp
Reply Re: Make ALSA sound work in VMWare Oct 10, 2006 2:19 PM
in response to: p2k
Click to view KnuX's profile Novice KnuX 19 posts since
Feb 26, 2005
$ LD_PRELOAD=libaoss.so exec vmware "$@"
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
ERROR: ld.so: object 'libaoss.so' from LD_PRELOAD cannot be preloaded: ignored.

It seems to be hard for the moment to get vmware working with alsa on Debian Testing...

Anyone has an idea of why I can diagnostic this problem in order to resolve it ? ;)
Reply Re: Make ALSA sound work in VMWare Oct 22, 2006 11:11 AM
in response to: KnuX
Click to view KnuX's profile Novice KnuX 19 posts since
Feb 26, 2005
Preloading is possible using root access...

"sudo aoss vmware"

I don't know how to adjust libaoss permissions...

$ ll /usr/lib/libaoss*
-rw-r--r-- 1 root root 15K 2006-09-11 13:26 /usr/lib/libaoss.a
-rw-r--r-- 1 root root 851 2006-09-11 13:26 /usr/lib/libaoss.la
lrwxrwxrwx 1 root root 16 2006-10-10 23:10 /usr/lib/libaoss.so -> libaoss.so.0.0.0
lrwxrwxrwx 1 root root 16 2006-10-10 23:10 /usr/lib/libaoss.so.0 -> libaoss.so.0.0.0
-rw-r--r-- 1 root root 15K 2006-09-11 13:26 /usr/lib/libaoss.so.0.0.0
Reply Re: Make ALSA sound work in VMWare Nov 8, 2006 3:08 PM
in response to: KnuX
Click to view noend's profile Lurker noend 1 posts since
Nov 8, 2006
This is what I did in order to have VMware alsa sound on Debian:

1. sudo aptitude install alsa-oss
2. sudo chmod +s /usr/lib/libaoss.so.*
3. sudo mv /usr/bin/vmware /usr/bin/vmware2
4. sudo touch /usr/bin/vmware
5. echo '#!/bin/bash' >> /usr/bin/vmware
6. echo 'LD_PRELOAD=libaoss.so exec /usr/bin/vmware2 "$@"' >> /usr/bin/vmware
7. vmware

Tested on VMware version 5.5.2 build-29772.

Hope it helps.
Reply Re: Make ALSA sound work in VMWare Jan 9, 2007 1:09 AM
in response to: noend
Click to view hsk's profile Lurker hsk 1 posts since
Jan 9, 2007
Step 6.5:
chmod +x /usr/bin/vmware

Message was edited by:
hsk
Reply Re: Make ALSA sound work in VMWare May 26, 2007 1:34 AM
in response to: p2k
Click to view Sigmoid's profile Novice Sigmoid 5 posts since
Mar 9, 2007
Well, with 6.0, things got even worse.
Now absolutely no preloaded libs work. This basically means for me that I have no sound. Absolutely no sound.

I wonder how much work it would have been to add ALSA support. Not too much I reckon.

Is there any way of getting sound out of vmware workstation 6.0 on an ALSA system without kernel level OSS emulation? As I stated, libaoss doesn't work, and it just simply doesn't, no preload errors or anything, Vmware just states that it failed to open /dev/dsp.
Reply Re: Make ALSA sound work in VMWare Jun 11, 2007 3:01 AM
in response to: Sigmoid
Click to view Edoardo's profile Enthusiast Edoardo 64 posts since
Jan 10, 2006
with WS6 I got rid of the /dev/dsp busy ... sound will start disconnected ... message by forcing the preloading of libaoss on all vmware executable by

installing libaoss (ny host is ubuntu 704)
and then editing

/usr/lib/vmware/lib/wrapper-gtk24.sh
by inserting at the end (before the call to vm_run) the following export statement

export LD_PRELOAD=libaoss.so:$LD_PRELOAD
vm_run "$@"

seems to work for me now.
1 2 Previous Next
Actions