VMware Server 2.0.2-x在具有VMware远程控制台插件的Ubuntu Server 10.04上

VMware Server 2.0.2-x在具有VMware远程控制台插件的Ubuntu Server 10.04上

今天我将告诉您如何设置运行VMware Server 2.0.2-x和VMware远程控制台插件的新的Ubuntu 10.04服务器。

我的盒子

CPU:Intel(R)Celeron(R)D CPU 3.06GHz,1核
内存:2GB
光盘

Firefox 3.6无法运行VMware远程控制台。 在客户端,我使用Chrome构建虚拟机,然后我使用VMware远程控制台插件来运行它们。

我们有四个步骤:

第一步:设置一个运行Ubuntu服务器的新框。
第二步:注册,下载,修补和安装VMware。
第三步:创建虚拟机。
第四步:使用VMware远程控制台插件从客户端控制远程虚拟机。

第一步:设置一个运行Ubuntu服务器的新框

好简单。 如果你不知道,看看: http : //www.youcl.com/perfect-server-ubuntu-10.04-lucid-lynx-ispconfig-3

安装完成后,重新启动该框。

登录并激活根帐户:

sudo passwd root

输入root的密码,我选择: 111111

注销然后以root身份登录,然后我们以root身份执行所有操作。

升级框:

apt-get update
apt-get upgrade -y

安装gcc:

apt-get install -y gcc

配置静态IP地址(我在这里使用192.168.1.75 ):

nano /etc/network/interfaces

删除所有内容并替换为:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback
   
# The primary network interface
auto eth0
iface eth0 inet static
   address 192.168.1.75
   netmask 255.255.255.0
   network 192.168.1.0
   broadcast 192.168.1.255
   gateway 192.168.1.1

编辑/etc/resolv.conf

nano /etc/resolv.conf

删除所有内容并替换(请确保使用有效的Nameservers;在本示例中,我使用192.168.1.1,我的路由器,也运行Nameservers):

nameserver 192.168.1.1

重新启动框:

reboot

第二步:注册,下载,修补,安装VMware

以root身份登录并创建/ root / vm

mkdir /root/vm
cd /root/vm

要下载VMware,您必须在https://www.vmware.com/tryvmware/?p=server20&lp=1注册。 他们会给你发一封电子邮件。 按照电子邮件中的说明进行操作,并在/ root / vm中下载并保存VMware-server-2.0.2-203138.i386.tar.gz ,并记得记下VMware Server for Linux的密钥(如: XXXXX-XXXXX -XXXXX-XXXXX )。

解除VMware文件:

tar -xzf VMware-server-2.0.2-203138.i386.tar.gz

在我们安装VMware之前,我们必须修补VMware:

mkdir /root/dev
cd /root/dev

下载五个文件:

wget http://nerdbynature.de/bits/2.6.32-22/00-vmware-2.6.32_functional.diff.txt
wget http://nerdbynature.de/bits/2.6.32-22/02-vmnet-include.diff.txt.gz
wget http://nerdbynature.de/bits/2.6.32-22/01-vmware-2.6.32_cosmetic.diff.txt
wget http://nerdbynature.de/bits/2.6.32-22/vmware-config.pl.diff.txt
wget http://nerdbynature.de/bits/2.6.32-22/patch-vmware_2.6.3x.sh.txt

解压缩以下文件:

gunzip 02-vmnet-include.diff.txt.gz

更改五个文件的名称:

mv 00-vmware-2.6.32_functional.diff.txt 00-vmware-2.6.32_functional.diff
mv 01-vmware-2.6.32_cosmetic.diff.txt 01-vmware-2.6.32_cosmetic.diff
mv 02-vmnet-include.diff.txt 02-vmnet-include.diff
mv patch-vmware_2.6.3x.sh.txt patch-vmware_2.6.3x.sh
mv vmware-config.pl.diff.txt vmware-config.pl.diff

编辑文件patch-vmware_2.6.3x.sh

nano patch-vmware_2.6.3x.sh

删除所有内容并替换为:

#!/bin/sh
#
# (C) 2010 lists@nerdbynature.de
#
# 00-vmware-2.6.32_functional.diff
# - based on vmware-server-modules-linux-2.6.32.patch
# - see http://communities.vmware.com/message/1389232#1389232
#
# 01-vmware-2.6.32_cosmetic.diff
# - based on rbihlmeyer's comments in http://communities.vmware.com/thread/232842
#
# 02-vmnet-include.diff
# - stuff .h and .c files in separate directories, as the other
# modules do it
#
# vmware-config.pl.diff
# - based on http://communities.vmware.com/message/1398525#1398525
#
DIR=/root/dev/
PATCHES="00-vmware-2.6.32_functional.diff 01-vmware-2.6.32_cosmetic.diff 02-vmnet-include.diff"

# unset me!
# DEBUG=echo

if [ -z "$1" -o ! "`ls "$1"/*tar 2>/dev/null | wc -l`" = 4 ]; then
echo "Usage: `basename $0` [vmware-modules-source directory]"
exit 1
else
SRC="$1"
fi

cd $SRC
$DEBUG mkdir orig || exit 1
$DEBUG mv *tar orig/

# untar
for t in orig/*.tar; do
$DEBUG tar -xf $t
done

# patch
for p in $PATCHES; do
$DEBUG patch -p1 < "$DIR"/"$p"
done

# tar
for d in *-only; do
$DEBUG tar -cf `echo $d | sed 's/-only/.tar/'` $d
done
$DEBUG rm -rf *-only

# vsock.ko needs symbols from vmci
$DEBUG cd ../../../bin || exit 2
if [ -x vmware-config.pl -a -f $DIR/vmware-config.pl.diff ]; then
$DEBUG patch -p0 < $DIR/vmware-config.pl.diff
fi

保存文件并退出。

补丁:

chmod u+x patch-vmware_2.6.3x.sh
./patch-vmware_2.6.3x.sh /root/vm/vmware-server-distrib/lib/modules/source

安装VMware:

cd /root/vm/vmware-server-distrib
./vmware-install.pl

您可以按ENTER键接受所有默认值。 接受执照 输入VMware给您的VMware Server密钥。 而已。 如果安装成功,结束如下:

The installation of VMware VIX API 1.6.2 build-203138 for Linux completed 
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall-vix.pl".
Enjoy,
--the VMware team
Starting VMware services:
Virtual machine monitor done
Virtual machine communication interface done
VM communication interface socket family: done
Virtual ethernet done
Bridged networking on /dev/vmnet0 done
Host-only networking on /dev/vmnet1 (background) done
DHCP server on /dev/vmnet1 done
Host-only networking on /dev/vmnet8 (background) done
DHCP server on /dev/vmnet8 done
NAT service on /dev/vmnet8 done
VMware Server Authentication Daemon (background) done
Shared Memory Available done
Starting VMware management services:
VMware Server Host Agent (background) done
VMware Virtual Infrastructure Web Access
Starting VMware autostart virtual machines:
Virtual machines done
The configuration of VMware Server 2.0.2 build-203138 for Linux for this 
running kernel completed successfully.
Housekeeping...
Thank you for using the script!
Patch provided by:
Ramon de Carvalho Valle
http://risesecurity.org
Script author:
Radu Cotescu
http://radu.cotescu.com

重新启动框:

reboot
赞(52) 打赏
未经允许不得转载:优客志 » 系统运维
分享到:

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏