- 論壇徽章:
- 0
|
Vmware 4.5.2 中 Guest 系統(tǒng) X Windows 配置全攻略
最近在 Vmware 4.5.2 build-8848 下安裝測(cè)試了一系列的系統(tǒng)。 首先碰到令人的頭疼
的問題是 X windows 的配置。在 default 下,X 只有 640 x 480 的 ugly 顯示。
幸好 vmware 有一個(gè) vmware-tools 可以改善。 但 vmware-tools 顯然沒有及時(shí)更新,
面對(duì)眾多系統(tǒng)的 Xorg, vmware-tools 還在用 XFree86, 因此不能正常安裝。 另外
有些系統(tǒng)不在 vmware 的 support list 中,也給使用帶來不便。 因此大部分平臺(tái)
都要修改才能支持 1024 x 768 / 1280 x 1024, color depth 24 的顯示。
如果 google vmware, 會(huì)發(fā)現(xiàn)很多解決方法中會(huì)安裝 vmware patch:
( 當(dāng)前版本是 vmware-any-any-update89 in http://ftp.cvut.cz/vmware/)
但此 patch 對(duì)下面大部分平臺(tái)基本無效, 不建議安裝。(實(shí)際上也裝不了)
- 測(cè)試平臺(tái):
- Host system: Windows XP SP1, CPU Celeron 1.2G, Memory 384M
- Guest systems: Red Hat 9.0
- Mandrake 10.1
- Suse 9.2
- Fedora Core 3
- Debian 3.0r4
- Slackware 10.0
- Gentoo 2004.3
- MEPIS (Simply) 2004.06
- FreeBSD 5.3
- Solaris 10 GA
復(fù)制代碼
Part I. 準(zhǔn)備 vmware tools
Note: Solaris 10 及 Slackware 10.0 不需要 vmware tools.
- 1.1 Default run level
- Guest 系統(tǒng)安裝完成后, 將 Default run level 設(shè)為非 GUI 方式。
- # vi /etc/inittab
- id:3:initdefault:
- 1.2 點(diǎn)擊 vmware menu ->; VM ->; Install Vmware Tools
- 1.3 mount cdrom
- # mount /mnt/cdrom (Linux)
- # mount /cdrom (FreeBSD)
- 1.4 copy vmtools 到 /tmp
- # cd /tmp; tar zxvf /mnt/cdrom/*.gz (Linux)
- # cd /tmp; tar zxvf /cdrom/*.gz (FreeBSD)
- 1.5 備份 /etc/X11/XF86Config or /etc/X11/XF86Config-4
- 因?yàn)楹竺嫘薷?xorg.conf 中的 keyboard, mouse 配置會(huì)用到。
- # cp /etc/X11/XF86Config /etc/X11/XF86Config.sav
復(fù)制代碼
Part II. 配置 vmware tools
2.1 RedHat 9.0
- 2.1.1 X version
- XFree86 Version 4.3.0
- 2.1.2 Install vmware tools
- # vi /tmp/vmware-tools-distrib/bin/vmware-config-tools.pl
- 所有 default 回答. 因?yàn)?Redhat 9.0 的 X 為 XFree86, 安裝沒有問題。
復(fù)制代碼
2.2 Mandrake 10.1
- 2.2.1 X version
- Xorg Release 6.7
- 2.2.2 Install vmware tools
- # ln -s /usr/bin/lspcidrake /usr/bin/lspci
- # urpmi linux-2.6-2.6.8.1 (in disc#3)
- # vi /tmp/vmware-tools-distrib/bin/vmware-config-tools.pl
- 第2852行
- return xserver_bin() . '/XFree86';
- 改為
- return xserver_bin() . '/Xorg';
- 第3055行
- /X.org Foundation/ ? '4.4.0' : '0.0.0';
- 改為
- /Release 6.7/ ? '4.3.0' : '0.0.0';
- # /tmp/vmware-tools-distrib/bin/vmware-isntall.pl
- 所有 default 回答.
- 2.2.3 如果 不存在 /etc/X11/xorg.conf 則
- # ln -s /etc/X11/XF86Config /etc/X11/xorg.conf
復(fù)制代碼
2.3 Suse 9.2
- 2.3.1 X version
- Xorg Release 6.8.1
- 2.3.2 Install vmware tools
- # vi /tmp/vmware-tools-distrib/bin/vmware-config-tools.pl
- 第2852行
- return xserver_bin() . '/XFree86';
- 改為
- return xserver_bin() . '/Xorg';
- 第3055行
- /X.org Foundation/ ? '4.4.0' : '0.0.0';
- 改為
- /Release 6.8.1/ ? '4.3.0' : '0.0.0';
- # /tmp/vmware-tools-distrib/bin/vmware-isntall.pl
- 其中 compile a vmhgfs module? No
- 其它 default 回答。
- 2.3.3 如果 不存在 /etc/X11/xorg.conf 則
- # ln -s /etc/X11/XF86Config /etc/X11/xorg.conf
- 2.3.4 修改 /etc/X11/xorg.conf
- # vi /etc/X11/xorg.conf
- 將 keyboard section 改為:
- Section "InputDevice"
- Identifier "Keyboard"
- Driver "kbd"
- Option "XkbModel" "pc105"
- Option "XkbLayout" "us"
復(fù)制代碼
2.4 Fedora Core 3
- 2.4.1 X version
- Xorg Release 6.8.1
- 2.4.2 Install vmware tools
- # vi /tmp/vmware-tools-distrib/bin/vmware-config-tools.pl
- 第2852行
- return xserver_bin() . '/XFree86';
- 改為
- return xserver_bin() . '/Xorg';
- 第3055行
- /X.org Foundation/ ? '4.4.0' : '0.0.0';
- 改為
- /Release 6.8.1/ ? '4.3.0' : '0.0.0';
- 第3570行
- $line =~ s/%MOUSE_DRIVER%/vmmouse/g;
- 后面加一行, 變?yōu)椋?br />
- $line =~ s/%MOUSE_DRIVER%/vmmouse/g;
- $line =~ s-/dev/mouse-/dev/input/mice-;
- # /tmp/vmware-tools-distrib/bin/vmware-isntall.pl
- 其中 compile a vmhgfs module? No
- 其它 default 回答。
- # ln -s /etc/X11/XF86Config-4 /etc/X11/xorg.conf
- # vi /etc/X11/xorg.conf
- 將 keyboard section 變?yōu)?
- Section "InputDevice"
- Identifier "Keyboard"
- Driver "kbd"
- Option "XkbModel" "pc105"
- Option "XkbLayout" "us"
復(fù)制代碼
2.5 Debain 3.0r4
Note: Debain 3.0r4 必須用 kernel bf2.4 啟動(dòng), 否則不認(rèn)硬盤。
- 2.5.1 X version
- XFree86 Version 4.1.0.1
- 2.5.2 Install vmware tools
- # /tmp/vmware-tools-distrib/bin/vmware-isntall.pl
- 其中 compile a vmhgfs module? No
- 其它 default 回答。
- # vi /etc/X11/XF86Config-4
- 改變 mouse device
- Option "Device" "/dev/mouse"
- 為
- Option "Device" "/dev/psaux"
復(fù)制代碼
2.6 Slackware 10.0
Note: 1. 安裝時(shí)要 boot scsi.s
2. 要安裝 kernel scsi.s/bzImage
否則不認(rèn)硬盤。(Vmware default disk 為 scsi)
- 2.6.1 X version
- Xorg Release 6.7
- 不需要安裝 vmware tools
復(fù)制代碼
2.7 Gentoo 2004.3
Note: 建立 VM 時(shí)要?jiǎng)h除 default 的 SCSI 硬盤。 重新加入 IDE 硬盤。
否則 grub 無法正確啟動(dòng), 并報(bào)類似如下的錯(cuò)誤信息:
- cannot open root device "sda1" or 08:01
- Please append a correct "root=" boot option.
- Kernel panic: VFS: Unable to mount root fs on 08:01
復(fù)制代碼
- 2.7.1 X version
- Xorg Release 6.8
- 2.7.2 Install vmware tools
- # vi /tmp/vmware-tools-distrib/bin/vmware-config-tools.pl
- 第2852行
- return xserver_bin() . '/XFree86';
- 改為
- return xserver_bin() . '/Xorg';
- 第3055行
- /X.org Foundation/ ? '4.4.0' : '0.0.0';
- 改為
- /Release 6.8/ ? '4.3.0' : '0.0.0';
- # cd /etc
- # mkdir rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d
- # /tmp/vmware-tools-distrib/bin/vmware-isntall.pl
- 所有 default 回答.
- # ln -s /etc/X11/XF86Config-4 /etc/X11/xorg.conf
- # vi /etc/X11/xorg.conf
- 改變 keyboard section 為:
- Section "InputDevice"
- Identifier "Keyboard"
- Driver "kbd"
- Option "XkbModel" "pc105"
- Option "XkbLayout" "us"
- # rm -r /etc/rc[0-6].d
- # vi /etc/init.d/vmware
- #!/sbin/runscript
- depend() {
- after logger
- }
- start() {
- ebegin "Starting VMware tools (hack)"
- /etc/init.d/vmware-tools start
- eend $?
- }
- stop() {
- ebegin "Stopping VMware tools (hack)"
- /etc/init.d/vmware-tools stop
- eend $?
- }
- # chmod +x /etc/init.d/vmware
- # rc-update add vmware default
復(fù)制代碼
2.8 MEPIS (Simply) 2004.06
- 只是測(cè)試了做為 LiveCD 的 MEPIS, 1024 x 768 的分辯率, 工作的很好。
復(fù)制代碼
2.9 FreeBSD 5.3
- 2.9.1 X version
- Xorg Release 6.7
- 2.9.2 Install vmware tools
- # vi /tmp/vmware-tools-distrib/bin/vmware-config-tools.pl
- 第2852行
- return xserver_bin() . '/XFree86';
- 改為
- return xserver_bin() . '/Xorg';
- 第3055行
- /X.org Foundation/ ? '4.4.0' : '0.0.0';
- 改為
- /Release 6.7/ ? '4.3.0' : '0.0.0';
- # /tmp/vmware-tools-distrib/bin/vmware-isntall.pl
- 所有 default 回答.
- # ln -s /etc/X11/XF86Config-4 /etc/X11/xorg.conf
復(fù)制代碼
2.10 Solaris 10 GA
Solaris 10 不需要 vmware tools. 只需運(yùn)行 xorgconfig 配置。
- # /usr/X11R6/bin/xorgconfig
- mouse protocal type: 5 PS/2
- Emulate3Buttons: y
- Mouse device: return
- Keyobard: 7 Generic 104-key PC
- XKB: n (y 也可)
- monitor type : 4 Super VGA 1024x768
- vertical sync range: 3 50-100
- card database: y, 0 Generic VESA compatible
- Note: 按說這里應(yīng)該選拔 29 vmware. 但至少在我測(cè)試的平臺(tái)上不行, strange ?
- video memory: 6 8192k
- color depth: 5 24bits (16 million colors)
復(fù)制代碼
Part III. Window Manager
現(xiàn)在可以啟動(dòng) X 了。
- # startx (啟動(dòng) default 的 Window 系統(tǒng), 一般為 kde 或 twm)
- 或 kde:
- # echo startkde >; ~/.xinitrc
- # startx
- 或 gnome:
- # exec gnome-session >; ~/.xinitrc
- # startx
- Note: 1. Logout 出 X Windows 后, 有些系統(tǒng)不能正常退出到 text 界面, 亂屏。
- 2. 用 init 0 后, 有些系統(tǒng)并不 power off, 必須點(diǎn)按 vmware 的
- Power off button.
復(fù)制代碼
|
|