Difference between revisions of "VMware (简体中文)"

From ArchWiki
Jump to navigation Jump to search
Line 20: Line 20:
* 如果你的内核为2.6.24,你需要[http://rtr.ca/vmware-2.6.24/ patch] (vmware-any-any-update115a.tgz)
* 如果你的内核为2.6.24,你需要[http://rtr.ca/vmware-2.6.24/ patch] (vmware-any-any-update115a.tgz)
* Run '''''sudo mkdir -p /etc/rc.d/vmware.d/rc{0,1,2,3,4,5,6}.d''''' to create VMware runlevel directories.
* 执行 '''''sudo mkdir -p /etc/rc.d/vmware.d/rc{0,1,2,3,4,5,6}.d''''' ,用以创建VMWare运行级目录。
* Run '''''sudo ln -s /bin/lsmod /sbin/''''' to create symlink for lsmod.
* 执行 '''''sudo ln -s /bin/lsmod /sbin/''''' ,用以创建lsmod的软链接。
* Extract VMware server tarball somewhere... i.e. /tmp/.
* 将VMWare Server的压缩包解压到某处,比如/tmp/.
* Run '''''cd /tmp/vmware-server-distrib;sudo ./vmware-install.pl'''''. I used '''''/home/vmware/bin''''' for installation.
* 执行 '''''cd /tmp/vmware-server-distrib;sudo ./vmware-install.pl'''''。 这里,我将VMWare安装在 '''''/home/vmware/bin''''' 下。
* When it asks where the directories for ''rc0.d'' thru ''rc6.d'' are, use '''''/etc/rc.d/vmware.d'''''.
* 当问到 ''rc0.d'' ''rc6.d'' 目录在什么位置时,输入这个: '''''/etc/rc.d/vmware.d'''''
* When it asks where the init directory is, use '''''/etc/rc.d'''''.
* 当问到init文件的目录在哪里时,使用 '''''/etc/rc.d'''''
* '''*QUIT*''' when it asks you if you want to run VMware configuration for the first time.
* 当安装程序说是否进行第一次的配置时,直接'''*退出*'''
* Extract VMware server any-to-any patch somewhere... i.e. /tmp/.
* 将下载到的vmware-any-any补丁释放到某目录,例如/tmp/.
* Run '''''cd /tmp/vmware-any-any-update*REV*;sudo ./runme.pl'''''. This will patch VMware server modules to allow Linux kernel 2.6.20 compilation.
* 执行 '''''cd /tmp/vmware-any-any-update*REV*;sudo ./runme.pl'''''。 这将给VMWare内核模块打补丁,以支持新的内核。
* Run '''''cd /home/vmware/bin;sudo ./vmware-config.pl''''' to compile VMware modules.
* 执行 '''''cd /home/vmware/bin;sudo ./vmware-config.pl''''' ,开始编译VMWare内核模块。
== Running ==
== 运行 ==
It's a possibility the first time you try to run Vmware server it'll throw an error stating something about "Unable to power virtual machine". Stop the VMware server and restart xinetd wtih '''''/etc/rc.d/vmware stop;wait;/etc/rc.d/xinetd restart'''''.
第一次运行VMWare Server的时候,有可能会跳出一个提示,说“Unable to power virtual machine(无法开启虚拟机)”。关闭VMWare Server然后执行 '''''/etc/rc.d/vmware stop;wait;/etc/rc.d/xinetd restart'''''.
Rerun '''''sudo /home/vmware/bin/vmware-config.pl''''' again. If this still fails, restart your computer and do the above again. It should be fixed.
重新运行 '''''sudo /home/vmware/bin/vmware-config.pl''''' 。如果还是不行,重启电脑后继续此过程。
There is now a <code>vmware</code> init script in <code>/etc/rc.d</code>.  You can add this to your daemons list if you want.  I personally dont do this, but if you intend to use the vmware's network when not actually using vmware, then you will need to do this.  You will need to start it before you can run vmware though.
<code>/etc/rc.d</code>目录下有一个<code>vmware</code>启动脚本。你可以将其加入到守护进程中。我个人并不这么做,但是如果你想在不启动VMWare的情况下使用其网络功能,就需要这样做。 另外,在vmware启动前,此脚本必须启动。
There is a problem with vmware unable to run correctly after a reboot.  To fix this edit <code>/etc/rc.d/vmware</code>, find the text below
  case "$1" in
  case "$1" in
and put
  rm /etc/vmware/not_configured
  rm /etc/vmware/not_configured
immediately after that line.
To start vmware, you just do <code>vmware</code> from a console window, or create a shortcut or menu item however you like.
'''Some notes:'''
Leave the <code>/etc/rc.d/vmware.d</code> directory there, because it is needed whenever you perform <code>vmware-config.pl</code>.
Remember, if the kernel is changed or updated, you will need to run <code>vmware-config.pl</code> again.
== Kernel 2.6 and udev ==
== 2.6内核和udev ==
Follow the steps above and then:
'''1. Modify udev config'''
'''1. Modify udev config'''

Revision as of 10:38, 28 February 2008

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n links end

VMware 可以安装在 ArchLinux 上,但是过程并不像其他发行版那么直接。


你可以使用 AUR 或者手动安装(从VMware.com下载VMware Server)。本文介绍手动安装VMWare Server的过程,首先假设你的Arch系统版本为Voodoo或以上,并且内核版本大于2.6.20(32bit)。


  • 根用户权限。'sudo' 或者 'su'。在这里我使用'sudo'。
  • 安装了Xinetd并且正在运行。(译者注:不一定需要)
  • 安装了libxtst、libxt和libxrender等X-libraries库。
  • VMware server tarball;目前最高版本为1.0.4 build 56528。
  • 如果你的内核为2.6.24,你需要patch (vmware-any-any-update115a.tgz)


  • 执行 sudo mkdir -p /etc/rc.d/vmware.d/rc{0,1,2,3,4,5,6}.d ,用以创建VMWare运行级目录。
  • 执行 sudo ln -s /bin/lsmod /sbin/ ,用以创建lsmod的软链接。
  • 将VMWare Server的压缩包解压到某处,比如/tmp/.
  • 执行 cd /tmp/vmware-server-distrib;sudo ./vmware-install.pl。 这里,我将VMWare安装在 /home/vmware/bin 下。
  • 当问到 rc0.drc6.d 目录在什么位置时,输入这个: /etc/rc.d/vmware.d
  • 当问到init文件的目录在哪里时,使用 /etc/rc.d
  • 当安装程序说是否进行第一次的配置时,直接*退出*
  • 将下载到的vmware-any-any补丁释放到某目录,例如/tmp/.
  • 执行 cd /tmp/vmware-any-any-update*REV*;sudo ./runme.pl。 这将给VMWare内核模块打补丁,以支持新的内核。
  • 执行 cd /home/vmware/bin;sudo ./vmware-config.pl ,开始编译VMWare内核模块。


第一次运行VMWare Server的时候,有可能会跳出一个提示,说“Unable to power virtual machine(无法开启虚拟机)”。关闭VMWare Server然后执行 /etc/rc.d/vmware stop;wait;/etc/rc.d/xinetd restart.

重新运行 sudo /home/vmware/bin/vmware-config.pl 。如果还是不行,重启电脑后继续此过程。

/etc/rc.d目录下有一个vmware启动脚本。你可以将其加入到守护进程中。我个人并不这么做,但是如果你想在不启动VMWare的情况下使用其网络功能,就需要这样做。 另外,在vmware启动前,此脚本必须启动。


case "$1" in


rm /etc/vmware/not_configured








1. Modify udev config

Edit /etc/udev/rules.d/00-myrules.rules and add 2 lines:

# tty devices
KERNEL="tty[[0-9]]*", NAME="vc/%n", SYMLINK="%k"

# floppy devices
KERNEL="fd[[0-9]]*", NAME="floppy/%n" , SYMLINK="fd%n"

2. Start/stop script

It takes care of devices and starts vmware, also stops vmware and removes dev entries. Call it, for example, mkvmdev, chmod it 755 and put in /etc/rc.d:


. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
    stat_busy "Creating /dev entries and starting VMware"
    for i in `seq 0 9`; do
        mknod /dev/vmnet$i c 119 $i
        chmod 0600 /dev/vmnet$i
    for i in `seq 0 3`; do
        mknod /dev/parport$i c 99 $i
        chmod 0600 /dev/parport$i
    mknod /dev/vmmon c 10 165
    chmod 0660 /dev/vmmon
    /etc/rc.d/vmware start

    stat_busy "Stopping VMware and removing /dev entries"
    /etc/rc.d/vmware stop
    rm /dev/vmmon
    for i in `seq 0 3`; do
        rm /dev/parport$i
    for i in `seq 0 9`; do
        rm /dev/vmnet$i

    $0 stop
    $0 start

    echo "usage: $0 {start|stop|restart}"
exit 0

3. Modify /etc/rc.conf. (*Note - this step is optional! See also the notes under the "Running" section above)

Add mkvmdev to daemons in your rc.conf, and remember to remove vmware from rc.conf. Or if you prefer, you can delete the lines that launch vmware from mkvmdev and leave your original vmware in rc.conf - your choice.


hi guys, a couple of quick questions:
- why is /dev/vmmon chmod 0660, as opposed to the rest (0600)?
- i suppose /dev/vmmon should be "rm"-ed as well in the "stop" section for the script above? (that line is missing) - FIXED

vmware and kernel 2.6.20 compile modules problem

Below is a solution for compiling the vmware modules on kernel 2.6.20.

cd /usr/lib/vmware/modules/source/
sudo tar -xvf vmmon.tar
cd vmmon-only
sudo vi include/compat_kernel.h

Find this:

#define __NR_compat_exit __NR_exit
static inline _syscall1(int, compat_exit, int, exit_code);

and change the static inline ..... line to:

int compat_exit(int exit_code);

Then tar up the vmmon-only directory again.

cd .. #go back to the source directory
tar -cf vmmon.tar vmmon-only

Finally, run vmware-config.pl

vmware and kernel 2.6.16 compile modules problem

PROBLEM: kernel 2.6.16-x - vmware or vmwareplayer complains that headers are incorect.
FIX: You need vmware-any-any-update patch mirror here or here.
Just untar the archive and run ./runme.pl as root - and you-re happy again!

vmware on kernel 2.6.22

May not work properly yet. Apply the patch from http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update112.tar.gz , replace vmnet.tar with http://npw.net/~phbaer/vmnet.tar and reinstall. Note: this is an ugly hack, please dont put it into production systems. Some guest OS'es may have crashes and networking problems with this. Dont tell us that you havent been warned

slow networking between host and guest

"Those oversized improperly checksummed packets are TCP Segmentation Offload packets. Use 'ethtool -k eth0 tso off' to disable TSO on eth0 (or any other interface which you want to get bridged). At this moment vmnet does not understand TSO, and in addition to that it is silly to use TSO together with bridged networking as vmnet will have to split such packet anyway to pass it to the guest, so splitting will be done anyway, and in addition to it kernel will have to prepare metadata about TCP stream for hardware, so you'll probably get worse performance with TSO enabled than with disabled when you'll have some guest running."

NOTE: ethtool is on extra packages

Samba issues

The guest os under vmware cannot see a samba share running on the linux host. To fix this problem, edit /etc/samba/smb.conf and make some changes under [global]. The following are suggested:
workgroup = YOUR_WORKGROUP
netbios name = YOUR_SERVER_NAME
encrypt passwords = yes
interfaces = eth0 vmnet1 vmnet8
sysv shm key=/dev/vmnet1
bind interfaces only = true

Connecting Remotely

If you setup a server that you would like to connect to remotely, please add the following to /etc/hosts.allow:

vmware-authd: ALL

This will enable xinetd to allow connections from a remote vmware client.

If this condition is not met, you may see in your /var/log/everything.log:

Feb  4 03:34:12 jeffc xinetd[7232]: libwrap refused connection to vmware-authd (libwrap=vmware-authd) from