最新消息:备用域名:https://yeeach.me

Vmware使用几则技巧

技术 admin 3073浏览 0评论

   为了平常测试系统部署使用方便,在笔记本IBM T42上使用vmware 6安装了Redhat Enterprise Linux 5 作为服务器,记录一下使用过程中遇见的一些问题。

1、“cannot find a valid peer process to connect to”错误解决

使用vmware后由于关闭速度较慢,没有正常进行关闭操作,直接用process explorer杀掉vmware进程,重新启动虚拟机时候报错,提示的是信息如下:

vmware1

点击“OK”确定之后报错:
cannot find a valid peer process to connect to

解决方法如下:

1、用process explorer杀掉vmware-vmx.exe进程(如果有的话)

2、清除虚拟机目录下的.lck文件

3、在dos命令行下执行net start vmx86,以启动peer process

 

2、VMware Tools问题

  在vmware下安装完了后默认的分辨率选项只有800×600与640×480,在linux的"显示设置"里怎么修改显卡及分辨率后重新启动或注销都没有变化,要想改变linux的分辨率,必须安装VMware Tools;另外安装VMware Tools后提供了增强Guest OS的显示和鼠标功能,可以在虚拟机和主机之间流畅使用鼠标,不用通过CTRL+ALT切换

具体过程如下:

  1. 启动虚拟机
  2. 安装VMware tools

    按照正常的方法安装VMware tools:VM -> Install VMware Tools。但是在点击Install VMware Tools后安装后一段时间,没有任何反映,菜单项始终是“Cancel VMware Tools Install”,在tmp下也没有vmware-linux-tools.tar.gz。

    实际上vmware-linux-tools.tar.gz保存在“VMware的安装目录\VMware Workstation\linux.iso”中,因此可以手工把vmware-linux-tools.tar.gz通过ssh或ftp上传到到Linux中安装即可。

也可以通过VMware 中mount cdrom的方法进行安装,步骤如下

  • 在VMWARE菜单项VM ->Settings->CD-ROM(IDE 1:0),指定“Use ISO image”,路径指向“VMware的安装目录\VMware Workstation\linux.iso”,如下图所示

                                      vmware-tools

  • init 3,切换到runlevel 3
  • mount -t iso9660 /dev/cdrom /mnt
  • cd /mnt;ls /mnt 可以看到下面有如下两个文件

    VMwareTools-6.0.0-45731.i386.rpm  VMwareTools-6.0.0-45731.tar.gz

  • 安装VMwareTools

    采用rpm包安装:

        rpm -ivh VMwareTools-6.0.0-45731.i386.rpm

        vmware-config-tools.pl

        一路回车,完成后出现分辨率列表供选择

    或者采用tar包安装:

       cp VMwareTools-6.0.0-45731.tar.gz /tmp;

       tar zxvf VMwareTools-6.0.0-45731.tar.gz;

       cd VMwareTools-6.0.0-45731.tar.gz;

       ./vmware-install.pl

  • umount /dev/cdrom
  • init 5

   安装完成后,如有问题,可以通过执行/usr/bin/vmware-config-tools.pl 来运行vmware tools,重新配置vmware tool及设定系统分辨率等。

运行vmware tools后,X11的配置文件/etc/X11/xorg.conf内容为:

# Xorg configuration created by system-config-display

Section "ServerLayout"
        Identifier     "single head configuration"
        Screen      0  "Screen0" 0 0
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice     "XWorkAround"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option      "XkbModel" "pc105"
        Option      "XkbLayout" "us"
EndSection


Section "Device"
    Identifier  "VMware SVGA"
    Driver      "vmware"
EndSection

Section "Screen"
        Identifier "Screen0"
    Device      "VMware SVGA"
    Monitor     "vmware"
    # Don't specify DefaultColorDepth unless you know what you're
    # doing. It will override the driver's preferences which can
    # cause the X server not to run if the host doesn't support the
    # depth.
    Subsection "Display"
        # VGA mode: better left untouched
        Depth       4
        Modes       "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       8
        Modes       "1024x768"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       15
        Modes       "1024x768"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes       "1024x768"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       24
        Modes       "1024x768"
        ViewPort    0 0
    EndSubsection
EndSection

Section "Monitor"
    Identifier      "vmware"
    VendorName      "VMware, Inc"
    HorizSync       1-10000
    VertRefresh     1-10000
EndSection

Section "InputDevice"
        Identifier  "XWorkAround"
        Driver      "void"
EndSection

3、Bridge模式下vmnet0问题

采用VMWare安装Rehat AS 5时候,采用Bridge模式,启动时候报错:

The network bridge on device VMnet0 is not running. The virtual machine will not be able to communicate with the host or with other machines on your network. Virtual device Ethernet0 will start disconnected

原因是在宿主机的本地连接里少了:VMware Bridge Protocol,在正常安装后会在本地网卡的连接属性里有这一项的。

解决方法如下:

1、禁用vmnet1(host-only模式)和vmnet8(nat模式)网卡

2、在服务中禁用VMware NAT Service

3、安装VMware Bridge Protocol

控制面板->网络连接->本地连接->属性->安装->(选中服务)添加->从磁盘安装->浏览->

VMware安装路径\VMware Workstation目录下选 netbridge.inf

然后重装电脑。

4、VMware Tools在xeno服务器安装问题

在DELL Powerdege 1900 服务器(xeon Processor)上安装的虚拟机,运行/usr/bin/vmware-config-tools.pl时候报错:

[root@linux-server-v1 ~]# vmware-config-tools.pl

It looks like you are trying to run this program in a remote session. This

program will temporarily shut down your network connection, so you should only

run it from a local console session. Are you SURE you want to continue?

[no] yes

Stopping VMware Tools services in the virtual machine:

   Guest operating system daemon:                          [  OK  ]

Trying to find a suitable vmmemctl module for your running kernel.

None of the pre-built vmmemctl modules for VMware Tools is suitable for your

running kernel.  Do you want this program to try to build the vmmemctl 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.

找不到kernel的header文件,主要原因是没有安装kernel-xen-devel-2.6.18-8.el5,解决方案

确认安装了如下几个包,如果没有安装,从安装盘上拷贝安装上:

kernel-xen-2.6.18-8.el5

kernel-devel-2.6.18-8.el5

kernel-headers-2.6.18-8.el5

kernel-xen-devel-2.6.18-8.el5


 

转载请注明:出家如初,成佛有余 » Vmware使用几则技巧

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (0)

  1. 谢谢,解决了我遇到的问题!
    wuxyu15年前 (2009-03-24)回复
  2. ths
    d15年前 (2009-04-22)回复
  3. 非常感谢,高手指点,解决了我的问题
    Jacky13年前 (2011-02-12)回复