特殊:Badtitle/NS100:VMware/Server

来自Ubuntu中文
Wikibot留言 | 贡献2007年12月8日 (六) 10:00的版本
跳到导航跳到搜索

{{#ifexist: :VMware/Server/zh | | {{#ifexist: VMware/Server/zh | | {{#ifeq: {{#titleparts:VMware/Server|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:VMware/Server|1|-1|}} | zh | | }}

VMware Server is a proprietary virtualization software package made available for no cost from the VMware website. VMware Server allows you to run entire operating systems in a virtual machine, which runs on top of Edubuntu, Ubuntu or Xubuntu. This guide provides instructions on installing, configuring and running VMware Server and VMware Server Console on (Ed/K/X)Ubuntu.

Installation and Quick Start

  • Ubuntu 7.10 (Gutsy Gibbon), Ugly Source + Patch Method

Note: amd64 users will need to add ia32-libs to the list of packages to apt-get.

sudo apt-get install build-essential linux-headers-`uname -r` xinetd
wget http://download3.vmware.com/software/vmserver/VMware-server-1.0.3-44356.tar.gz
wget http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update115.tar.gz
tar -xzvf VMware-server-1.0.3-44356.tar.gz
tar -xzvf vmware-any-any-update115.tar.gz
cp vmware-any-any-update115/*.tar vmware-server-distrib/lib/modules/source/
cd vmware-server-distrib/
sudo mkdir -p /etc/vmware/ssl
sudo touch /etc/vmware/ssl/rui.key
sudo touch /etc/vmware/ssl/rui.crt
sudo ./vmware-install.pl
   
  • Ubuntu 7.04 (Feisty Fawn)

From Ubuntu packages

  1. Get a serial number by registering (for free) at http://register.vmware.com/content/registration.html
  2. Add the universe, multiverse, and commercial repositories to your Ubuntu 7.04 install Directions.
  3. Uninstall vmware-server if it is already installed according to the section in this document titled "Transitioning from a Source Install."
  4. Install the vmware-server package
  5. Until bug #115295 is fixed, you might need to edit /etc/pam.d/vmware-authd to read as follows:
#%PAM-1.0
auth required pam_unix_auth.so shadow nullok
account required pam_unix_acct.so
     
  1. Start the remote access console by going to Applications > System Tools > VMWare Server Console in the menus (or run vmware from the command line). From there you will be able to access vmware servers locally or remotely, and create/open VMware virtual machines. Login with your regular username and password.

For troubleshooting see the troubleshooting section in this document.

Installing VMware Tools on an Ubuntu VMware guest system

Installing VMware Tools inside your virtual machines can improve their performance. For information about speeding up your Ubuntu virtual machines see VMware/Tools

Other Topics

Installing from Source

These instructions have not been fully tested and are recommended for advanced users only.

  • Ubuntu 7.04 (Feisty Fawn)

Run [1] after the install fails when compiling kernel modules. See Install VMWare Server To Ubuntu Feisty for other solutions. A more elegant solution here would be much appreciated, as the diff between the current kernel modules provided by vmware and the modules in that .tar.gz is substantial.

  • Ubuntu 6.06 LTS (Dapper Drake)
  • Ubuntu 6.10 (Edgy Eft)
  1. Download the VMware Server Binary (.tar.gz) package for Linux from the VMware website. You will also need to register to receive the free-of-charge serial number which is required during installation.
  2. Enable the universe software channel (see Repositories for instructions).
  3. (Optional) switch from 386 kernel to 686 kernel and reboot
  4. (Optional) If you using Edubuntu as your host OS then you might want to un-install
  • SchoolTool (aptitude remove schooltool) Since it uses 119M in its idle state.
  • LTSP (aptitude remove ltsp-server-standalone) So you can remove DHCPD
  • DHCPD (aptitude remove dhcp3-server) How many DHCP servers do you need ?
  1. Install the following packages:
  • build-essentials
  • linux-headers
  • xinetd

1.

 sudo aptitude install build-essential linux-headers-`uname -r` xinetd
 

The second package is the linux-headers- package for your currently-installed kernel; the uname -r part will automatically insert your kernel version for you. to install two required packages. If you are using the server edition then you also need to install the following 3 X libraries and their dependencies.

  • libxtst6
  • libxt6
  • libxrender1
sudo aptitude install libxtst6 libxt6 libxrender1
  1. Once you have installed the required packages, you can now begin the VMware installer. Open a Terminal and type the following:
cd <temporary-location-with-disk-space>
tar zxvf /<download-location>/VMware-server-<xxx>.tar.gz
cd vmware-server-distrib/
sudo ./vmware-install.pl

Replace <download-location> with the path of the directory where you saved the archive, and replace <xxx> with the version number of the package you downloaded. The VMware installer program will be started in the Terminal window. 1.#6 Follow the on-screen instructions. You can leave most of the options as their defaults, by pressing the Return key and not typing anything after each question.

  • Ed/K/X/Ubuntu 7.04 (Feisty Fawn)
  1. Download the VMware Server Binary (.tar.gz) package for Linux from the VMware website. Also, register to receive the free serial number which is required for registration.
  2. Install the following packages:
  • vmware-server-kernel-modules
  • xinetd
  • build-essential
  • linux-headers
  1. Once you have installed the required packages, you can now begin the VMware installer. Open a Terminal and type the following:
cd <location>
tar zxvf VMware-server-<xxx>.tar.gz
cd vmware-server-distrib/
sudo ./vmware-install.pl

Replace <location> with the path of the directory where you saved the archive, and replace <xxx> with the version number of the package you downloaded. The VMware installer program will be started in the Terminal window. 1.#4 Follow the on-screen instructions. You can leave most of the options as their defaults, by pressing the Return key and not typing anything after each question. The configuration script will fail, but we'll use a workaround.

  1. Reconfigure step. Make VMware server use feisty's modules:
sudo sed -i -e "s/\/sbin\/insmod -s -f \"\/lib\/modules\/\`uname -r\`\/misc\/\$1.o\"/modprobe -s -f \$1/" /etc/init.d/vmware
sudo sed -i -e "s/sub configure_module {/sub configure_module {\n return 'yes';/" /usr/bin/vmware-config.pl
sudo vmware-config.pl
sudo /etc/init.d/vmware restart

Uninstalling Source Installs

VMware Server installs with the web management console

$ sudo vmware-uninstall-mui.pl

VMware Server installs from source may be removed by running the following command:

$ sudo vmware-uninstall.pl

If you experience problems during the uninstall, remove ~/.vmware and retry the steps above. You may also wish to remove your virtual machines by removing /var/lib/vmware. It is also recommended that you remove

Transitioning from a Source Install

  1. Follow the directions in the "Uninstalling Source Installs" section of this document, but do not remove the /var/lib/vmware directory.
  2. Follow the directions in the "Installation and Quick Start" section.
  3. Move files from /var/lib/vmware to /var/lib/vmware-server and then remove the empty /var/lib/vmware directory.
  4. Reregister your existing virtual machines by running vmware-cmd -s register /var/lib/vmware-server/Virtual\ Machines/machinename/diskname.vmx
  5. Start any needed virtual machines using the management console. It is best to do this from the console instead of restarting because it will detect that you have moved the virtual machines and offer to regenerate the machine's unique identifiers, which you should decline to do.

VMware Server MUI Component Installation (Optional, Source Install Only)

If you would like VMware ESX-style web-access for configuration of your server, you can install the VMware MUI component, available from the VMware website. After having downloaded the package, open a Terminal and run the following commands:

cd <location>
tar zxvf VMware-mui-<xxx>.tar.gz
sudo ./vmware-install.pl

Replace <location> with the path of the directory where you saved the archive, and replace <xxx> with the version number of the package you downloaded. An installer program will be run. Follow the installer's instructions. Once installation has completed, run the following commands in a Terminal:

sudo /etc/init.d/httpd.vmware start
sudo /etc/init.d/httpd.vmware restart
sudo /etc/init.d/httpd.vmware status

The VMware MUI component should now be available at

http://localhost:8222/

which should automatically redirect you to

https://localhost:8333/

Next from the same or a separate client machine login to this page and chose the most appropriate install program from the selection labeled : Download VMware Server Console Use Synaptic/Adept to remove the package. Note: If you receive a "starting httpd.vmware:-ne failed" error at the end of running vmware-config-mui.pl you will need to run the following command. /bin/sh is a symlink to /bin/dash, however we need /bin/bash, not /bin/dash. Therefore we do this, and then run vmware-config-mui.pl again:

sudo ln -s -f /bin/bash /bin/sh
sudo vmware-config-mui.pl

VMware Server Console Installation (Optional, Source Install Only)

By default, the VMware Server Console is installed on the same computer as VMware Server. However, it is possible to install the application on other computers and use it to access your VMware Server remotely. Installers are available for other operating systems, such as Windows. If installing the console on Ubuntu, open a Terminal and type the following commands:

cd <location>
tar zxvf VMware-server-console-<xxx>.tar.gz
cd vmware-server-console-distrib/
sudo ./vmware-install.pl

Replace <location> with the path of the directory where you saved the archive, and replace <xxx> with the version number of the package you downloaded. After having run the installer, press Alt + F2, type gksudo vmware and press Run to start the Server Console application.

Running Other Operating Systems From Physical Partitions (Optional)

  1. To run regular virtual machines from files, no additional setup is needed. However, to be able to run operating systems from physical partitions, your user needs to be part of the disk group.
  2. Never use this mode unless you have a boot loader such as GRUB installed. Reloading the currently running Ubuntu system from VMware will likely corrupt your partition, so always load different Operating Systems from VMWare.

Additional explanations

Troubleshooting

  • Error: When I try to install VMware Server, I get the following error message:
    A previous installation of a VMware product has been detected.
    If you installed it from the VMware website, please remove it by running vmware-uninstall.pl before proceeding.
    If it was installed through Ubuntu, you must purge (completely remove) the old package.
   

Solution: First of all, unsure that you "Completely Removed" vmware-player/vmware-server and all its modules. To unsure that, run the following command:

    sudo aptitude purge vmware-server vmware-player vmware-tools-kernel-modules
   

If you still keep getting the above error, run the following command:

    sudo rm -r /etc/vmware*
   

Source: [2]

  • Error: If you do not have an eth0 interface, you might be affected by bug #112492
  • Error: When I try to connect with the VMware Server Console, I get the following error message:
    Connection refused.
   

Solution: VMware should be listening on port 902. To test the connection, use telnet:

       telnet <ip-of-vmware-server> 902
      

You should see something like the following:

       220 VMware Authentication Daemon Version 1.10: SSL Required, MKSDisplayProtocol:VNC
      

If not, you might need to (re)install xinetd. Do this with:

       aptitude install xinetd
      

or (if it's already installed)

       aptitude reinstall xinetd
      

Then you can run vmware-config-network.pl or reinstall the vmware-server package to kick things into place.

  • Error: When I try to start a VM, I get the following error message:
    Unable to connect to the MKS: You need execute access in order to connect with the VMware Server Console. Access denied for config file: /path/to/config/file.vmx.
   

Solution: The .vmx file needs to be executable. Make sure that you have permissions to create the file and to make it executable. The filesystem that the file resides on must not be mounted with the noexec flag.

Additional Resources