成人免费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虛擬機

2011-03-15 13:12:59

2012-05-18 10:07:34

虛擬化

2009-09-04 08:33:25

VirtualBox虛

2017-08-15 15:36:41

VMwareLinux虛擬機

2010-10-13 10:16:44

備份VMware vS虛擬機

2017-03-21 16:48:38

2009-09-15 09:56:13

VMwareXen

2012-08-27 09:24:02

虛擬化

2009-07-27 08:46:22

2010-08-30 10:11:25

XenKVM虛擬機遷移

2012-10-11 14:18:25

CentosVMware

2014-12-23 10:06:14

VLAN

2009-08-07 10:49:57

虛擬機故障監控

2016-12-19 13:49:33

2009-08-06 10:36:10

VMware上網設置VMware故障排查

2009-01-12 17:52:10

服務器虛擬化VMware

2012-03-19 21:19:14

vmwarekvm

2021-01-04 05:49:34

VMwareLinux虛擬機
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 成人性生交大片免费看中文带字幕 | 精品一区二区三区在线观看 | 天堂色区 | 久久91精品国产一区二区三区 | 成人影院免费视频 | 在线日韩欧美 | 日本一区二区三区视频在线 | 91精品久久久久久综合五月天 | 国产精品久久久久久久久久软件 | 又爽又黄axxx片免费观看 | 国产精品99久久久久久大便 | 日韩视频一区二区三区 | 欧美日韩精品免费观看 | 色婷婷亚洲国产女人的天堂 | 久久www免费视频 | 亚洲免费视频在线观看 | 91免费看片| 精品福利视频一区二区三区 | 免费看片国产 | 国产成人91| 免费a在线| 中文在线播放 | 涩爱av一区二区三区 | 日日草天天干 | 亚洲精品久久 | 久久亚洲国产 | 精品国产成人 | 亚洲欧美bt | 美女黄频| av一级久久| 在线一区二区三区 | 久久午夜视频 | 久久精品国产一区二区三区不卡 | 欧美在线一区视频 | 国产乱人伦 | 国产日韩欧美电影 | 日韩成人av在线 | 国产在线中文字幕 | 国产亚洲网站 | 日韩电影一区 | 亚洲精品无 |