admin管理员组

文章数量:1631559

2023年12月26日发(作者:)

Linux上安装VMware Workstation 6实战

以前经常在Windows上安装虚拟机(VMware Workstation),各种版本都安装过。使用感触很多,VMware Workstation我还是多用于软件测试、服务配置等。这回我想在Linux上安装虚拟机,真正回到Linux的怀抱。

S1:注册30天免费账号

要知道,WMware for Linux虽然基于免费的Linux核心平台,但是还是要收费的。所以我们先到其官方注册网站:/vmwarestore/serial_

注册一个账号,然后在你指定的邮箱里激活此账号——得到一个可用30天的序列号。

有以下几个免费的适用版本:

Workstation for Linux 32-bit

Version 6.5.0 | 118166 - 09/23/08 379 MB RPM

Workstation for Linux 32-bit

Version 6.5.0 | 118166 - 09/23/08 381 MB BUNDLE

Workstation for Linux 64-bit

Version 6.5.0 | 118166 - 09/23/08 348 MB RPM

Workstation for Linux 64-bit

Version 6.5.0 | 118166 - 09/23/08 349 MB BUNDLE

下载相应的版本即可。

S2:基于Linux平台安装VMware Workstation 6(RPM)

#rpm -ivh

#rpm -qpl

/usr/bin

„„„„„„„„„„

#cd /usr/bin

#./

这样一步步地回车即可。

【注意】中间要是提示找不到**文件的路径而不能进行编译,那一定是你还没有安装gcc编译器,安装上以后,才能正确安装VMware。

S3:安装完毕

运行软件在“帮助”/“输入序列号”一栏输入你从官网上得到的免费试用序列号,确定即可使用。

最后我想说的是,这个VMware Workstation对于菜鸟甚至是进阶高手来说都是很重要的,因为在现在的状况来看,完全脱离Windows的怀抱是幼稚的——N多在Windows上的优秀软件你能忍心一下子就抛弃了?所以VMware就是你学习Linux的良师益友了。有必要运行Windows软件可以完全跑在虚拟机上,平时练习就徜徉在Linux的海洋,多么惬意!

【附】【VMWARE序列号大全】(VMware Workstation for Linux)

VMware for Windows

ZHDH1-UR90N-W844G-4PTN6

G1NP0-T88AL-M016F-4P8N2

for Linux

ZC14J-4U16A-0A04G-4MEZP

J1WF8-58LDE-881DG-4M8Q3

VMware Workstation For Windows

LUXRM-WP0DN-A256U-4M9Q3

DJXDR-NDT27-Y2NDU-4YTZK

VMware Workstation for Linux

DA925-HP80U-Z8HDC-4WXXP

3KW2W-AYR2C-88M6F-4MDQ2

VMware Workstation for Windows

YJEKW-JMFF4-YA1DC-4WTQP

VMware Workstation for Linux

LR5HT-16602-T814A-4MEN2

THWW8-HRZAH-A24FA-4YTN3

/vmware server

s

98XY4-54VA4-4216V-4PDZ6

WH0M5-XW50J-WA4FU-4MTZ3

/vmware server

N218N-NR66R-F0JDF-4P9NP

H2W8H-X82DC-J8N6G-4M9Q6

VMWare ESX Server 2.x

0VHD0-0P86V-0C0AH-4018N

SMP 0KR08-02CAH-0DJ2H-48124

02M8R-0HA2N-0CK8M-42JAN

SMP 0AMDE-0UWFP-0E601-42J84

VMware Ace

admin:8H18E-8U505-HA14Z-4P8QL

for Linux

RCT0X-XHN8U-H20FY-4W9ZP

player:WC94X-3H90R-K05DU-4MTN3

DHHF8-K0P6P-Z25DY-4YENK

workstation:TKN8T-1UD2Q-70N4C-4YXXQ

AJMMN-3YUDP-8ANFG-4WWX2

VMware VirtualCenterV1.2.0

VC 1.x管理GSX的SN

QU9HW-NM5FT-VAJ4G-5W9N3

VHM05-U0Q27-E0HFA-5WRXL

virtualcenter 1.x 最全和最强的license

virtualcenter : 921H4-7WR4V-T2NDC-5YDZK

vmotion : 8VN44-Q8PD9-P0NFY-5PWZL

esx: XL584-9PH2Z-02H4C-5P9XL

gsx: EH8M0-5RP8Y-M804F-5MRN3

L80ME-56Q6F-U8M4F-5WEQQ

4KE0R-0A04Q-H05DZ-5WEZL

Linux操作系统文本模式下安装VMware虚拟机

Linux下有很多种虚拟机软件,但是在Windows习惯了用VMware,操作比较简单,于是在linux下不妨也用用看,于是到VMware的官网()上下来一个最新的(vmwar for linux),通过几步简单的表单填写就可以申请个免费的注册码,本地解压后执行里面的脚本基本一路按默认回车下去即可,安装完毕需要给虚拟机的安装目录可读写权限,默认位置是/var/lib/vmware/,接下来就是涉及到具体操作了。

最简单的方法是下载一个相同版本的windows版本,然后从windows下远程链接过去就和本机操作一样了,本人由于是在美国的服务器上安装,只好在本地windows下先安装好(虚拟机安装好的系统文件在windows下与linux通用),然后将文件打包上传,然后用命令:vmware-cmd -s regeister /var/lib/vmware/Virtual Machines/CentOS X86/Red Hat

Enterprise Linux 先注册,再用vmware-cmd /var/lib/vmware/Virtual Machines/CentOS

X86/Red Hat Enterprise Linux start 启动。这里本人遇到个问题,我们美国服务器是64位的机子,第一次上传本地安装好的64位系统居然启动不了,报错不支持64位,于是再上传个32位的即可,具体原因还不祥。这样虚拟机起来后就和真实机一样使用了!

相关参考:

Linux下安装VMware-gsx-3.2.1

来自:/

# tar -zxvf

2.进入安装目录

# cd vmware-gsx-distrib

3.执行安装程序

./

4.安装过程

安装过程中需要输入序列号

Serial: X8TA5-HDWDD-V7H4D-4FUGQ

安装过程比较简单,可以一路回车

一直到最后安装完毕

5。在其他机器上启动VMware virtual machine console

选择remote host

host name: 192.168.1.20

user anme: root

password: password

连接以后,可以按照windows上使用vmware的方法来创建和使用虚拟机

6。创建完windows虚拟机并安装好操作系统后,可以用

菜单VM > install 来安装显卡驱动

7。vmware的启动关闭可以用一下命令

# service vmware start

# service vmware stop

8.启动虚拟机用以下命令

启动虚拟机

vmware-cmd /var/lib/vmware/Virtual Machines/Windows2003/ start

关闭虚拟机

vmware-cmd /var/lib/vmware/Virtual Machines/Windows2003/ stop

=====================

vmware 命令

vmnet-bridge vmstat vmware-smbd

vmnet-dhcpd vm-support vmware-loop vmware-smbpasswd

vmnet-natd vmware

vmnet-netifup vmware-authtrusted vmware-nmbd

vmnet-sniffer vmware-cmd vmware-ping vmware-vdiskmanager

列出虚拟机

vmware-cmd -l

启动虚拟机

vmware-cmd /var/lib/vmware/Virtual Machines/Windows2003/ start

关闭虚拟机

vmware-cmd /var/lib/vmware/Virtual Machines/Windows2003/ stop

vmware-cmd 命令

[ORACLE@test vmware]$ vmware-cmd -h

Usage: /usr/bin/vmware-cmd

/usr/bin/vmware-cmd -s

Options:

Connection Options:

-H specifies an alternative host (if set, -U and -P must als o be set)

-O

specifies an alternative port

-U specifies a user

-P

specifies a password

General Options:

-h More detailed help.

-q Quiet. Minimal output

-v Verbose.

Server Operations:

/usr/bin/vmware-cmd -l

-- lists the registered VMs

/usr/bin/vmware-cmd -s register

-- registers a VM

/usr/bin/vmware-cmd -s unregister

-- unregisters a VM

/usr/bin/vmware-cmd -s getresource

-- retrieves a server resource

/usr/bin/vmware-cmd -s setresource

-- sets a server resource

VM Operations:

/usr/bin/vmware-cmd getconnectedusers

/usr/bin/vmware-cmd getstate

-- gets the execution state of the VM

/usr/bin/vmware-cmd start

-- powers on or resumes a VM

/usr/bin/vmware-cmd stop

-- stops a VM

/usr/bin/vmware-cmd reset

-- resets a VM

/usr/bin/vmware-cmd suspend

-- suspends a VM

/usr/bin/vmware-cmd setconfig

-- sets a configuration variable

/usr/bin/vmware-cmd getconfig

-- retrieves the value for a configuration variable

/usr/bin/vmware-cmd setguestinfo

-- sets a guest info variable

/usr/bin/vmware-cmd getguestinfo

-- retrieves the value for a guest info variable

/usr/bin/vmware-cmd getid

-- retrieves the VM id

/usr/bin/vmware-cmd getpid

-- retrieves the process id of the running VM

/usr/bin/vmware-cmd getproductinfo

-- gets various product information

/usr/bin/vmware-cmd connectdevice

-- connects a virtual device to a VM

/usr/bin/vmware-cmd diSCOnnectdevice

-- disconnects a virtual device from a VM

/usr/bin/vmware-cmd getconfigfile

-- retrieves the path to the configuration file

/usr/bin/vmware-cmd getheartbeat

-- retrieves the heartbeat value of the guest OS

/usr/bin/vmware-cmd getuptime

-- retrieves the uptime of the guest OS

/usr/bin/vmware-cmd getremoteconnections

-- retrieves the number of remote connections to a VM

/usr/bin/vmware-cmd gettoolslastactive

-- retrieves the number of seconds since last notification from the tools

/usr/bin/vmware-cmd getresource

-- retrieves a VM resource

/usr/bin/vmware-cmd setresource

-- sets a VM resource

/usr/bin/vmware-cmd setrunasuser

-- sets the user that the VM runs as

/usr/bin/vmware-cmd getrunasuser

-- retrieves the user that the VM runs as

/usr/bin/vmware-cmd getcapabilities

-- retrieves the access permissions of the current user on a VM

/usr/bin/vmware-cmd addredo

-- adds a redo log to a virtual disk

/usr/bin/vmware-cmd commit

-- commits the redo log of a virtual disk

/usr/bin/vmware-cmd answer

-- answers a question for a VM requesting input

=====================

Linux下安装和卸载vmware tool

Installing VMware Tools in a Linux or Freebsd Virtual Machine

1. Power on the virtual machine.

2. After the guest operating system has started, prepare your virtual machine to install

VMware Tools.

Choose VM > Install VMware Tools.

The remaining steps take place inside the virtual machine.

3. Be sure the guest operating system is running in text mode. You cannot install VMware

Tools from a terminal in an X window session.

Some recent distributions of Linux are configured to run the X server when they boot and do

not provide an easy way to stop the X server. However, you can switch to a different workspace

that is still in text mode and install VMware Tools from that workspace.

To switch between Linux workspaces in a virtual machine, press Ctrl-Alt-Space, release

Space without releasing Ctrl and Alt, then press the function key for the workspace you want to

use — for example, F2.

Note: If you changed your hot-key combination to something other than Ctrl-Alt, use that

combination with Space and the function key.

4. As root (su -), mount the VMware Tools virtual CD-ROM image, change to a working

Directory (for example, /tmp), uncompress the installer, then unmount the CD-ROM image.

Note: You do not use an actual CD-ROM to install VMware Tools, nor do you need to

download the CD-ROM image or burn a physical CD-ROM of this image file. The GSX Server

software contains an ISO image that looks like a CD-ROM to your guest operating system. This

image contains all the files needed to install VMware Tools in your guest operating system.

Linux Guests: Some Linux distributions use different device names or organize the /dev

directory differently. If your CD-ROM drive is not /dev/cdrom or if the mount point for a

CD-ROM is not /mnt/cdrom, modify the following commands to reflect the conventions used by

your distribution.

Further, some Linux distributions automatically mount CD-ROMs. If your distribution uses

automounting, do not use the mount and umount commands below. You still must untar the

VMware Tools installer to /tmp.

mount /dev/cdrom /mnt/cdrom

cd /tmp

tar zxf /mnt/cdrom/

umount /mnt/cdrom

FreeBSD Guests: Some FreeBSD distributions automatically mount CD-ROMs. If your

distribution uses automounting, do not use the mount and umount commands below. You still

must untar the VMware Tools installer to /tmp.

mount /cdrom

cd /tmp

tar zxf /cdrom/

umount /cdrom

5. Run the VMware Tools installer.

cd vmware-tools-distrib

./

6. Answer the questions about default directories.

7. Run the configuration program.

8. To change your virtual machine's display resolution, answer yes, then enter the number

that corresponds to the desired resolution.

9. Log off of the root account.

exit

10. Start X and your graphical environment.

11. In an X terminal, launch the VMware Tools background application.

vmware-toolbox &

You can run VMware Tools as root or as a normal user. To shrink virtual disks, you must run

VMware Tools as root (su -).

Note: To get the greatest benefit from the features of VMware Tools, always run

vmware-toolbox in the guest operating system.

Uninstalling VMware Tools

If you need to remove VMware Tools from your Linux guest operating system, log on as root

(su -) and run the following command:

==========================

管理接口 management interface

需要下载

windows下运行

C:Program FilesVMwareVMware Management

linux下运行

The apache Server and the VMware Management Interface

On GSX Server for Linux hosts, an Apache server is installed with the management interface.

Listed here are the commands to start, stop and restart the Apache server.

In order to use these commands, you must first log on as root (su -), then open a terminal

session.

To start the Apache server, type

/etc/init.d/ start

To stop the Apache server, type

/etc/init.d/ stop

To restart the Apache server, type

/etc/init.d/ restart

VMware在Linux上安装时内核头文件的问题

VMware的作用不用介绍了,像 dorainm这种自己摆弄系统底层的,经常用 vmware弄个freeBSD、linux-2.4.x、linux-2.6.x之类的玩!

大家在安装vmware后,运行,经常会卡在内核头文件这里

None of the pre-built vmmon modules for VMware Workstation is

suitable for your running kernel. Do you want this program to try

to build the vmmon module for your system (you need to have a C

compiler installed on your system)? [yes]

Using compiler "/usr/bin/gcc". Use environment variable CC to

override.

What is the location of the directory of C header files that match

your running kernel? [/usr/src/linux/include]

The path "/usr/src/linux/include" is not an existing directory.

What is the location of the directory of C header files that match

your running kernel? [/usr/src/linux/include]

/root/sources/linux-2.6.22.2/include

The directory of kernel headers (version @@VMWARE@@ UTS_RELEASE)

does not match your running kernel (version 2.6.22.2). Even if the

module were to compile successfully, it would not load into the

running kernel.

What is the location of the directory of C header files that match

your running kernel? [/usr/src/linux/include]

可气吧!明明修改指向我自己编译用过了的linux内核文件夹了,但是提示还是错误(dorainm使用的内核是2.6.22.2)

The directory of kernel headers (version @@VMWARE@@ UTS_RELEASE)

does not match your running kernel (version 2.6.22.2). Even if the

module were to compile successfully, it would not load into the

running kernel.

打开 linux/version.h 一看,内容是

#define LINUX_VERSION_CODE 132630

#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

2.6.22内核 = 2<<16 + 6<<8 + 22 = 2*65536 + 6*256 + 22 =132630

为什么说版本不对阿?!难道版本算法不同?!(bc:谁在掐我的指头!)

再次看,vmware读取的版本,UTS_RELEASE!我们往 linux/version.h 里面添加一行:

#define UTS_RELEASE "2.6.22.2"

#define LINUX_VERSION_CODE 132630

#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

这次 vmware终于相信 dorainm提供给它的内核头文件的版本是匹配的。

dorainm现在使用的 linux系统是自己编译的,如果安装的是发行版本,应该有相关的安装内核头文件的方法,比如 redhat/fedora系列的 yum, debian/ubuntu系列的 apt等

如果没有,可以到 上下载对应的内核,然后:

make mrproper

make oldconfig

make

来编译内核头文件,再就按照文中的方法,让 vmware欢快得跑起来:)。

本文标签: 安装内核版本头文件免费