个人工具

“UbuntuHelp:VMware/Workstation”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
 
(未显示同一用户的9个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/VMware/Workstation}}
 
{{From|https://help.ubuntu.com/community/VMware/Workstation}}
 
{{Languages|UbuntuHelp:VMware/Workstation}}
 
{{Languages|UbuntuHelp:VMware/Workstation}}
== Ubuntu as a [[UbuntuHelp:VMware|VMware]] host ==
+
<<Include(Tag/StyleCleanup)>>
=== Installing from the tarball ===
+
<<Include(Tag/Unsupported)>>
''VMware-workstation-6.0.2-59824.x86_64.tar.gz''
+
== Ubuntu as a VMware host ==
Steps required to get [[UbuntuHelp:VMware|VMware]] Workstation 6.0.2 installed on Ubuntu 7.10 system on
+
=== Installing from the .bundle ===
i686.
+
Tested with:
0. Install the required compiler and kernel headers needed to compile the vmware kernel module. <pre><nowiki>
+
* [[UbuntuHelp:VMware|VMware]] Workstation 6.5.1 Build 126130, Ubuntu 8.10, AMD64
sudo apt-get install linux-headers-$(uname -r) build-essential gcc-3.4
+
* [[UbuntuHelp:VMware|VMware]] Workstation 6.5.1, Kubuntu 8.10, AMD64
 +
* VMWare Workstation 6.5.0, Ubuntu 8.10 x86
 +
* VMWare Workstation 6.5.0, Super Ubuntu 8.10 x86
 +
''[[UbuntuHelp:VMware|VMware]]-Workstation-6.5.0-118166.i386.bundle''
 +
<ol><li>Install required packages build-essential, linux-kernel-headers and linux-kernel-devel  <pre><nowiki>
 +
sudo aptitude install build-essential linux-kernel-headers linux-kernel-devel
 
</nowiki></pre>
 
</nowiki></pre>
0. If you are using AMD x86_64 then you need to install ia32-libs as well. <pre><nowiki>
+
</li><li>Navigate to where the .bundle VMWare file is, then type this in<pre><nowiki>
sudo apt-get install ia32-libs
+
gksudo bash ./VMware-Workstation-6.5.0-118166.i386.bundle
 +
</nowiki></pre></li></ol>
 +
 
 +
And that's it! Enjoy your VMWare Workstation installation!
 +
=== Alternate Installation from .bundle ===
 +
Tested with:
 +
* VMWare Workstation 6.5.0, !HackBuntu Alpha 3 8.10 x86 (PM me for DL link)
 +
* VMWare Workstation 6.5.0, Super Ubuntu 8.10 x86
 +
In the terminal, navigate (cd) to where your installation resides. Then type this in <pre><nowiki>
 +
sudo ./VMware-Workstation-6.5.0-118166.i386.bundle
 
</nowiki></pre>
 
</nowiki></pre>
0. Download VMWare Workstation 6.0.2 from [http://www.vmware.com/ VMware] and upack: <pre><nowiki>
+
=== Installing on Jaunty ===
tar xzf VMware-workstation-6.0.2-59824.x86_64.tar.gz
+
Credit to:  [http://ubuntuforums.org/member.php?u=526343 judgen]
 +
http://ubuntuforums.org/showthread.php?t=1040351
 +
0. Same as above, but then you have to remove the broken module: <pre><nowiki>  
 +
sudo mv /usr/lib/vmware/modules/binary /usr/lib/vmware/modules/binary.old
 
</nowiki></pre>
 
</nowiki></pre>
0. Run the [[UbuntuHelp:VMware|VMware]] install script. <pre><nowiki>
+
1. then simply rebuild the module.<pre><nowiki>  
export CC=/usr/bin/gcc-3.4 && cd vmware-distrib && sudo ./vmware-install.pl
+
sudo vmware-modconfig --console --install-all
 
</nowiki></pre>
 
</nowiki></pre>
It is safe to take all the defaults.
+
 
 
=== Installing from the .rpm ===
 
=== Installing from the .rpm ===
''VMware-workstation-6.0.2-59824.i386.rpm''
+
''[[UbuntuHelp:VMware|VMware]]-workstation-6.0.2-59824.i386.rpm''
 
It’s relatively easy to convert VMWare’s .rpm to a .deb and install VMWare inside the package manager. Here’s how:
 
It’s relatively easy to convert VMWare’s .rpm to a .deb and install VMWare inside the package manager. Here’s how:
# Make sure you have the kernel headers and compiler first, with:
+
<ol><li>Make sure you have the kernel headers and compiler first, with:</li></ol>
 +
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo apt-get install linux-headers-$(uname -r) build-essential gcc-3.4
 
sudo apt-get install linux-headers-$(uname -r) build-essential gcc-3.4
 
</nowiki></pre>
 
</nowiki></pre>
2. Download VMWare Workstation 6.0 from their site in <code><nowiki>.rpm</nowiki></code> format, and get a serial number from them while you’re at it.
+
<ol><li>Download VMWare Workstation 6.0 from their site in <code><nowiki>.rpm</nowiki></code> format, and get a serial number from them while you’re at it.
3. Convert the <code><nowiki>.rpm</nowiki></code> to a <code><nowiki>.deb</nowiki></code> with
+
</li><li>Convert the <code><nowiki>.rpm</nowiki></code> to a <code><nowiki>.deb</nowiki></code> with</li></ol>
 +
 
 
<pre><nowiki>
 
<pre><nowiki>
fakeroot alien VMware-workstation-6.0.*.rpm
+
fakeroot alien --scripts VMware-workstation-6.0.*.rpm
 
</nowiki></pre>
 
</nowiki></pre>
4. Install the .deb with
+
<ol><li>Install the .deb with</li></ol>
 +
 
 
<pre><nowiki>
 
<pre><nowiki>
sudo dpkg -i /home/matt/local/src/vmware/vmwareworkstation_6.0.*.deb
+
sudo dpkg -i vmwareworkstation_6.0.*.deb
 
</nowiki></pre>
 
</nowiki></pre>
5. Edit <code><nowiki>/etc/vmware/locations</nowiki></code> as root and add the following three lines:
+
<ol><li>Edit <code><nowiki>/etc/vmware/locations</nowiki></code> as root and add the following three lines (not necessary on 6.0.5):
# Just after
+
<ol><li>Just after</li></ol>
 +
 
 
<pre><nowiki>
 
<pre><nowiki>
 
answer BINDIR /usr/bin
 
answer BINDIR /usr/bin
第44行: 第65行:
 
answer SBINDIR /usr/sbin
 
answer SBINDIR /usr/sbin
 
</nowiki></pre>
 
</nowiki></pre>
2. Just after
+
<ol><li>Just after</li></ol>
 +
 
 
<pre><nowiki>
 
<pre><nowiki>
 
remove_answer BINDIR
 
remove_answer BINDIR
第54行: 第76行:
 
answer SBINDIR /usr/sbin
 
answer SBINDIR /usr/sbin
 
</nowiki></pre>
 
</nowiki></pre>
6. Run <code><nowiki>vmware-config.pl</nowiki></code> (and answer the questions accordingly; this hasn’t really changed since VMWare 4.5) with
+
<ol><li>Run <code><nowiki>vmware-config.pl</nowiki></code> (and answer the questions accordingly; this hasn’t really changed since VMWare 4.5. You will have to give the correct location for the kernel headers, i.e. /usr/src/linux-`uname -r`/, although you must know in advance what `uname -r` will return.) with</li></ol>
 +
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo /usr/bin/vmware-config.pl
 
sudo /usr/bin/vmware-config.pl
 
</nowiki></pre>
 
</nowiki></pre>
7. Unzip the EULA, which VMWare expects to be uncompressed but which is installed compressed:
+
<ol><li>Unzip the EULA, which VMWare expects to be uncompressed but which is installed compressed:</li></ol>
 +
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo gunzip /usr/share/doc/vmware/EULA.gz
 
sudo gunzip /usr/share/doc/vmware/EULA.gz
 
</nowiki></pre>
 
</nowiki></pre>
8. Start vmware, accept the EULA, and enter the serial number.  
+
<ol><li>Start vmware, accept the EULA, and enter the serial number.</li></ol>
== Ubuntu as a [[UbuntuHelp:VMware|VMware]] Guest ==
+
 
 +
== Ubuntu as a VMware Guest ==
 
[[UbuntuHelp:VMware|VMware]] version 5 is reported to work with Ubuntu out-of-the-box.  Try using NAT rather than bridging when using [[UbuntuHelp:VMware|VMware]] 5 with Ubuntu as a guest OS.
 
[[UbuntuHelp:VMware|VMware]] version 5 is reported to work with Ubuntu out-of-the-box.  Try using NAT rather than bridging when using [[UbuntuHelp:VMware|VMware]] 5 with Ubuntu as a guest OS.
 
=== Initial Install ===
 
=== Initial Install ===
# Download the iso from http://www.ubuntu.com/download/ this demo used the '''ubuntu-5.10-install-i386.iso''' image.
+
<ol><li>Download the iso from http://www.ubuntu.com/download/ this demo used the '''ubuntu-5.10-install-i386.iso''' image.
# Create a new Virtual Machine.
+
</li><li>Create a new Virtual Machine.</li></ol>
#* Virtual Machine Configuration: '''Typical'''
+
 
#* Guest Operating System: '''Linux'''
+
* Virtual Machine Configuration: '''Typical'''
#* Version: '''Other Linux 2.6.x kernel'''
+
* Guest Operating System: '''Linux'''
#* Virtual Machine Name & Location: Pick as you will. (for the record I chose '''Ubuntu''' and '''O:\VPC\''')
+
* Version: '''Other Linux 2.6.x kernel'''
#* Network Connection: '''Use bridged networking''' (Refer to [http://www.vmware.com/support/ws55/doc/ws_net_configurations_common.html this [[UbuntuHelp:VMware|VMware]] documentation] for information on the other network connection configurations.)
+
* Virtual Machine Name & Location: Pick as you will. (for the record I chose '''Ubuntu''' and '''O:\VPC\''')
#* Disk capacity: Again the choice is yours, I chose '''4GB''' and turned on ''Allocate all disk space now'' and ''Split disk into 2 GB files''. Allocating the disk space will increase performance, while spliting the disk into 2GB chunks will minimise any file size limitations if transferring a virtual machine using Samba.
+
* Network Connection: '''Use bridged networking''' (Refer to [http://www.vmware.com/support/ws55/doc/ws_net_configurations_common.html this VMware documentation] for information on the other network connection configurations.)
# Change the settings of the new virtual machine:
+
* Disk capacity: Again the choice is yours, I chose '''4GB''' and turned on ''Allocate all disk space now'' and ''Split disk into 2 GB files''. Allocating the disk space will increase performance, while spliting the disk into 2GB chunks will minimise any file size limitations if transferring a virtual machine using Samba.
#* Memory - Increase the memory given to the guest OS from 256 (the default) to 512. Although not necessary since I've got the RAM, why not.
+
<ol><li>Change the settings of the new virtual machine:</li></ol>
#* CD-ROM - Use ISO Image: set to the location of the downloaded is, mine was '''O:\BitTorrent\ubuntu-5.10-install-i386.iso'''
+
 
# Start the virtual machine.
+
* Memory - Increase the memory given to the guest OS from 256 (the default) to 512. Although not necessary since I've got the RAM, why not.
# At the boot menu, press enter.
+
* CD-ROM - Use ISO Image: set to the location of the downloaded is, mine was '''O:\BitTorrent\ubuntu-5.10-install-i386.iso'''
# Configure the Ubuntu installation:
+
<ol><li>Start the virtual machine.
#* Language & Location: Doesn't matter
+
</li><li>At the boot menu, press enter.
#* Keyboard: I stuck with the default, '''American English'''
+
</li><li>Configure the Ubuntu installation:</li></ol>
#* Hostname: Doesn't matter, I went with '''Ubuntu'''
+
 
#* Disk Partition: '''Erase entire disk: SCSI (...'''
+
* Language & Location: Doesn't matter
#* Write Changes to Disk: '''Yes'''
+
* Keyboard: I stuck with the default, '''American English'''
#* ...wait...
+
* Hostname: Doesn't matter, I went with '''Ubuntu'''
#* Timezone: Doesn't matter
+
* Disk Partition: '''Erase entire disk: SCSI (...'''
#* Full name for the new user: I chose '''bob'''
+
* Write Changes to Disk: '''Yes'''
#* Username for your account: I chose '''bob'''
+
* ...wait...
#* Password and Verify: pick one, no restrictions
+
* Timezone: Doesn't matter
#* Reboot: '''Continue''', I didn't bother "removing" the ISO.
+
* Full name for the new user: I chose '''bob'''
#* Once you see ''Restarting system.'' Ubuntu has shutdown, press Ctrl-Alt to release the cursor and click VM->Power->Reset
+
* Username for your account: I chose '''bob'''
#* ...wait...
+
* Password and Verify: pick one, no restrictions
#* Select video modes...: Don't add anything more than the defaults '''1024x768''', '''800x600''', '''640x480'''
+
* Reboot: '''Continue''', I didn't bother "removing" the ISO.
 +
* Once you see ''Restarting system.'' Ubuntu has shutdown, press Ctrl-Alt to release the cursor and click VM->Power->Reset
 +
* ...wait...
 +
* Select video modes...: Don't add anything more than the defaults '''1024x768''', '''800x600''', '''640x480'''
 
At this point Ubuntu is usable but without the virtual tools you can not use some of the higher resolutions. and to release the mouse you must press Ctrl-Alt.  So onto the install...
 
At this point Ubuntu is usable but without the virtual tools you can not use some of the higher resolutions. and to release the mouse you must press Ctrl-Alt.  So onto the install...
=== Installing Virtual [[UbuntuHelp:VmwareTools|VmwareTools]] ===
+
=== Installing Virtual VmwareTools ===
 
There a number of advantages in installing [[UbuntuHelp:VmwareTools|VmwareTools]] in your Ubuntu guest VM.
 
There a number of advantages in installing [[UbuntuHelp:VmwareTools|VmwareTools]] in your Ubuntu guest VM.
# Open the System->Administration->Synaptic Package Manager
+
<ol><li>Open the System->Administration->Synaptic Package Manager
# Install the following packages (replace 'kernel version' below with what is reported with ''uname -r''):
+
</li><li>Install the following packages (replace 'kernel version' below with what is reported with ''uname -r''):</li></ol>
 +
 
 
<pre><nowiki>
 
<pre><nowiki>
 
uname -r
 
uname -r
 
sudo apt-get install make gcc gcc-3.4 linux-headers-'kernel version'
 
sudo apt-get install make gcc gcc-3.4 linux-headers-'kernel version'
 
</nowiki></pre>
 
</nowiki></pre>
# Goto the desktop and eject the Ubuntu iso.
+
<ol><li>Goto the desktop and eject the Ubuntu iso.
# Ctrl-Alt to get the cursor back, VM->Install [[UbuntuHelp:VMware|VMware]] Tools...
+
</li><li>Ctrl-Alt to get the cursor back, VM->Install [[UbuntuHelp:VMware|VMware]] Tools...
# Wait for the ''CD'' to appear on the desktop. This may require going to Places->Computer and clicking on the CD icon to make Ubuntu read the new disk.
+
</li><li>Wait for the ''CD'' to appear on the desktop. This may require going to Places->Computer and clicking on the CD icon to make Ubuntu read the new disk.
# Copy '''[[UbuntuHelp:VMware|VMware]]''''''Tools-x.x.x-xxxx.tar.gz''' from the CD to your desktop.
+
</li><li>Copy '''[[UbuntuHelp:VMware|VMware]]''''''Tools-x.x.x-xxxx.tar.gz''' from the CD to your desktop.
# Right click on the [[UbuntuHelp:VMware|VMware]]''''''Tools tarball and select ''Extract Here''
+
</li><li>Right click on the [[UbuntuHelp:VMware|VMware]]''''''Tools tarball and select ''Extract Here''
# Open a terminal
+
</li><li>Open a terminal</li></ol>
 +
 
 
<pre><nowiki>
 
<pre><nowiki>
 
export CC=/usr/bin/gcc-3.4
 
export CC=/usr/bin/gcc-3.4
第118行: 第148行:
 
* If you pick one that doesn't work, get to a terminal and run /usr/bin/vmware-config-tools.pl to pick a different one.
 
* If you pick one that doesn't work, get to a terminal and run /usr/bin/vmware-config-tools.pl to pick a different one.
 
* What you pick here becomes the max setting and you can pick a lower one withing Ubuntu, however the max is used at startup so if it doesn't work you are up the creek.
 
* What you pick here becomes the max setting and you can pick a lower one withing Ubuntu, however the max is used at startup so if it doesn't work you are up the creek.
*# Restart the system with System->Log out->Shutdown. Wait until Ubuntu has shutdown and either turn off or restart the VM.
+
<ol><li>Restart the system with System->Log out->Shutdown. Wait until Ubuntu has shutdown and either turn off or restart the VM.</li></ol>
 +
 
 
=== Installation tips ===
 
=== Installation tips ===
0. The install script asks for the path of gcc. If it isn't automatically found find the path on your system by running <pre><nowiki>
+
<ol><li>The install script asks for the path of gcc. If it isn't automatically found find the path on your system by running <pre><nowiki>
 
  which gcc </nowiki></pre>. Set the full path to the binary in the variable CC: <pre><nowiki>
 
  which gcc </nowiki></pre>. Set the full path to the binary in the variable CC: <pre><nowiki>
 
  export CC=/usr/bin/gcc-3.4 </nowiki></pre>
 
  export CC=/usr/bin/gcc-3.4 </nowiki></pre>
0. When you run ''vmware-config.pl'', if the script can't find your kernel's C headers you must install the appropriate headers package. Do this by running <pre><nowiki>
+
</li><li>When you run ''vmware-config.pl'', if the script can't find your kernel's C headers you must install the appropriate headers package. Do this by running <pre><nowiki>
sudo apt-get install linux-headers-$(uname -r) </nowiki></pre>
+
sudo apt-get install linux-headers-$(uname -r) </nowiki></pre></li></ol>
 +
 
 
You must then point vmware-config.pl to the appropriate directory, such as <pre><nowiki>
 
You must then point vmware-config.pl to the appropriate directory, such as <pre><nowiki>
 
  /usr/src/linux-headers-2.6.10-5-686/include </nowiki></pre>
 
  /usr/src/linux-headers-2.6.10-5-686/include </nowiki></pre>
0. If the [[UbuntuHelp:VMware|VMware]] Management Interface (MUI) for GSX complains about a lack of ''libdb.so.3'' and instruct you to get ''compat-db-3.3.<##>-<#>.i386.rpm''.  You want the Ubuntu package ''libdb2'' for this.
+
<ol><li>If the [[UbuntuHelp:VMware|VMware]] Management Interface (MUI) for GSX complains about a lack of ''libdb.so.3'' and instruct you to get ''compat-db-3.3.<##>-<#>.i386.rpm''.  You want the Ubuntu package ''libdb2'' for this.</li></ol>
 +
 
 
=== Enabling Parallel Port Access ===
 
=== Enabling Parallel Port Access ===
 
[[UbuntuHelp:VMware|VMware]] allows direct access to parallel ports, which is handy if you've got a scanner that only has Windows drivers.  You may need to make the following minor change to [[UbuntuHelp:VMware|VMware]]'s startup script.
 
[[UbuntuHelp:VMware|VMware]] allows direct access to parallel ports, which is handy if you've got a scanner that only has Windows drivers.  You may need to make the following minor change to [[UbuntuHelp:VMware|VMware]]'s startup script.
0. Open /etc/iniit.d/vmware in an editor by running <pre><nowiki>
+
<ol><li>Open /etc/iniit.d/vmware in an editor by running <pre><nowiki>
 
  gksudo gedit /etc/init.d/vmware </nowiki></pre>
 
  gksudo gedit /etc/init.d/vmware </nowiki></pre>
0. Find the case statement that looks like this (around line 814) <pre><nowiki>
+
</li><li>Find the case statement that looks like this (around line 814) <pre><nowiki>
 
   # See how we were called.
 
   # See how we were called.
 
   case "$1" in
 
   case "$1" in
 
   start) </nowiki></pre>
 
   start) </nowiki></pre>
0. Add the following text at the end of the case statement <pre><nowiki>
+
</li><li>Add the following text at the end of the case statement <pre><nowiki>
 
  rmmod lp
 
  rmmod lp
 
  chgrp lpadmin /dev/parport0
 
  chgrp lpadmin /dev/parport0
  chmod g+rw /dev/parport0 </nowiki></pre>
+
  chmod g+rw /dev/parport0 </nowiki></pre></li></ol>
* The VMWare "Snapshot Manager" may still crash when clicked on.  To work around this problem, set an environment variable in the shell before running [[UbuntuHelp:VMware|VMware]].  I have these two commands together in a shell script for launching the program: <pre><nowiki>
+
 
export VMWARE_USE_SHIPPED_GTK=yes
+
== Troubleshooting Tips ==
vmware
+
=== After a kernel update, VMWare stops working ===
</nowiki></pre>
+
* If you have a Pentium-M "Centrino" notebook, you may notice [[UbuntuHelp:VMware|VMware]] runs very slowly at times.  To fix this problem, do as follows in a shell script: <pre><nowiki>
+
#!/bin/sh
+
# Script to launch VMware under Breezy:
+
OLD_CSTATE="`cat /sys/module/processor/parameters/max_cstate`"
+
echo "1" > /sys/module/processor/parameters/max_cstate
+
export VMWARE_USE_SHIPPED_GTK=yes
+
vmware
+
echo $OLD_CSTATE > /sys/module/processor/parameters/max_cstate
+
</nowiki></pre>
+
* A heads up for people coming from hoary to breezy with a VMWare install. I was trying to reconfigure my vmware install for use in breezy (regenerate kernel modules, etc) using vmware-config.pl; however, doing so would not only fail to make VMWare work, but it would leave my system relatively unusable (specifically, sudo no longer worked!). The solution was to download the distribution tarball again, and reinstall (as per the instructions here). Simply reconfiguring the old install doesn't seem to work.
+
* Some people may have a problem starting bridged networking ''(vmnet0)''. vmnet0 is bridged to eth0, so try running '''ifdown eth0''' first, THEN running the vmware-config.pl or runme.pl.
+
* [[UbuntuHelp:VMware|VMware]] 5.5 doesn't need the 'vmware-any-any-update' package. If you did try this, you will get the following sorts of errors: <pre><nowiki>
+
Version mismatch with vmmon module: expecting 137.0, got 116.0. Try reinstalling VMware Workstation.
+
</nowiki></pre> To fix this problem, run the version of vmware-config.pl included in the [[UbuntuHelp:VMware|VMware]] package. If have already run the version in the vmware-any-any-update package, rerun the vmware-install.pl script to reinstall [[UbuntuHelp:VMware|VMware]].
+
* You get an error about missing library files (file extension .so).  This will happen if you don't have the X Window system installed.  You can either install the libraries one by one or install x-window-system-core, which is simpler, but will also install other unnecessary packages: <pre><nowiki>
+
sudo apt-get install x-window-system-core
+
</nowiki></pre>
+
=== Reconfiguring VMWare after kernel upgrade ===
+
 
After upgrading to a newer kernel version, you may find VMWare stops working and displays the error (note: if you're not running it from a terminal the program will just exit with no graphical error messages):
 
After upgrading to a newer kernel version, you may find VMWare stops working and displays the error (note: if you're not running it from a terminal the program will just exit with no graphical error messages):
 
<pre><nowiki>
 
<pre><nowiki>
第176行: 第190行:
 
Select yes, as you're network setting should not have changed.
 
Select yes, as you're network setting should not have changed.
 
Once the config file has finished you should be able to run VMWare again with no problems.
 
Once the config file has finished you should be able to run VMWare again with no problems.
=== VMware: Upgrading from Dapper to Edgy ===
+
=== Important Note about Updating from Hoary to Breezy ===
 +
A heads up for people coming from hoary to breezy with a VMWare install. I was trying to reconfigure my vmware install for use in breezy (regenerate kernel modules, etc) using vmware-config.pl; however, doing so would not only fail to make VMWare work, but it would leave my system relatively unusable (specifically, sudo no longer worked!). The solution was to download the distribution tarball again, and reinstall (as per the instructions here). Simply reconfiguring the old install doesn't seem to work.
 +
=== Configuration aborts when updating from Dapper to Edgy ===
 
When upgrading from Dapper to Edgy, and then running sudo vmware-config.pl (as explained above), you might find that the configuration aborts with the message:
 
When upgrading from Dapper to Edgy, and then running sudo vmware-config.pl (as explained above), you might find that the configuration aborts with the message:
 +
<pre><nowiki>
 
Unable to build the vmmon module.
 
Unable to build the vmmon module.
 +
 
The error contains the following line:
 
The error contains the following line:
 +
 
/tmp/vmware-config3/vmmon-only/./include/compat_wait.h:60: error: conflicting types for ‘poll_initwait’
 
/tmp/vmware-config3/vmmon-only/./include/compat_wait.h:60: error: conflicting types for ‘poll_initwait’
 
include/linux/poll.h:62: error: previous declaration of ‘poll_initwait’ was here
 
include/linux/poll.h:62: error: previous declaration of ‘poll_initwait’ was here
 +
</nowiki></pre>
 
You need to install the vmware-any-any-update patch, which you can find here: http://platan.vc.cvut.cz/ftp/pub/vmware. Just download the vmware-any-any-update file, untar it, and run  
 
You need to install the vmware-any-any-update patch, which you can find here: http://platan.vc.cvut.cz/ftp/pub/vmware. Just download the vmware-any-any-update file, untar it, and run  
 
sudo ./runme.pl
 
sudo ./runme.pl
 
It will automatically call vmware-config.pl, which should then complete normally (ignore the warnings generated).  
 
It will automatically call vmware-config.pl, which should then complete normally (ignore the warnings generated).  
 
A further explanation is here: http://www.vmware.com/community/thread.jspa?messageID=76957&tstart=0
 
A further explanation is here: http://www.vmware.com/community/thread.jspa?messageID=76957&tstart=0
=== VMWare Server Without X ===
+
=== Configuration aborts when updating from Feisty to Hardy (or any system running the 2.6.24-2 kernel) ===
For those wanting to use VMWare Server but wish not to install a GUI Environment you will need to install the following packages in addition to those required above in VMWare ServerThey must be installed PRIOR to running vmware-install.pl:
+
When using the 2.6.24-2 kernel, a patch must be applied to get the vmware modules to compileThis applies to you if vmware-config.pl crashes with the message
 
<pre><nowiki>
 
<pre><nowiki>
$ sudo apt-get install libx11-6 libxtst6 libxt6 libxrender1 libxi
+
make[2]: *** [/tmp/vmware-config0/vmmon-only/linux/driver.o] Error 1
 +
make[1]: *** [_module_/tmp/vmware-config0/vmmon-only] Error 2
 +
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-2-generic'
 +
make: *** [vmmon.ko] Error 2
 +
make: Leaving directory `/tmp/vmware-config0/vmmon-only'
 +
Unable to build the vmmon module.
 
</nowiki></pre>
 
</nowiki></pre>
If you plan on connecting to your server over SSH with X Forwarding, you must install x-window-system-core.
+
The solution is to download a patch from http://platan.vc.cvut.cz/ftp/pub/vmware/vmware-any-any-update115.tar.gz that will correct this issue.  Extract the files, then run
=== [[UbuntuHelp:VMware|VMware]] Workstion: Time Sync Issues ===
+
<pre><nowiki>
 +
sudo ./runme.pl
 +
</nowiki></pre>
 +
from the vmware-any-any-update115 directory. ''Note:  This is not my mirror, if someone cares to mirror this file it would be a good thing''
 +
Source: http://communities.vmware.com/thread/113938
 +
When running kernel 2.6.24-16, you need the patched patch from http://aldeby.org/blog/?p=113.
 +
=== Configuration aborts when Installing VMware 6.0.5 on Intrepid (or any system running the 2.7.27 kernel) ===
 +
You need to replace the three files
 +
<pre><nowiki>
 +
/usr/lib/vmware/modules/source/vmmon.tar
 +
/usr/lib/vmware/modules/source/vmnet.tar
 +
/usr/lib/vmware/modules/source/vmblock.tar
 +
</nowiki></pre> with the files available here: http://forum.ubuntu.org.cn/viewtopic.php?p=913873&sid=8b8d9aa85dd0ccd8ff0f4708d37d6dfd
 +
=== Ubuntu is hosting a guest VM, and the clock gets out of sync ===
 
The clock of a Linux guest OS could run much faster than the host computer, if the host computer isusing dynamic CPU speed technology.
 
The clock of a Linux guest OS could run much faster than the host computer, if the host computer isusing dynamic CPU speed technology.
 
To Fix this problem:
 
To Fix this problem:
0. Edit your /etc/vmware/config <pre><nowiki>
+
<ol><li>Edit your /etc/vmware/config <pre><nowiki>
 
sudo vim /etc/vmware/config
 
sudo vim /etc/vmware/config
 
</nowiki></pre>
 
</nowiki></pre>
0. Add the following line to /etc/vmware/config <pre><nowiki>
+
</li><li>Add the following line to /etc/vmware/config <pre><nowiki>
 
host.cpukHz = x
 
host.cpukHz = x
 
host.noTSC = TRUE
 
host.noTSC = TRUE
 
ptsc.noTSC = TRUE
 
ptsc.noTSC = TRUE
 
</nowiki></pre>x == Max CPU speed in kHz (i.e. 2GHz CPU == 2000000)
 
</nowiki></pre>x == Max CPU speed in kHz (i.e. 2GHz CPU == 2000000)
0. Install VMware Tools in Guest OS
+
</li><li>Install [[UbuntuHelp:VMware|VMware]] Tools in Guest OS
0. Verify that Time synchronization between the virtual machine and the host operating system is selected
+
</li><li>Verify that Time synchronization between the virtual machine and the host operating system is selected</li></ol>
[[category:CategoryDocumentation]] [[category:CategoryCleanup]]
+
 
 +
=== VMWare "Snapshot Manager" Crashes ===
 +
The VMWare "Snapshot Manager" may still crash when clicked on.  To work around this problem, set an environment variable in the shell before running [[UbuntuHelp:VMware|VMware]].  I have these two commands together in a shell script for launching the program: <pre><nowiki>
 +
export VMWARE_USE_SHIPPED_GTK=yes
 +
vmware
 +
</nowiki></pre>
 +
=== VMWare Runs Slowly on Pentium-M "Centrino" Notebook ===
 +
If you have a Pentium-M "Centrino" notebook, you may notice [[UbuntuHelp:VMware|VMware]] runs very slowly at times.  To fix this problem, do as follows in a shell script: <pre><nowiki>
 +
#!/bin/sh
 +
# Script to launch VMware under Breezy:
 +
OLD_CSTATE="`cat /sys/module/processor/parameters/max_cstate`"
 +
echo "1" > /sys/module/processor/parameters/max_cstate
 +
export VMWARE_USE_SHIPPED_GTK=yes
 +
vmware
 +
echo $OLD_CSTATE > /sys/module/processor/parameters/max_cstate
 +
</nowiki></pre>
 +
=== Bridged Networking Won't Start ===
 +
Some people may have a problem starting bridged networking ''(vmnet0)''. vmnet0 is bridged to eth0, so try running '''ifdown eth0''' first, THEN running the vmware-config.pl or runme.pl.
 +
=== VMWare 5.5 breaks after installing the 'vmware-any-any-update' package ===
 +
[[UbuntuHelp:VMware|VMware]] 5.5 doesn't need the 'vmware-any-any-update' package. If you did try this, you will get the following sorts of errors: <pre><nowiki>
 +
Version mismatch with vmmon module: expecting 137.0, got 116.0. Try reinstalling VMware Workstation.
 +
</nowiki></pre> To fix this problem, run the version of vmware-config.pl included in the [[UbuntuHelp:VMware|VMware]] package. If have already run the version in the vmware-any-any-update package, rerun the vmware-install.pl script to reinstall [[UbuntuHelp:VMware|VMware]].
 +
=== Missing Library Files Error ===
 +
You get an error about missing library files (file extension .so).  This will happen if you don't have the X Window system installed.  You can either install the libraries one by one or install x-window-system-core, which is simpler, but will also install other unnecessary packages: <pre><nowiki>
 +
sudo apt-get install x-window-system-core
 +
</nowiki></pre>
 +
[[category:CategoryVirtualization]]
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2010年5月20日 (四) 00:47的最新版本

<<Include(Tag/StyleCleanup)>> <<Include(Tag/Unsupported)>>

Ubuntu as a VMware host

Installing from the .bundle

Tested with:

  • VMware Workstation 6.5.1 Build 126130, Ubuntu 8.10, AMD64
  • VMware Workstation 6.5.1, Kubuntu 8.10, AMD64
  • VMWare Workstation 6.5.0, Ubuntu 8.10 x86
  • VMWare Workstation 6.5.0, Super Ubuntu 8.10 x86

VMware-Workstation-6.5.0-118166.i386.bundle

  1. Install required packages build-essential, linux-kernel-headers and linux-kernel-devel
    sudo aptitude install build-essential linux-kernel-headers linux-kernel-devel
    
  2. Navigate to where the .bundle VMWare file is, then type this in
     
    gksudo bash ./VMware-Workstation-6.5.0-118166.i386.bundle 
    

And that's it! Enjoy your VMWare Workstation installation!

Alternate Installation from .bundle

Tested with:

  • VMWare Workstation 6.5.0, !HackBuntu Alpha 3 8.10 x86 (PM me for DL link)
  • VMWare Workstation 6.5.0, Super Ubuntu 8.10 x86
In the terminal, navigate (cd) to where your installation resides. Then type this in
sudo ./VMware-Workstation-6.5.0-118166.i386.bundle

Installing on Jaunty

Credit to: judgen http://ubuntuforums.org/showthread.php?t=1040351

0. Same as above, but then you have to remove the broken module:
 
sudo mv /usr/lib/vmware/modules/binary /usr/lib/vmware/modules/binary.old
1. then simply rebuild the module.
 
sudo vmware-modconfig --console --install-all

Installing from the .rpm

VMware-workstation-6.0.2-59824.i386.rpm It’s relatively easy to convert VMWare’s .rpm to a .deb and install VMWare inside the package manager. Here’s how:

  1. Make sure you have the kernel headers and compiler first, with:
sudo apt-get install linux-headers-$(uname -r) build-essential gcc-3.4
  1. Download VMWare Workstation 6.0 from their site in .rpm format, and get a serial number from them while you’re at it.
  2. Convert the .rpm to a .deb with
fakeroot alien --scripts VMware-workstation-6.0.*.rpm
  1. Install the .deb with
sudo dpkg -i vmwareworkstation_6.0.*.deb
  1. Edit /etc/vmware/locations as root and add the following three lines (not necessary on 6.0.5):
    1. Just after
    answer BINDIR /usr/bin
    

    add

    answer SBINDIR /usr/sbin
    
    1. Just after
    remove_answer BINDIR
    answer BINDIR /usr/bin
    

    add

    remove_answer SBINDIR
    answer SBINDIR /usr/sbin
    
    1. Run vmware-config.pl (and answer the questions accordingly; this hasn’t really changed since VMWare 4.5. You will have to give the correct location for the kernel headers, i.e. /usr/src/linux-`uname -r`/, although you must know in advance what `uname -r` will return.) with
    sudo /usr/bin/vmware-config.pl
    
    1. Unzip the EULA, which VMWare expects to be uncompressed but which is installed compressed:
    sudo gunzip /usr/share/doc/vmware/EULA.gz
    
    1. Start vmware, accept the EULA, and enter the serial number.

    Ubuntu as a VMware Guest

    VMware version 5 is reported to work with Ubuntu out-of-the-box. Try using NAT rather than bridging when using VMware 5 with Ubuntu as a guest OS.

    Initial Install

    1. Download the iso from http://www.ubuntu.com/download/ this demo used the ubuntu-5.10-install-i386.iso image.
    2. Create a new Virtual Machine.
    • Virtual Machine Configuration: Typical
    • Guest Operating System: Linux
    • Version: Other Linux 2.6.x kernel
    • Virtual Machine Name & Location: Pick as you will. (for the record I chose Ubuntu and O:\VPC\)
    • Network Connection: Use bridged networking (Refer to this VMware documentation for information on the other network connection configurations.)
    • Disk capacity: Again the choice is yours, I chose 4GB and turned on Allocate all disk space now and Split disk into 2 GB files. Allocating the disk space will increase performance, while spliting the disk into 2GB chunks will minimise any file size limitations if transferring a virtual machine using Samba.
    1. Change the settings of the new virtual machine:
    • Memory - Increase the memory given to the guest OS from 256 (the default) to 512. Although not necessary since I've got the RAM, why not.
    • CD-ROM - Use ISO Image: set to the location of the downloaded is, mine was O:\BitTorrent\ubuntu-5.10-install-i386.iso
    1. Start the virtual machine.
    2. At the boot menu, press enter.
    3. Configure the Ubuntu installation:
    • Language & Location: Doesn't matter
    • Keyboard: I stuck with the default, American English
    • Hostname: Doesn't matter, I went with Ubuntu
    • Disk Partition: Erase entire disk: SCSI (...
    • Write Changes to Disk: Yes
    • ...wait...
    • Timezone: Doesn't matter
    • Full name for the new user: I chose bob
    • Username for your account: I chose bob
    • Password and Verify: pick one, no restrictions
    • Reboot: Continue, I didn't bother "removing" the ISO.
    • Once you see Restarting system. Ubuntu has shutdown, press Ctrl-Alt to release the cursor and click VM->Power->Reset
    • ...wait...
    • Select video modes...: Don't add anything more than the defaults 1024x768, 800x600, 640x480

    At this point Ubuntu is usable but without the virtual tools you can not use some of the higher resolutions. and to release the mouse you must press Ctrl-Alt. So onto the install...

    Installing Virtual VmwareTools

    There a number of advantages in installing VmwareTools in your Ubuntu guest VM.

    1. Open the System->Administration->Synaptic Package Manager
    2. Install the following packages (replace 'kernel version' below with what is reported with uname -r):
    uname -r
    sudo apt-get install make gcc gcc-3.4 linux-headers-'kernel version'
    
    1. Goto the desktop and eject the Ubuntu iso.
    2. Ctrl-Alt to get the cursor back, VM->Install VMware Tools...
    3. Wait for the CD to appear on the desktop. This may require going to Places->Computer and clicking on the CD icon to make Ubuntu read the new disk.
    4. Copy VMware'Tools-x.x.x-xxxx.tar.gz' from the CD to your desktop.
    5. Right click on the VMware'Tools tarball and select Extract Here
    6. Open a terminal
    export CC=/usr/bin/gcc-3.4
    cd ~/Desktop/vmware-tools-distrib
    sudo ./vmware-install.pl
    

    Accept all the defaults, this should take you through making a few directories and then run the config program. The config program will need to compile the drivers and so it will use make, the gcc you specified and the headers to compile.

    • The first non default is screen size. I know 640x480, 800x600 and 1024x768 work, I have had 1280x1024 work (I use this one) and I've had 1600x1200 not work.
    • If you pick one that doesn't work, get to a terminal and run /usr/bin/vmware-config-tools.pl to pick a different one.
    • What you pick here becomes the max setting and you can pick a lower one withing Ubuntu, however the max is used at startup so if it doesn't work you are up the creek.
    1. Restart the system with System->Log out->Shutdown. Wait until Ubuntu has shutdown and either turn off or restart the VM.

    Installation tips

    1. The install script asks for the path of gcc. If it isn't automatically found find the path on your system by running
       which gcc 
      . Set the full path to the binary in the variable CC:
       export CC=/usr/bin/gcc-3.4 
    2. When you run vmware-config.pl, if the script can't find your kernel's C headers you must install the appropriate headers package. Do this by running
      sudo apt-get install linux-headers-$(uname -r) 
    You must then point vmware-config.pl to the appropriate directory, such as
     /usr/src/linux-headers-2.6.10-5-686/include 
    1. If the VMware Management Interface (MUI) for GSX complains about a lack of libdb.so.3 and instruct you to get compat-db-3.3.<##>-<#>.i386.rpm. You want the Ubuntu package libdb2 for this.

    Enabling Parallel Port Access

    VMware allows direct access to parallel ports, which is handy if you've got a scanner that only has Windows drivers. You may need to make the following minor change to VMware's startup script.

    1. Open /etc/iniit.d/vmware in an editor by running
       gksudo gedit /etc/init.d/vmware 
    2. Find the case statement that looks like this (around line 814)
        # See how we were called.
        case "$1" in
         start) 
    3. Add the following text at the end of the case statement
       rmmod lp
       chgrp lpadmin /dev/parport0
       chmod g+rw /dev/parport0 

    Troubleshooting Tips

    After a kernel update, VMWare stops working

    After upgrading to a newer kernel version, you may find VMWare stops working and displays the error (note: if you're not running it from a terminal the program will just exit with no graphical error messages):

    vmware is installed, but it has not been (correctly) configured
    for this system. To (re-)configure it, invoke the following command:
    /usr/bin/vmware-config.pl.
    

    This happens even on a minor kernel update (e.g 2.6.12-9 to 2.6.12-10), but is simple to rectify using the steps above. Before running "/usr/bin/vmware-config.pl" as suggested you will need to get the correct kernel headers for your new kernel, and make sure you point the correct version of gcc to the config script. All this is explained above, so I wont go through it here. Once you've done that run the conifg script, select the defaults for all the options except:

    Would you like to skip networking setup and keep your old settings as they are?
    (yes/no) [no] 
    

    Select yes, as you're network setting should not have changed. Once the config file has finished you should be able to run VMWare again with no problems.

    Important Note about Updating from Hoary to Breezy

    A heads up for people coming from hoary to breezy with a VMWare install. I was trying to reconfigure my vmware install for use in breezy (regenerate kernel modules, etc) using vmware-config.pl; however, doing so would not only fail to make VMWare work, but it would leave my system relatively unusable (specifically, sudo no longer worked!). The solution was to download the distribution tarball again, and reinstall (as per the instructions here). Simply reconfiguring the old install doesn't seem to work.

    Configuration aborts when updating from Dapper to Edgy

    When upgrading from Dapper to Edgy, and then running sudo vmware-config.pl (as explained above), you might find that the configuration aborts with the message:

    Unable to build the vmmon module.
    
    The error contains the following line:
    
    /tmp/vmware-config3/vmmon-only/./include/compat_wait.h:60: error: conflicting types for ‘poll_initwait’
    include/linux/poll.h:62: error: previous declaration of ‘poll_initwait’ was here
    

    You need to install the vmware-any-any-update patch, which you can find here: http://platan.vc.cvut.cz/ftp/pub/vmware. Just download the vmware-any-any-update file, untar it, and run sudo ./runme.pl It will automatically call vmware-config.pl, which should then complete normally (ignore the warnings generated). A further explanation is here: http://www.vmware.com/community/thread.jspa?messageID=76957&tstart=0

    Configuration aborts when updating from Feisty to Hardy (or any system running the 2.6.24-2 kernel)

    When using the 2.6.24-2 kernel, a patch must be applied to get the vmware modules to compile. This applies to you if vmware-config.pl crashes with the message

    make[2]: *** [/tmp/vmware-config0/vmmon-only/linux/driver.o] Error 1
    make[1]: *** [_module_/tmp/vmware-config0/vmmon-only] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-2-generic'
    make: *** [vmmon.ko] Error 2
    make: Leaving directory `/tmp/vmware-config0/vmmon-only'
    Unable to build the vmmon module.
    

    The solution is to download a patch from http://platan.vc.cvut.cz/ftp/pub/vmware/vmware-any-any-update115.tar.gz that will correct this issue. Extract the files, then run

    sudo ./runme.pl
    

    from the vmware-any-any-update115 directory. Note: This is not my mirror, if someone cares to mirror this file it would be a good thing Source: http://communities.vmware.com/thread/113938 When running kernel 2.6.24-16, you need the patched patch from http://aldeby.org/blog/?p=113.

    Configuration aborts when Installing VMware 6.0.5 on Intrepid (or any system running the 2.7.27 kernel)

    You need to replace the three files

    /usr/lib/vmware/modules/source/vmmon.tar
    /usr/lib/vmware/modules/source/vmnet.tar
    /usr/lib/vmware/modules/source/vmblock.tar
    
    with the files available here: http://forum.ubuntu.org.cn/viewtopic.php?p=913873&sid=8b8d9aa85dd0ccd8ff0f4708d37d6dfd

    Ubuntu is hosting a guest VM, and the clock gets out of sync

    The clock of a Linux guest OS could run much faster than the host computer, if the host computer isusing dynamic CPU speed technology. To Fix this problem:

    1. Edit your /etc/vmware/config
      sudo vim /etc/vmware/config
      
    2. Add the following line to /etc/vmware/config
      host.cpukHz = x
      host.noTSC = TRUE
      ptsc.noTSC = TRUE
      
      x == Max CPU speed in kHz (i.e. 2GHz CPU == 2000000)
    3. Install VMware Tools in Guest OS
    4. Verify that Time synchronization between the virtual machine and the host operating system is selected

    VMWare "Snapshot Manager" Crashes

    The VMWare "Snapshot Manager" may still crash when clicked on. To work around this problem, set an environment variable in the shell before running VMware. I have these two commands together in a shell script for launching the program:
    export VMWARE_USE_SHIPPED_GTK=yes
    vmware
    

    VMWare Runs Slowly on Pentium-M "Centrino" Notebook

    If you have a Pentium-M "Centrino" notebook, you may notice VMware runs very slowly at times. To fix this problem, do as follows in a shell script:
    #!/bin/sh
    # Script to launch VMware under Breezy:
    OLD_CSTATE="`cat /sys/module/processor/parameters/max_cstate`"
    echo "1" > /sys/module/processor/parameters/max_cstate
    export VMWARE_USE_SHIPPED_GTK=yes
    vmware
    echo $OLD_CSTATE > /sys/module/processor/parameters/max_cstate
    

    Bridged Networking Won't Start

    Some people may have a problem starting bridged networking (vmnet0). vmnet0 is bridged to eth0, so try running ifdown eth0 first, THEN running the vmware-config.pl or runme.pl.

    VMWare 5.5 breaks after installing the 'vmware-any-any-update' package

    VMware 5.5 doesn't need the 'vmware-any-any-update' package. If you did try this, you will get the following sorts of errors:
    Version mismatch with vmmon module: expecting 137.0, got 116.0. Try reinstalling VMware Workstation.
    
    To fix this problem, run the version of vmware-config.pl included in the VMware package. If have already run the version in the vmware-any-any-update package, rerun the vmware-install.pl script to reinstall VMware.

    Missing Library Files Error

    You get an error about missing library files (file extension .so). This will happen if you don't have the X Window system installed. You can either install the libraries one by one or install x-window-system-core, which is simpler, but will also install other unnecessary packages:
    sudo apt-get install x-window-system-core