分类: LINUX
2009-07-17 22:34:48
下面脚本可解决虚拟机时间过慢的问题:
vi /home/ntp.sh
|
vi /home/syntime.sh
|
crontab -l
* * * * * sh /home/syntime.sh &
下面脚本可以让系统时间每过一分钟时间向前两分钟:
*/1 * * * * /home/scripts/time.sh
|
这个问题很棘手,发生以后会对guestOS上的操作和计算控制产生极大的影响。小弟认为这个问题是由于虚拟的硬件问题所造成的。我估计这个问题多会发生在双核cpu的电脑上。由于节能程序对CPU主频控制产生的。
其实解决方法也很简单,VMware解释如下:
This problem occurs on some host computers that use Intel SpeedStep or other similar power-saving technologies that vary the processor speed.
To work around this problem, you can specify the correct maximum CPU speed in your global configuration file. On Windows hosts, this file is normally
C:\Documents and Settings\All Users\Application Data\VMware\VMware Workstation\config.ini
for VMware Workstation or
C:\Documents and Settings\All Users\Application Data\VMware\VMware GSX Server\config.ini
for GSX Server. 编辑此文件夹下的config.ini
If this file exists, edit it with a text editor, adding the lines described below. The file may not exist. If it does not exist, create it as a plain text file.
如果文件不存在,新建一个config.ini并且编辑
host.cpukHz = "3753902" // 双核CPU一定要记得将单核的主频x2 AMD TL-56 1.8x1024x1024=3753902
host.noTSC = "TRUE"
ptsc.noTSC = "TRUE"
processor0.use = "FALSE"
processor1.use = "TRUE"
如修改后任然无效可尝试网上其他方法,如果您对我的方法有什么意见也可以和我联系,很高兴和大家一起探讨。