5月 10th, 2010

解决VMware中的linux系统无法满屏

剑走偏锋, by 郭 涛. 分享到: 分享到豆瓣网 分享到QQ空间 分享到朋友社区

在VM虚拟机中为什么linux不能满屏

问题描述:在VMWARE6.5.1中定制安装了RHEL 5,发现显示器的分辨率只有800X600和640X480两种选项,在1280X960的宿主机上不能满屏。

原因一:Setting中限制了Display Device,(好像一般定制安装时,就会出现分辨率问题,即使设置了Display Device的分辨率为800X600以上值)。

修改VM的Setting选项中的Display可以设置虚拟机的分辨率最大取值,或者自动配合宿主机的显示器的屏幕分辨率。
解决办法(步骤a):修改虚拟机的启动文件*.vmx

linux下的*.vmx参考位置:/var/lib/vmware-server/Virtual Machines/your VM name/your VM name.vmx,在最末增加/修改两行:
svga.maxWidth = “1280”
svga.maxHeight = “800”

或者设置成自动检测,就是点选“Use host setting for monitors”,对应的设置为svga.autodetect = “FALSE”
这些配置更改在虚拟机的Setting配置页面直接选择Display -> Monitors下的按钮即可实现。

这招是限制虚拟机的最大分辨率,但是虚拟机本身可能还不知道可以设置的分辨率能这么大(自动检测Monitor的错???)。
这就是原因二

解决办法(步骤b):修改/etc/X11/xorg.conf,增加monitor部分,这样就行了。增加方法见下面的Step 2: Edit /etc/X11/xorg.conf

备注:更改monitor之后,注销再登录,发现xorg.conf自动修正,变得更完美了!
理解了这两个原因,就可以改变虚拟机的分辨率了。

总而言之:遇到这样的分辨率问题,先添加xorg.conf的monitor部分、修改Screen部分;再设置Display -> Monitors为“Use host setting for monitors”注销登录即可。注意:步骤a、b都完,解决以上两个问题成才行哦。

HowTo: Change VMWare Player Guest OS Display Resolution
June 20th, 2007 admin Leave a comment Go to comments

Here is one useful bit for anyone running, or thinking of running, a local test/development environment under VMWare Player version 2.0 with a guest OS Linux install.

I’ll assume you have installed VMWare Player and a VMWare Appliance similar to CentOS v5. After which, by default, the resolution will be limited to modes “800×600″ and “640×480″.

Here is how you fix that problem…

Step 1: Install X and GNOME, if not already present.
yum groupinstall “X Window System” “GNOME Desktop Environment”
[Note: to install KDE, substitute the “GNOME…” string with “KDE (K Desktop Environment)”]

Step 2: Edit /etc/X11/xorg.conf

You should already have…

Section “Device”
Identifier “Videocard0”
Driver “vmware”
EndSection

Add the following “monitor” section…

Section “Monitor”
Identifier “Monitor0”
HorizSync 1.0 – 10000.0
VertRefresh 1.0 – 10000.0
EndSection

Modify the existing “Screen” section…
Note to replace the following “1600×1200″ string with the highest resolution your monitor can handle.

Section “Screen”
Identifier “Screen0”
Device “Videocard0”
Monitor “Monitor0”
DefaultDepth 24
SubSection “Display”
Viewport 0 0
Depth 24
Modes “1600×1200” “800×600” “640×480”
EndSubSection
EndSection

Step 3: Start X
startx

以上参考了国内和国外两位仁兄的帖子。经过本人亲测成功,有兴趣的不妨试试哈,就不必再对着那小小的一块而无“施展”的空间啦。当然,貌似有说装了vmtool 也可以解决分辨率的问题,不过VMware中vmtool for linux 安装的难度挺大,我是没成功的啦,有成功安装的也欢迎来介绍介绍自己的方法哈。

本文作者:

前端开发工程师一枚, 欢迎在微博上关注我~ weibo.com/Kainy 。

Back Top

回复自“解决VMware中的linux系统无法满屏”

  1. 没有任何评论。
  1. 没有任何引用。

发表回复

Back Top

注意: 评论者允许使用'@user空格'的方式将自己的评论通知另外评论者。例如, ABC是本文的评论者之一,则使用'@ABC '(不包括单引号)将会自动将您的评论发送给ABC。使用'@all ',将会将评论发送给之前所有其它评论者。请务必注意user必须和评论者名相匹配(大小写一致)。

全站导航 文章(RSS) 后台管理

使用腾讯微博登陆

使用新浪微博登陆