天天看點

hyper-v虛拟機中建立共享磁盤用來做叢集

 這幾天一直研究server2008用hyper-v搭建叢集環境的問題,我們知道在VMware中共享磁盤的方法是:

1.先建立共享磁盤,在添加到虛拟機中去

<a target="_blank" href="http://blog.51cto.com/attachment/201009/002802481.png"></a>

2.虛拟機存放目錄下以.vmx結尾的檔案,打開檔案後在最後一行加入disk.locking = "false" 

但在2008server下我們用hyper-v搭建的虛拟機同樣不能直接共享磁盤,我到現在也沒有找到像VMware一樣更改磁盤屬性的方法來實作共享,那我隻好找另一個方法了用WinTarget 虛拟磁盤的方法,思路是這樣的我們先搭建一台虛拟機做存儲服務,然後再搭建兩台虛拟機做叢集,用存儲伺服器來實作共享磁盤的方法。實驗環境一台server2008 做域控制器,兩台2003做叢集

我們先安裝WinTarget 在2008虛拟機上,伺服器的ip為192.168.0.108 預設安裝一路完成(這裡有一點大家要注意用來做存儲服務的虛拟機磁盤必須足夠大,有不同的盤符要不以後我們沒有辦法建立共享磁盤)

<a target="_blank" href="http://blog.51cto.com/attachment/201009/003847770.png"></a>

<a target="_blank" href="http://blog.51cto.com/attachment/201009/004212652.png"></a>

在2008上建立共享磁盤

<a target="_blank" href="http://blog.51cto.com/attachment/201009/004715225.png"></a>

我們先不要添加直接下一步   完成

<a target="_blank" href="http://blog.51cto.com/attachment/201009/004729248.png"></a>

<a target="_blank" href="http://blog.51cto.com/attachment/201009/004742521.png"></a>

在2003上安裝iSCSI用戶端協定軟體預設完成

<a target="_blank" href="http://blog.51cto.com/attachment/201009/005120544.png"></a>

打開Microsoft iSCSI Initiator,在general标簽,選中Change按鈕。檢視node name的資訊

<a target="_blank" href="http://blog.51cto.com/attachment/201009/005305558.png"></a>

在2008上單擊建立host

<a target="_blank" href="http://blog.51cto.com/attachment/201009/005527170.png"></a>

點進階-添加2003ip

<a target="_blank" href="http://blog.51cto.com/attachment/201009/005539747.png"></a>

完成後如圖

<a target="_blank" href="http://blog.51cto.com/attachment/201009/005804567.png"></a>

在2008上 選擇Device中的磁盤,輕按兩下打開屬性把磁盤添加到另外兩個做叢集的虛拟機上完成後如圖

<a target="_blank" href="http://blog.51cto.com/attachment/201009/010118333.png"></a>

在2003上打開Microsoft iSCSI Initiator,選擇"Discovery",添加伺服器IP和端口。

<a target="_blank" href="http://blog.51cto.com/attachment/201009/010321175.png"></a>

切換到targets,

<a target="_blank" href="http://blog.51cto.com/attachment/201009/010609780.png"></a>

已經添加好了

<a target="_blank" href="http://blog.51cto.com/attachment/201009/010622576.png"></a>

下面我們就可以随心搭建群集了,ok 結束大家誰想要WinTarget就給我留言我發給大家,由于部落格等級限制我不能上傳超過2M的附件,唉!等級太低我永遠的痛啊

本文轉自q狼的誘惑 51CTO部落格,原文連結:http://blog.51cto.com/liangrui/388716,如需轉載請自行聯系原作者

繼續閱讀