This page describes how to build, install and use the
VMware guest GL driver (aka the SVGA or
SVGA3D driver) for Linux using the latest source code. This driver gives
a Linux virtual machine access to the host’s GPU for
hardware-accelerated 3D. VMware Workstation running on Linux or Windows
and VMware Fusion running on MacOS are all supported.
With the August 2015 Workstation 12 / Fusion 8 releases, OpenGL 3.3 is
supported in the guest. This requires:
- The VM is configured for virtual hardware version 12.
- The host OS, GPU and graphics driver supports DX11 (Windows) or
OpenGL 4.0 (Linux, Mac) - On Linux, the vmwgfx kernel module must be version 2.9.0 or later.
- A recent version of Mesa with the updated svga gallium driver.
Otherwise, OpenGL 2.1 is supported.
OpenGL 3.3 support can be disabled by setting the environment variable
SVGA_VGPU10=0. You will then have OpenGL 2.1 support. This may be
useful to work around application bugs (such as incorrect use of the
OpenGL 3.x core profile).
Most modern Linux distros include the SVGA3D driver so end users
shouldn’t be concerned with this information. But if your distro lacks
the driver or you want to update to the latest code these instructions
explain what to do.
For more information about the X components see these wiki pages at
x.org:
- Driver Overview
- xf86-video-vmware
Details
Components
The components involved in this include:
- Linux kernel module: vmwgfx
- X server 2D driver: xf86-video-vmware
- User-space libdrm library
- Mesa/gallium OpenGL driver: “svga”
All of these components reside in the guest Linux virtual machine. On
the host, all you’re doing is running VMware
Workstation or
Fusion.
Prerequisites
-
Kernel version at least 2.6.25
-
Xserver version at least 1.7
-
Ubuntu: For ubuntu you need to install a number of build
dependencies.sudo apt-get install git-core sudo apt-get install automake libtool libpthread-stubs0-dev sudo apt-get install xserver-xorg-dev x11proto-xinerama-dev libx11-xcb-dev sudo apt-get install libxcb-glx0-dev libxrender-dev sudo apt-get build-dep libgl1-mesa-dri libxcb-glx0-dev
-
Fedora: For Fedora you also need to install a number of build
dependencies.sudo yum install mesa-libGL-devel xorg-x11-server-devel xorg-x11-util-macros sudo yum install libXrender-devel.i686 sudo yum install automake gcc libtool expat-devel kernel-devel git-core sudo yum install makedepend flex bison
Depending on your Linux distro, other packages may be needed. The
configure scripts should tell you what’s missing.
Getting the Latest Source Code
Begin by saving your current directory location:
-
Mesa/Gallium master branch. This code is used to build libGL, and the
direct rendering svga driver for libGL, vmwgfx_dri.so, and the X
acceleration library libxatracker.so.x.x.x.git clone git://anongit.freedesktop.org/git/mesa/mesa
-
VMware Linux guest kernel module. Note that this repo contains the
complete DRM and TTM code. The vmware-specific driver is really only
the files prefixed with vmwgfx.git clone git://anongit.freedesktop.org/git/mesa/vmwgfx
-
libdrm, a user-space library that interfaces with drm. Most distros
ship with this but it’s safest to install a newer version. To get the
latest code from git:git clone git://anongit.freedesktop.org/git/mesa/drm
-
xf86-video-vmware. The chainloading driver, vmware_drv.so, the
legacy driver vmwlegacy_drv.so, and the vmwgfx driver
vmwgfx_drv.so.git clone git://anongit.freedesktop.org/git/xorg/driver/xf86-video-vmware
Building the Code
-
Determine where the GL-related libraries reside on your system and
set the LIBDIR environment variable accordingly.For 32-bit Ubuntu systems:
export LIBDIR=/usr/lib/i386-linux-gnu
For 64-bit Ubuntu systems:
export LIBDIR=/usr/lib/x86_64-linux-gnu
For 32-bit Fedora systems:
For 64-bit Fedora systems:
-
Build libdrm:
cd $TOP/drm ./autogen.sh --prefix=/usr --libdir=${LIBDIR} make sudo make install
-
Build Mesa and the vmwgfx_dri.so driver, the vmwgfx_drv.so xorg
driver, the X acceleration library libxatracker. The vmwgfx_dri.so
is used by the OpenGL libraries during direct rendering, and by the
Xorg server during accelerated indirect GL rendering. The
libxatracker library is used exclusively by the X server to do
render, copy and video acceleration:The following configure options doesn’t build the EGL system.
cd $TOP/mesa ./autogen.sh --prefix=/usr --libdir=${LIBDIR} --with-gallium-drivers=svga --with-dri-drivers=swrast --enable-xa --disable-dri3 --enable-glx-tls make sudo make install
Note that you may have to install other packages that Mesa depends
upon if they’re not installed in your system. You should be told
what’s missing. -
xf86-video-vmware: Now, once libxatracker is installed, we proceed
with building and replacing the current Xorg driver. First check if
your system is 32- or 64-bit.cd $TOP/xf86-video-vmware ./autogen.sh --prefix=/usr --libdir=${LIBDIR} make sudo make install
-
vmwgfx kernel module. First make sure that any old version of this
kernel module is removed from the system by issuingsudo rm /lib/modules/`uname -r`/kernel/drivers/gpu/drm/vmwgfx.ko*
Build and install:
cd $TOP/vmwgfx make sudo make install sudo depmod -a
If you’re using a Ubuntu OS:
If you’re using a Fedora OS:
Add ‘vmwgfx’ to the /etc/modules file:
echo vmwgfx | sudo tee -a /etc/modules
Note: some distros put DRM kernel drivers in different directories.
For example, sometimes vmwgfx.ko might be found in
/lib/modules/{version}/extra/vmwgfx.ko
or in
/lib/modules/{version}/kernel/drivers/gpu/drm/vmwgfx/vmwgfx.ko
.After installing vmwgfx.ko you might want to run the following
command to check that the new kernel module is in the expected place:find /lib/modules -name vmwgfx.ko -exec ls -l '{}' \;
If you see the kernel module listed in more than one place, you may
need to move things around.Finally, if you update your kernel you’ll probably have to rebuild
and reinstall the vmwgfx.ko module again.
Now try to load the kernel module by issuing
Then type
to watch the debug output. It should contain a number of lines prefixed
with “[vmwgfx]”.
Then restart the Xserver (or reboot). The lines starting with
“vmwlegacy” or “VMWARE” in the file /var/log/Xorg.0.log should now have
been replaced with lines starting with “vmwgfx”, indicating that the new
Xorg driver is in use.
Running OpenGL Programs
In a shell, run ‘glxinfo’ and look for the following to verify that the
driver is working:
OpenGL vendor string: VMware, Inc. OpenGL renderer string: Gallium 0.4 on SVGA3D; build: RELEASE; OpenGL version string: 2.1 Mesa 8.0
If you don’t see this, try setting this environment variable:
export LIBGL_DEBUG=verbose
then rerun glxinfo and examine the output for error messages.
If OpenGL 3.3 is not working (you only get OpenGL 2.1):
Make sure the VM uses hardware version 12.
Make sure the vmwgfx kernel module is version 2.9.0 or later.
Check the vmware.log file for errors.
Run ‘dmesg | grep vmwgfx’ and look for “DX: yes”.
Since VMware Workstation 16 Pro, a new graphics engine has been implemented to provide :
- support for DirectX 11 and OpenGL 4.1 for applications and games installed in virtual machines.
- 3D support if you have an Intel graphics card (GPU) and a Linux host PC and support for DirectX 10.1 and OpenGL 3.3.
Warning : since version 16.2.0 of VMware Workstation Pro, 3D acceleration of virtual machines only works if the host supports DirectX 11.1.
Otherwise, the «No 3D support is available from the host» message will appear when starting each virtual machine where the «Accelerate 3D graphics» option is checked and the «3D acceleration will be disabled for VMs as DirectX 11.1 is not supported by the host» message will appear before upgrading from VMware Workstation 16.1.2 to 16.2.0.
In this case, revert to the previous version «16.1.2» of VMware Workstation Pro to continue using 3D acceleration for your virtual machines.
Thanks to this big news, it’s now possible to virtualize some games, such as : NFS Undercover.
NFS Undercover is one of the games that we own that allow you to easily test the fluidity of the game, since it’s a racing game.
When you create a virtual machine in VMware Workstation 16, you can assign 8 GB of video (graphics) memory to your virtual machine.
In this tutorial, we used a host PC with Windows 10 v2004 and a virtual machine with the same version of Windows 10.
As stated by VMware Workstation, it’s recommended to allocate 8 GB of video memory (graphics memory).
However, to assign 8GB of video memory, VMware Workstation tells you to assign at least 16 GB of RAM.
In the «Memory» section, we have therefore assigned 16 GB of RAM to our virtual machine.
Knowing that our physical PC has 32 GB of RAM.
Since we have the original version of this game (on DVD), we have configured our VM’s virtual CD/DVD drive to use our physical CD/DVD drive.
Start the virtual machine.
In the virtual machine, if you run the DirectX Diagnostic Tool (dxdiag.exe) provided with all versions of Windows, you will see that Windows 10 supports DirectX 12. Which is higher than what is supported by VMware Workstation.
Games using a version of DirectX lower or equal to version 11 will therefore work without problems.
Insert the desired game DVD and install it.
Our game is installed.
We launch the game and as expected it works.
Right now, we’re seeing cutscenes.
So, we’re not actually in the game yet.
In NFS Undercover, what you see here is a cutscene.
Now, we are really playing.
Which was not possible with previous versions of VMware Workstation.
To get the most out of your virtualized video game, click on the «Full Screen» icon of VMware Workstation.
Then, automatically hide the top bar by clicking on the pin at the top left.
Then, adjust the display options of your game to take advantage of the maximum resolution supported by your screen and improve the graphics as desired.
In our case, we have set all the settings of our game (released in 2008) to maximum and the game runs smoothly and the driving of the car is very smooth, despite the game being installed in a virtual machine.
Note that Windows 7 supports DirectX 11 by default, as you can check through «dxdiag.exe».
And the game also works great with Windows 7 installed in the virtual machine.
For Windows 8 and 8.1 in virtual, you also have support for DirectX 11.
And game virtualization also works without problem.
Thanks to this new feature, you can now play games installed in a virtual machine.
But, remember that this will not work with all games. And even less with the latest games just released.
Компания VMware реализовала поддержку графических API DirectX 11 и OpenGL 4.1 в виртуальных машинах в следующих своих продуктах:
- Workstation и Fusion с версии 20H2 Tech Preview, реализовано в Virtual Hardware Compatibility с версии 18.
- vSphere с версии 7.0 Update 2, реализовано в Virtual Machine Compatibility с версии 19.
Почему не бьются версии vHW выяснить не удалось.
Новый функционал может быть интересен для поддержки 3D в средах VDI в режиме VSGA (HCL):
Feature Comparison for the Types of Graphics Acceleration
Virtual Shared Graphics Acceleration |
Virtual Shared Pass-Through Graphics Acceleration |
Virtual Dedicated Graphics Acceleration |
|
Abbreviation |
vSGA |
vGPU/MxGPU |
vDGA |
Consolidation |
High (limited by video memory) |
Up to 1:32 |
None (1:1) |
Performance level |
Lightweight |
Lightweight or workstation |
Workstation |
Compatibility |
Limited |
Full, but not all applications are certified |
Maximum |
Max DirectX level |
vSphere 6.5 DirectX 10.0 SM4.0 vSphere 7.0 DirectX 10.1 SM4.1 vSphere 7.0 U2 DirectX 11.0 SM5.0 |
All supported versions |
All supported versions |
Max OpenGL version |
vSphere 6.5 3.3 vSphere 7.0 U2 4.1 |
All supported versions |
All supported versions |
Video encoding and decoding |
Software |
Hardware |
Hardware |
OpenCL or CUDA compute |
No |
MxGPU: OpenCL only GRID 1: No GRID 2: 1:1 only |
Yes |
vMotion support |
Yes |
Only for vGPU 7+ |
No |
EVC Graphics Mode (vSGA): D3D 11.0 class features
С ESXi 7.0 Update 1 (vHW 18, VMware Tools 11.1.5+) появился новый режим EVC. который распространяется на функционал vSGA:
Option | Description |
---|---|
Baseline Graphics | Applies the Baseline Graphics feature set that includes features through Direct3D 10.1/OpenGL 3.3.
Note:To configure the vSGA mode to apply the Baseline Graphics set that includes features through Direct3D 10.1/OpenGL 3.3, the virtual machine must be compatible with ESXi 7.0 Update 1 or earlier. |
D3D 11.0 class features | Applies the baseline graphics feature set that includes features through Direct3D 11.0/OpenGL 4.1
Note:To configure the vSGA mode to apply the Baseline Graphics set that includes features through Direct3D 11.0/OpenGL 4.1, verify that the virtual machine is compatible with ESXi 7.0 Update 2 or later and has installed VMware Tools 11.1.5 or later. To power on a virtual machine, configured with Direct3D 11.0/OpenGL 4.1, verify that the ESXi host graphics hardware is available. |
Примечание: на использование VSGA c серверными vGPU картами накладываются лицензионные ограничения, но сервер лицензирования для выдачи и учёта лицензий не требуется.
NVIDIA vGPU Software License Enforcement by Deployment Type
NVIDIA vGPU Software Deployment | Required NVIDIA vGPU Software License | Enforcement |
---|---|---|
A-series NVIDIA vGPU | vApps | Software See Note (1). |
B-series NVIDIA vGPU | vPC or vWS | Software |
C-series NVIDIA vGPU | vCS or vWS | Software See Note (2). |
Q-series NVIDIA vGPU | vWS | Software See Note (3). |
GPU pass through for workstation or professional 3D graphics | vWS | Software |
GPU pass through for compute-intensive virtual servers | vCS | Software See Note (4). |
GPU pass through for PC-level applications | vApps | EULA only |
Microsoft DDA for workstation or professional 3D graphics | vWS | Software |
Microsoft DDA for compute-intensive virtual servers | vCS | Software See Note (4). |
Microsoft DDA for PC-level applications | vApps | EULA only |
VMware vDGA for workstation or professional 3D graphics | vWS | Software |
VMware vDGA for compute-intensive virtual servers | vCS | Software See Note (4). |
VMware vDGA for PC-level applications | vApps | EULA only |
Bare metal for workstation or professional 3D graphics | vWS | Software |
Bare metal for PC-level applications | vApps | EULA only |
Microsoft RemoteFX vGPU | vPC | EULA only |
VMware vSGA | vPC | EULA only |
Map Your Next Move at VMware Explore
Join peers and leaders at the essential cloud event for IT professionals.
Learn More
Map Your Next Move at VMware Explore
Join peers and leaders at the essential cloud event for IT professionals.
Learn More
Community Search
Welcome to the Broadcom Community
Find Your Communities
Our communities are designed by division, as you can see below. Visit each division’s homepage for a list of product communities under each division. From there, click on the communities you’re interested in, choose «Join Community,» and select your notification settings. It’s that simple. Join as many as you’d like.
Register Here
Please note: Your first post to any of our communities will be placed in a moderation queue for review to help us prevent spammers from posting unwanted content. Our community managers closely monitor this moderation queue, and once your first post is approved, your posts will no longer go through moderation. Please do not submit the same post multiple times.
Check Out Our Events
Looking for product roadmap webcasts, technical sessions, user group meetings, conferences, and workshops? Check out our events calendars:
- Application Networking and Security
- Carbon Black — Symantec
- VeloCloud
- Carbon Black
- Tanzu
- VMware Cloud Foundation
- Enterprise Software Events
- Mainframe Software Events
- Symantec Enterprise Events
- VMware Events
Latest Discussions
-
This is very helpful. Thank you!
-
Hi Peter,
Yes, I’ve checked LDAP.Sync.
Inside the LDAP.Sync folder, I have the configuration files ldapsync.xml, default.xml, and client_100.xml. I’ve already made some changes to these files updating connection settings, base DNs, …
Recent Blogs
-
Auto Scaling of Kubernetes Workloads using Custom Application …
-
Posted in:
Bitnami
Model Context Protocol (MCP) has taken the world …
Upcoming Events
Engagement Leaderboard
Source: Internet
For OpenGL developers, the advent of VMware Workstation 12 did bring a lot of «surprises», and the VMware Workstation 12 had a big boost to OpenGL’s support version.
Prior to the release of VMware Workstation 12, only basic support for Opengl2.1,vmware Workstation 12 for OpenGL supported version OpenGL3.3, known as the core protocol interface currently supporting OpenGL3.3.
The students who reinstall the system with VM 12 generally do not encounter any problems, only need to be in the video card settings 3D accelerated to support OpenGL3.3. Prior to the installation of the system in the lower version of the VM, and then go directly to upgrade to VM12 ‘s classmate, you need to change the virtualhw.version entry in the. vmx file to «12» as shown in:
Set and then re-open.
Also, students who develop OpenGL ES under Windows can use the OpenGL ES2.0 version (OpenGL ES2.0 has been available for OpenGL versions).
VMware Workstation support for OpenGL ES2.0 on Linux seems to be better than Windows earlier, and VMware Workstation11 uses Glxinfo to view version information.
Note: Installing Apt-get install mesa-utils and apt-get install Mesa-utils-extra allows Glxinfo to view support for OpenGL and OpenGL ES versions.
VMware Workstation 12,windows Support settings for OpenGL versions