Guide: VMWare Workstation with 3D

Discussion for all VM - Installing, Software, Problems

Moderator: Moderators

Guide: VMWare Workstation with 3D

Postby Symphony » Tue Sep 11, 2007 12:07

Greets.
This guide that I have written is about installing VMWare Workstation 6 with 3D support.
That means that you will be able to install a Windows OS on a virtual machine with the ability to play games.

First of all, you need a license/activation key for VMWare Workstation. This can be done by buying the product. Other means of acquiring a license key are considered illegal and are not discussed here. Same goes for the Windows OS.

Considering that you have obtained a license for VMWare Workstation 6, and if you haven't already downloaded it, you can get it here: http://www.vmware.com/vmwarestore/newstore/wkst6_eval_login.jsp

From that location you can register a 30-day trial of the product. But of course, you can insert your license key to disable the trial and have it with full functionality.

NOTE: You need to be registered as a VMWare user. You can register as one, it does not cost anything.

You need to download the source for VMWare Workstation 6, meaning VMware Workstation 6.0 - 32-bit(.tar) => VMware-workstation-6.0.0-45731.i386.tar.gz (or the other one for 64 bit users)

Next, you need to disable Beryl or any other managers that require 3D such as Compiz etc.
This can be done by logging out and select Acceleration Manager as Session and logging as root.
Choose No Acceleration then reboot the system.

To make sure that you're good to go, open a terminal and say:

Code: Select all
su
glxinfo | grep direct


If Direct Rendering shows Yes, you're gold.

Next you need to do the install itself. Untar the source into a temporary directory (I assume you know how to do that!).

Assuming you've untared the contents into
Code: Select all
~/temporary/
, then open a terminal and:

Code: Select all
su
cd ~/temporary/vmware-distrib
./vmware-install.pl


At one point, the installer may or may not ask you for the init directories, meaning rc0.d to rc6.d. Gentoo-like distros, meaning Sabayon too, don't have these.
So do this in a new terminal shell, NOT as root:

Code: Select all
cd ~
mkdir etc
cd etc
mkdir rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d


Then in the installer you can specify the path /home/USER/etc if it asks you for your init directories.
NOTE: Replace USER with your username (case sensitive)

Then you can start VMWare.
NOTE: That it's not recommended to have both VMWare Server and Workstation installed. If possible, leave only Workstation installed, it's better.

After starting VMWare, you can insert your license key. The process is fairly simple, I believe you'll do just fine.
Now you need a Windows OS. Prefferably XP as it is the latest Windows OS that can be installed problemlessly. Any version below is quite old and useless and Vista uses too much memory and it'll lag more than Counter-Strike on 10 kbps.

Ok, after slashing the CD in the drive, click Create a new virtual machine, continue, select Windows XP Professional or Home or etc., continue until it asks for networking. I recommend NAT for easiest and most problemless use. Now allocate around 12 or more GB for the drive, select allocate all disk space now and deselect split into 2 GB files.

Then click Edit to edit the machine's attributes and go to Memory. Now set the memory to Maximum recommended memory, shown by a blue triangle. As said there, if you allocate more memory than this, memory swapping may occur, specially in an installation etc. and it will not be pleasant for the host (sabayon).
You may also want to check the other fields. If you have a multi-core processor, like a Core 2 Duo (Intel), choose to have 2 processors.

All the others should be fine.
Now start the machine and tap F2 until the BIOS comes up and go to boot order (you'll probably figure it out, it's not that hard) and page up until removable drives (which includes cdrom) is the top. Then you can save and exit, rebooting the virtual machine.

Now you can install Windows (which isn't really a delightful experience, boring is the word rather). Install a fresh copy. At the partitioning screen, make only 1 partition and make it NTFS normal partitioning. And now you probably know what will happen next. You have to wait about 30-40 (50 on slower machines) minutes until this lame bastard installs it's filthy behind.

The process should be straight forward. You'll do just fine.

In the process of installation, please do a full screen and stop doing anything else (for example chatting or browsing or anything else). Just watch a movie until it finishes.

Assuming you have completely installed Windows and you are now viewing it's desktop. Now click the VM tab in VMWare and select Install VMWare Tools.

This will pop an installer in the guest and start installing the VMWare Tools.
While it's installing, it's good ideea to click the Edit tab >> Preferences >> Input and deselect (if selected) Ungrab when cursor leaves screen.

After VMWare Tools finishes installing, shutdown the virtual machine and close VMWare Workstation 6.
Then point your file manager to /home/USER/vmware/YOUR_VIRTUAL_MACHINE_NAME/ and open YOUR_VIRTUAL_MACHINE_NAME.vmx with a text editor and add the following lines at the bottom:

Code: Select all
mks.enable3d = "TRUE"
vmmouse.present = "FALSE"


It's also a good ideea to set the video RAM. You must specify the value in bytes! The maximum value is 128 MB (134217728 bytes) so you guys that have GPUs with over 256 MB will not use them :) Tough luck.
As I was saying, you should specify the VRAM this way:

Code: Select all
svga.vramSize = 134217728


You can also put any value lower than 134217728 bytes if you have a lesser performance card. Just be sure the number is dividable by 2, by 4 and by 1024.

Now you can start the virtual machine. If you DON'T get any error popping out in the lower right corner of the screen complaining about 3D, then you're good to go.

Now open Windows, and in the process bar, you should have the VMWare Tools icon, open that and select the option that says something about time sync between host and guess.

Assuming you have a LEGAL copy of Windows, you can point your browser at http://www.microsoft.com/downloads/sear ... tegoryid=2 and download DirectX 9.0c End User Runtime.

If you can't install that one, most game installers have DirectX 9.0 included in the installer.

Right now, you should have 3D working.
If you don't believe me, you can open dxdiag and test the 3D.

Advantages:

-3D running in a VM
-You can run almost any application right from your linux box
-You can play games. Most games that support DX9 / DX8 work. DX10 requiring games like Halo 2 will have no chance. You need Vista for that shiz.

Disadvantages:

-Because it is a virtual machine, it will be slower than if you would run the same thing on a normal machine.
-Mouse lagging if CPU too loaded or memory too loaded.
-Small freezes if you really load it too much.

NOTE: This procedure can also be used in a Windows copy of VMWare Workstation, meaning you can install a Linux guest system AND be able to run Beryl/Compiz/etc.

NOTE: There is a possibility that DirectX9 won't work, only DX8. You should run the 3D test in dxdiag. If DX7, DX8 and DX9 look the same and work, then all is good, if DX9 looks like a grey cube spinning in a clipping black/white environment or any other artifact, it's not good.
If this happens, the best thing to do is install different versions of DX9 until, hopefully, you get it right.

NOTE: There is a possibility that an error might occur, a crash, lagging, frame drop, stuttering etc.
This is normal! It's a virtual machine.

With all these being said, I hope you have fun with this and don't forget to post some feedback!

by Symphony
Last edited by Symphony on Sun Oct 07, 2007 18:33, edited 1 time in total.
- Intel Core 2 Duo E8500 Wolfdale 45 nm 3.16 Ghz OC 3.8 Ghz
- 2 GB DDR2 (2 x 512 MB DDR2 Kingston; 2 x 512 MB ADDR2 Sycron)
- Asus EN 9800 GTX 512 MB GDDR3 OC: Core --> 802 MHz Memory --> 1187 MHz Shader --> 2005 MHz
- Hitachi 120 GB SATA
User avatar
Symphony
Baby Hen
 
Posts: 16
Joined: Sat May 26, 2007 18:17
Location: Romania

Re: Guide: VMWare Workstation with 3D

Postby abarabas » Sun Oct 07, 2007 1:27

Hi everybody, it's my first post here

first, thanks for this guide, it help a lot, but i tried it and it was all working well until i got an error in the installation that said:

Code: Select all
Building the vmnet module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmnet-only'
make -C /lib/modules/2.6.22-sabayon/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.22-sabayon'
  CC [M]  /tmp/vmware-config0/vmnet-only/driver.o
  CC [M]  /tmp/vmware-config0/vmnet-only/hub.o
  CC [M]  /tmp/vmware-config0/vmnet-only/userif.o
/tmp/vmware-config0/vmnet-only/userif.c: In function ‘VNetCopyDatagramToUser’:
/tmp/vmware-config0/vmnet-only/userif.c:630: error: ‘const struct sk_buff’ has no member named ‘h’
/tmp/vmware-config0/vmnet-only/userif.c:630: error: ‘const struct sk_buff’ has no member named ‘nh’
/tmp/vmware-config0/vmnet-only/userif.c:636: error: ‘const struct sk_buff’ has no member named ‘h’
make[2]: *** [/tmp/vmware-config0/vmnet-only/userif.o] Error 1
make[1]: *** [_module_/tmp/vmware-config0/vmnet-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.22-sabayon'
make: *** [vmnet.ko] Error 2
make: Leaving directory `/tmp/vmware-config0/vmnet-only'
Unable to build the vmnet module.

For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and
"http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".

Execution aborted.


any idea of what could be happening?

thx 4 all!

edit: it was my second post, i didn't remember
abarabas
Baby Hen
 
Posts: 2
Joined: Tue Oct 02, 2007 20:09

Re: Guide: VMWare Workstation with 3D

Postby Symphony » Sun Oct 07, 2007 18:04

When did this error occur ?
What command did you input ?
- Intel Core 2 Duo E8500 Wolfdale 45 nm 3.16 Ghz OC 3.8 Ghz
- 2 GB DDR2 (2 x 512 MB DDR2 Kingston; 2 x 512 MB ADDR2 Sycron)
- Asus EN 9800 GTX 512 MB GDDR3 OC: Core --> 802 MHz Memory --> 1187 MHz Shader --> 2005 MHz
- Hitachi 120 GB SATA
User avatar
Symphony
Baby Hen
 
Posts: 16
Joined: Sat May 26, 2007 18:17
Location: Romania

Re: Guide: VMWare Workstation with 3D

Postby gabrielmenini » Tue Oct 16, 2007 16:32

Symphony,

What do you think of using VMware Server Console instead?
Linux Registered User #207262
http://counter.li.org/
gabrielmenini
Baby Hen
 
Posts: 11
Joined: Mon Oct 01, 2007 16:35
Location: Montevideo, URUGUAY

Re: Guide: VMWare Workstation with 3D

Postby Symphony » Sat Oct 20, 2007 13:45

@abarabas - I have found your problem.
Install VMWare once again. When it asks you if you want networking for your Virtual Machine, answer no.
That will skip making the vmnet module and it shall work.

Sorry for the late responce :)
- Intel Core 2 Duo E8500 Wolfdale 45 nm 3.16 Ghz OC 3.8 Ghz
- 2 GB DDR2 (2 x 512 MB DDR2 Kingston; 2 x 512 MB ADDR2 Sycron)
- Asus EN 9800 GTX 512 MB GDDR3 OC: Core --> 802 MHz Memory --> 1187 MHz Shader --> 2005 MHz
- Hitachi 120 GB SATA
User avatar
Symphony
Baby Hen
 
Posts: 16
Joined: Sat May 26, 2007 18:17
Location: Romania


Return to Virtual Managers

Who is online

Users browsing this forum: No registered users and 2 guests