Adding a sound card to ESXi hosted VM

Adding a sound card to ESXi hosted VM

Sound Card in vSphere Virtual Machine is an unsupported configuration. This is feature dedicated to Virtual Machines created in VMware Workstation. However, you can still add HD Audio device to vSphere Virtual Machine by manually editing .vmx file. I have tested it in our lab environment and it works just fine.

Below ย procedure how to do this:

1. Verify storage where VM with no soundcard reside

soundcard1

  1. Login with root to the ESXi host where VM reside using SSH.
    3. Navigate to /vmfs/volumes/<VM LUN>/<VM folder>
    In my example it was:
    ~# cd /vmfs/volumes/Local_03esx-mgmt_b/V11_GSS_DO
    4. Shut down problematic VM
    5. Edit .vmx file using VI editor.

IMPORTANT:
Make a backup copy of the .vmx file. If your edits break the virtual machine, you can roll back to the original version of the file.
More information about editing files on ESXi host, refer to KB article: https://kb.vmware.com/kb/1020302

  1. Once you have open vmx to edit, navigate to the bottom of the file and add following lines to the .vmx configuration file:
    sound.present = “true”
    sound.allowGuestConnectionControl = “false”
    sound.virtualDev = “hdaudio”
    sound.fileName = “-1”
    sound.autodetect = “true”
  2. Save file and Power-On Virtual machine.
  3. Once it have booted, and you have enabled Windows Audio Service, sound will work fine.

If you go to “Edit Settings” of the VM, you can see information that device is unsupported. Please be aware that if after adding sound card to you virtual machine, you may exprience any kind of unexpected behavior (tip: in our lab env work this config without issues).

16 thoughts on “Adding a sound card to ESXi hosted VM

  1. This does not work in ESXi 6.0 u2. These sound settings are removed from the .vmx on import or power-on of the VM.

    1. Actually it will work, but two things. You have to remove the VM from the inventory and edit it there. Plus I added the sound.pciSlotNumber =”XX” as well. The importing of the vmx is JFM that makes everything work. So the virtual machine sees the sound, but vSphere can’t get or use the sound. FYI

  2. Hi,

    but you still need the soundcard (HW) on the host?
    Or is it like kind of emulation and you don’t need the physical soundcard?

    Regards
    Viktor

  3. I was told to come have a look at this page because of my issue with running both Linux and Unix VMs on ESXi 6.5 This worked like a dream for both OS platforms.

  4. Just a note:
    The text posted here uses actual “left-quote” and “right-quote” characters. It looks like ESXi 6.5 doesn’t understand these characters (at least build 6765664 doesn’t). Had to replace with the basic quote character. Worked well after that.

  5. can USB sound card be assigned to multiple VMs?
    A USB sound card is not available to other VM when is being used by another.

  6. The sound driver is in the device manager but there is no sound ๐Ÿ™
    Same as we set:
    sound.virtualDev = “es1371”

    Driver install OK but no sound ๐Ÿ™ ๐Ÿ™

  7. If you have more than one physical sound adapter in your host computer, you can choose which one to connect to the virtual sound adapter. You can also choose whether the virtual sound adapter should be connected when the virtual machine starts.

Comments are closed.

Comments are closed.