成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

內網 Xen 和 Vmware 中的虛擬機器如何對時?

原創
運維 系統運維
Puppet自動化分布式環境對時間要求非常嚴格,內網 Xen 和 Vmware 中的虛擬機器如何同步?本文分享了具體的技術方案,希望能給大家帶來幫助。

 【51CTO專稿】Puppet自動化分布式環境對時間要求非常嚴格,日常正常工作中很容易出現如下報錯:

  1. Triggering test.cn7788.com 
  2. Host test.cn7788.com failed: certificate verify failed.   
  3. This is often because the time is out of sync on the server or client 
  4. test.cn7788.com finished with exit code 2 
  5. Failed: test.cn7788.com 

大家可以關注“This is often because the time is out of sync on the server or client”此行報錯,一般來說,如果出現類似字樣,基本都是由于時間不精準而引起的問題,大家用ntpdate自動對時即可解決。

工作中新增加了多組Xen虛擬機器也要求用Puppet服務器來進行自動化管理(初始化環境已經采用Xen的模板機來處理了),環境如下所示:

192.168.11.26 test1.cn7788.com  puppet-client  
192.168.11.27 test2.cn7788.com  puppet-client  
192.168.11.28 test3.cn7788.com  puppet-client  

發現一樣出現了如上報錯,原因如下:

Xen虛擬機器同宿主機硬件時鐘同步,本來是很方便的嘛。不過因為軟件模擬中斷會在負載變化的時候出現延遲,所以會逐漸會比正常時間變慢,我們修改下xen虛擬機的內核文件/etc/sysctl.conf,添加代碼如下:

xen.independent_wallclock = 1  

然后用如下命令使內核改動迅速生效,如下:

sysctl -p 

最后我們在這三臺Xen機器上用ntpdate命令來同步時間,確保Xen虛擬機器不會因為時間問題報錯,命令如下所示:

ntpdate ntp.api.bz  

另外,如果是內網的VMware機器也想采用ntpdate自動對時,應該如何操作呢?嘗試了一些方法,個人感覺安裝Vmware Tools工具是較為簡單的方法,而且在測試中發現,最小化安裝CentOS5.8 x86_64后再進行安裝Vmware Tools還是有不少困難的,具體如下所示(這里以VMware Workstation5.5舉例說明):

一、按照正常操作時,選擇“install Vmware Tools”選項時,Vmware相關光盤應該就可以自動掛載上面了,但是就是沒掛載成功,這個時候也不要著急,用別的方法就是,我們采取手動掛載的方法,我們選擇在目錄“C:\Program Files\VMware\VMware Workstation”下的linux.iso,手動掛載至Vmware Workstation下,然后:

mount /dev/cdrom /mnt/  
cp /mnt/VMwareTools-5.5.1-19175.tar.gz /usr/local/src  
tar xvf VMwareTools-5.5.1-19175.tar.gz  
cd  vmware-tools-distrib  
./ vmware-install.pl  

二、執行到下面步驟時會報錯,原因是/mnt已經被占用了,如下:

Stopping VMware Tools services in the virtual machine:  
Guest operating system daemon:                       [  OK  ]  
Unable to create the directory /mnt/hgfs.  
Execution aborted.  

此時我們umount /mnt目錄即可。

三、繼續安裝的話,會因為缺少gcc和C Hearder頭繼續報錯,報錯信息如下所示:

  1. None of the pre-built vmhgfs modules for VMware Tools is suitable for your running kernel.  
  2. Do you want this program to try to build the vmhgfs module for 
  3. your system (you need to have a C compiler installed on your system)? [yes] 
  4. Setup is unable to find the "gcc" program on your machine.  Please make sure it is installed.  
  5. Do you want to specify the location of this program by hand? [yes] 
  6. What is the location of the "gcc" program on your machine? 
  7. None of the pre-built vmhgfs modules for VMware Tools is suitable for your running kernel.  
  8. Do you want this program to try to build the vmhgfs module for  
  9. your system (you need to have a C compiler installed on your system)? [yes]  
  10. Using compiler "/usr/bin/gcc". Use environment variable CC to override. 
  11. What is the location of the directory of C header files that match your running  kernel? [/usr/src/linux/include]  
  12. The path "/usr/src/linux/include" is not an existing directory. 

解決方法如下所示:

yum -y install gcc  kernel-devel  

很多朋友在VMware Workstation下面安裝其它版本時容易出現如下錯誤, 很容易卡在下面,圖示如下:

其實只需要yum install或apt-get install kernel-devel即可。

四、安裝完成以后我們繼續安裝,安裝信息如下所示:

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 vmhgfs module for your running kernel.  
None of the pre-built vmhgfs modules for VMware Tools is suitable for your  
running kernel.  Do you want this program to try to build the vmhgfs module for  
your system (you need to have a C compiler installed on your system)? [yes] no  
The filesystem driver (vmhgfs module) is used only for the shared folder  
feature. The rest of the software provided by VMware Tools is designed to work  
independently of this feature.  
If you wish to have the shared folders feature, you can install the driver by  
running vmware-config-tools.pl again after making sure that gcc, binutils, make  
and the kernel sources for your running kernel are installed on your machine.  
These packages are available on your distribution's installation CD.  
[ Press Enter key to continue ]  
No X install found.  
Starting VMware Tools services in the virtual machine:  
Switching to guest configuration:                       [  OK  ]  
DMA setup:                                              [  OK  ]  
Guest operating system daemon:                          [  OK  ]  
The configuration of VMware Tools 5.5.1 build-19175 for Linux for this running  
kernel completed successfully.  
You must restart your X session before any mouse or graphics changes take  
effect.  
You can now run VMware Tools by invoking the following command:  
"/usr/bin/vmware-toolbox" during an XFree86 session.  
Enjoy,  
--the VMware team  

注意結尾的幾段信息,特別是這段“The configuration of VMware Tools 5.5.1 build-19175 for Linux for this running kernel completed successfully.”

一般來說,此時VMware Tools應該是成功安裝上去了,我們檢查下/mnt目錄,看到共享目錄hgfs已經成功生成了。

此時我們可以用ntpdate命令自動對時了,如下:

ntpdate ntp.api.bz  

個人博客:http://andrewyu.blog.51cto.com

微博地址:http://weibo.com/yuhongchun027

【聲明】本文作者:余洪春(撫琴煮酒),英文名Andrew.Yu。本文在51CTO系統頻道首發,轉載請注明作者和出處。

 

責任編輯:黃丹 來源: 51CTO.com
相關推薦

2014-02-21 11:20:34

KVMXen虛擬機

2010-01-21 11:17:36

xen虛擬機

2012-05-18 10:07:34

虛擬化

2009-09-04 08:33:25

VirtualBox虛

2017-03-21 16:48:38

2011-03-15 13:12:59

2017-08-15 15:36:41

VMwareLinux虛擬機

2010-10-13 10:16:44

備份VMware vS虛擬機

2009-09-15 09:56:13

VMwareXen

2009-07-27 08:46:22

2012-08-27 09:24:02

虛擬化

2010-08-30 10:11:25

XenKVM虛擬機遷移

2014-12-23 10:06:14

VLAN

2009-08-07 10:49:57

虛擬機故障監控

2012-10-11 14:18:25

CentosVMware

2012-03-19 21:19:14

vmwarekvm

2011-09-02 15:22:22

Vmwarecisco虛擬化

2009-08-06 10:36:10

VMware上網設置VMware故障排查

2016-12-19 13:49:33

2009-01-12 17:52:10

服務器虛擬化VMware
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 亚洲一区二区三区视频在线 | 爱爱小视频 | 久久亚洲视频 | 欧美日韩亚洲系列 | 国产日韩精品久久 | 一区免费看 | 日韩精品免费在线观看 | 7777在线| 91视频久久 | 国产传媒毛片精品视频第一次 | 91视频进入 | 成人三级视频 | 午夜伦4480yy私人影院 | 亚洲av毛片 | 久久99精品久久久久 | 国内精品一区二区三区 | 日韩欧美在 | 国产免费a | 亚洲三区在线观看 | 午夜精品久久久久久久久久久久 | 日韩福利片 | 久草新在线 | 国产成人一区二区三区久久久 | 成人一区二区三区 | 欧美第一页 | 中文字幕日韩一区二区 | 成人免费视频网站在线看 | 久久精品国产免费一区二区三区 | 亚洲国产18 | 久久国产精彩视频 | 成人不卡一区二区 | 日韩精品免费播放 | 国产精品日产欧美久久久久 | 久久久国产一区二区三区四区小说 | 在线一区视频 | 欧美jizzhd精品欧美巨大免费 | 久久99精品久久久久久青青日本 | 日韩三级在线 | 国产精品久久久久久中文字 | 亚洲免费视频一区 | 国产精品日韩一区二区 |