VMWare 服务器

维持 VMware 客端操作系统内的时间

一个已知的问题与内核计时器所设置的频律有关。2.6 版本的内核每秒发出 1000 个时钟的中断要求,令虚拟机器难以跟上(详情见这个错误报告)。为了补救这个问题,CentOS 过往提供时钟速率设置为 100 赫的内核。

CentOS 亦提供预先创建及更新了的 vmware 映像。详情见这个 CentOS 错误报告及在CentOS 开发者网站下载 vmware 映像。

由 CentOS 5.2 开始,内核提供了一个名叫 "divider=" 的新参数。你可以在内核参数中加入 divider=10 来将计时器的频律设为 10 赫。很不幸地,在多数情况下这样做仍不足以保持客端的时间准确。截至本文的写作时,VMware 知识库内的这篇文章提供了维持系统时间的最佳方法:

http://kb.vmware.com/kb/1006427

下面是对应 CentOS 而改动了的扼要指引:

(加在文件的顶部)
# modification as per http://kb.vmware.com/kb/1006427
# The configuration directive tinker panic 0 instructs NTP not to give up
# if it sees a large jump in time and must be at the top of the ntp.conf file.
tinker panic 0
# end of mod

(将两行变为注释,如下)
(comment out 2 lines as below)
# modification as per http://kb.vmware.com/kb/1006427
# It is also important not to use the local clock as a time source,
# often referred to as the Undisciplined Local Clock. NTP has a
# tendency to fall back to this in preference to the remote servers
# The following 2 lines commented out.

# when there is a large amount of time drift.
# server        127.127.1.0     # local clock
# fudge 127.127.1.0 stratum 10

0.centos.pool.ntp.org
1.centos.pool.ntp.org

{i} VMware Tools 的 rpm 组件可以从 http://people.centos.org/hughesjr/open-vm-tools/ 取得

更改客端虚拟机器的网络接桥,使它能运用主机的无线连接

你可以轻易地将 eth0 改为另一个地址,好让你不必在无线连接上采用网络地址转译。首要是停止 vmware 服务,但请先确保所有客端虚拟机器都不在运行。

# service vmware stop 

接著,编辑 vmware 配置文件并将所有 eth0 符串改为你的无线连接。以我为例,这是 eth1。

# vim /etc/vmware/locations 
answer VNET_0_INTERFACE eth1
answer VNET_0_INTERFACE eth1

存储并离开这个文件。现在重新引导 vmware 服务。

# service vmware start 

现在你应该可以轻松地将虚拟机器接桥至主机中。你不必为了在客端操作系统安装无线驱动程序而操心,因为它是通过 VMware 的虚拟网络界面而接桥的。

Translation of revision 22

zh/TipsAndTricks/VMWare Server (last edited 2010-01-18 03:45:15 by TimothyLee)