Kirjoittaja Aihe: DX9 tuki virtuaali winukkaan?  (Luettu 2350 kertaa)

Astireloth

  • Vieras
DX9 tuki virtuaali winukkaan?
« : 03.05.08 - klo:20.54 »
Terve,
tossa googlatessa törmäsin tällaiseen ohjeeseen.
Koodia: [Valitse]
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.

Kellään kokemusta asiasta?

Tomin

  • Palvelimen ylläpitäjä
  • Käyttäjä / moderaattori+
  • Viestejä: 11433
    • Profiili
    • Tomin kotisivut
Vs: DX9 tuki virtuaali winukkaan?
« Vastaus #1 : 03.05.08 - klo:20.59 »
Tarvitset tuohon VMWare Workstationin joka maksaa jokusen satasen. Minulla sitä ei ole, (eikä siksi kokemusta tuosta) mutta sanoin vain jos et tiedä.
Automaattinen allekirjoitus:
Lisäisitkö [RATKAISTU] ketjun ensimmäisen viestin aiheeseen ongelman ratkettua, kiitos.

jori52

  • Käyttäjä
  • Viestejä: 2047
    • Profiili
Vs: DX9 tuki virtuaali winukkaan?
« Vastaus #2 : 03.05.08 - klo:21.29 »
yleensä tuollaisista asioista tavataan sanoa, että on rehellinen ja epärehellinen vaihtoehto olemassa.  ;)

Kukapa meistä käyttäisi epärehellisiä keinoja, en minä ainakaan.

Terveisin jori52
Linux counter #348392
 Asus G750JW ja ubuntu 13.10

Tomin

  • Palvelimen ylläpitäjä
  • Käyttäjä / moderaattori+
  • Viestejä: 11433
    • Profiili
    • Tomin kotisivut
Vs: DX9 tuki virtuaali winukkaan?
« Vastaus #3 : 03.05.08 - klo:22.12 »
yleensä tuollaisista asioista tavataan sanoa, että on rehellinen ja epärehellinen vaihtoehto olemassa.  ;)
No sainoin vain, että se maksaa...normaalisti... Mutta siis en kannata sitä epärehellistä vaihtoehtoa.
Automaattinen allekirjoitus:
Lisäisitkö [RATKAISTU] ketjun ensimmäisen viestin aiheeseen ongelman ratkettua, kiitos.