學習筆記—WDS Server
Windows deploy sever (windows 部署服務 WDS) 是 windows Server 2008 中部署OS(作業系統)的一個利器!顧名思義WDS 是針對大容量部署作業系統而設定的(部署是針對批量作業系統的安裝,有的時候還需要考慮設定相同的桌面環境!),這個角色是通過網絡來安裝作業系統,這樣可以避免親自在每台機器上做操作,而且還省去了通過CD光牒(這麼不環保的“東西”)來安裝作業系統的過程!
說到這兒我們可能想到Ghost+sysprep 的方法來大容量部署作業系統,那麼WDS還有沒有必要呢?WDS使用的是WIM格式的檔案,Ghost工具是基于磁盤扇區而wim 格式的檔案是基于目錄對磁盤的扇區并沒有太大的影響,而且占用空間很小!使用起來比較友善!。。。。。。
好啦,現在就進入我們的實驗環境
實驗前準備:
Active Directory: WDS 必須部署在域環境中(可以使 DC域控制器,成員伺服器)
DHCP:在PE(預安裝環境)中是依靠DCHP得到IP,并WDS Server 進行“溝通”
DNS 伺服器 和 NTFS 卷
環境布置:
<a target="_blank" href="http://blog.51cto.com/attachment/201007/144354865.jpg"></a>
實驗環境比較簡單,BEIJING 這台機器擔當四個伺服器的角色,BEIJING 這個機器已經 安裝好Active Directory ,域名為 WEIPENGFEI.NET IP位址是:192.168.3.82
DHCP 的位址池範圍是 192.168.3.100—192.168.3.200
實驗結果:部署WDS Server,利用imagex 工具捕獲windows 2007,
在啟動映像中添加網卡驅動,(PE(啟動映像) 預安裝環境是一個 32位作業系統,内置了很少的 驅動程式,有可能早成對目标計算機(裸機)的網卡或者是硬碟無法識别),部署windows 2007
下面我們先進行WDS Server 的安裝:
一、 安裝WDS Server
在“服務管理器”中單擊“角色”—“添加角色”
<a target="_blank" href="http://blog.51cto.com/attachment/201007/144645759.jpg"></a>
選擇“windows 部署服務”
<a target="_blank" href="http://blog.51cto.com/attachment/201007/144659893.jpg"></a>
<a target="_blank" href="http://blog.51cto.com/attachment/201007/144735873.jpg"></a>
其實部署和傳輸伺服器可以放在兩台機器上,部署服務必須要加入域才行!
<a target="_blank" href="http://blog.51cto.com/attachment/201007/144753981.jpg"></a>
WDS 正在安裝中!
安裝成功後,我們需要對wds 伺服器進行配置,如圖:
<a target="_blank" href="http://blog.51cto.com/attachment/201007/144812541.jpg"></a>
右鍵“BEIJING.WEIPENGFEI.NET”選擇“配置伺服器” 出現歡迎界面!
下面是讓我們選擇映像的存放路徑,我們改為“E:\remoteInstall”
<a target="_blank" href="http://blog.51cto.com/attachment/201007/144841105.jpg"></a>
當DHCP Server 和 WDS Server 放在一起的時候,才會有這樣的提示,由于 WDS 和 DHCP 同時監聽 67端口,這時将DHCP 設定為監聽60 端口來響應“PXE client ”的請求!我們必須全部勾上這兩個方框!
<a target="_blank" href="http://blog.51cto.com/attachment/201007/144915176.jpg"></a>
這個圖讓我們對PXE的client (用戶端)進行設定:
<a target="_blank" href="http://blog.51cto.com/attachment/201007/144931587.jpg"></a>
在實驗環境下為了友善我們選擇“響應所有用戶端計算機”,加入在實際生産中,應該核對一下較好!
配置成功後,開始第二步:
二、 配置啟動映像
其實啟動映像實質就是PE(預安裝環境,迷你32作業系統)
1、 将啟動映像複制到WDS Server中,啟動映像位于 安裝CD光牒中source \boot.wim 我們将其複制到e:\boot.wim,我們将網卡驅動程式複制到C:\qudong\32 目錄下
如圖:
<a target="_blank" href="http://blog.51cto.com/attachment/201007/145007973.jpg"></a>
網卡驅動程式
<a target="_blank" href="http://blog.51cto.com/attachment/201007/145023903.jpg"></a>
啟動映像
接下來我們利用WAIK這個工具對啟動鏡像進行配置,(隻要用到imagex.exe 和 peimg.exe這兩個應用程式)
如圖打開WAIK 的指令提示符:
<a target="_blank" href="http://blog.51cto.com/attachment/201007/145048868.jpg"></a>
如圖我們檢視boot.wim中的一些詳細資訊!
Imagex /info e:\boot.wim
<a target="_blank" href="http://blog.51cto.com/attachment/201007/145106325.jpg"></a>
此時我們會看到其中顯示有兩個啟動映像!
接下來我們将第一個啟動映像釋放到e:\windows 2007 這個目錄下,
指令是:imagex /mountrw e:\boot.wim 1 “e:\windows 2007”
<a target="_blank" href="http://blog.51cto.com/attachment/201007/145143792.jpg"></a>
打開 e:\ windows 2007 可以看到裡面有很多檔案夾
<a target="_blank" href="http://blog.51cto.com/attachment/201007/145208270.jpg"></a>
下面我們将網卡驅動程式添加到 啟動映像中
指令:peimg /inf=*.inf “e:\windows” (後來因為windows 2007 在指令行中 必須帶上引号 ,是以我直接将其重命名為 windows )
<a target="_blank" href="http://blog.51cto.com/attachment/201007/145231238.jpg"></a>
将imagex.exe 添加到啟動映像中,
<a target="_blank" href="http://blog.51cto.com/attachment/201007/145244968.jpg"></a>
最後我們将 網卡驅動和imagex 工具全部封裝在 啟動映像中,
指令是:imagex /umount /commit e:\windows
<a target="_blank" href="http://blog.51cto.com/attachment/201007/145427793.jpg"></a>
2、 添加啟動映像:
右鍵啟動映像。單擊“添加啟動映像”如圖:
<a target="_blank" href="http://blog.51cto.com/attachment/201007/145449560.jpg"></a>
選擇映像檔案:
<a target="_blank" href="http://blog.51cto.com/attachment/201007/145505241.jpg"></a>
映像中繼資料
<a target="_blank" href="http://blog.51cto.com/attachment/201007/145530537.jpg"></a>
添加過程:
<a target="_blank" href="http://blog.51cto.com/attachment/201007/145546626.jpg"></a>
3、建立捕獲映像
添加成功後,右鍵已經添加的啟動映像:如圖:選擇“建立捕獲啟動映像”
<a target="_blank" href="http://blog.51cto.com/attachment/201007/145611984.jpg"></a>
設定捕獲映像的中繼資料:我們将其輸出在e:\capture.wim
<a target="_blank" href="http://blog.51cto.com/attachment/201007/145636536.jpg"></a>
建立過程:
<a target="_blank" href="http://blog.51cto.com/attachment/201007/145819932.jpg"></a>
等待建立成功後,我們還需要将 capture.wim 添加在啟動映像中!
如圖我們已經添加成功!
<a target="_blank" href="http://blog.51cto.com/attachment/201007/145838929.jpg"></a>
三、捕獲映像
現在我們将模闆計算機 windows 2007 從網卡啟動,
此時按下F12進入下面的界面
<a target="_blank" href="http://blog.51cto.com/attachment/201007/145906252.jpg"></a>
我們選擇 捕獲的映像!
<a target="_blank" href="http://blog.51cto.com/attachment/201007/145937885.jpg"></a>
模闆計算機從網卡啟動,并且從DCHP那裡得到了一個 IP 位址,但遺憾的是網絡服務沒有開啟,這個時候沒有辦法将捕獲的映像傳送到WDS伺服器上,在指令提示符中 輸入:Startnet
再進行PING 測一下基本上沒有問題!
現在開始捕獲:輸入以下指令
<a target="_blank" href="http://blog.51cto.com/attachment/201007/150008269.jpg"></a>
imagex /caputure –開始捕獲映像 c: --表示所需捕獲的盤符
\\192.168.3.82\windows\windows2007.wim --表示捕獲的映像的存放路徑及名稱
“win7 install ” –對所捕獲的映像的描述
<a target="_blank" href="http://blog.51cto.com/attachment/201007/150029407.jpg"></a>
已經提示我們已經成功捕獲映像!
現在直接退出這個環境就可以啦!
回到我們的 WDS Server 上
在e:\ windows 下我們可以看到 我們已經捕獲的映像
<a target="_blank" href="http://blog.51cto.com/attachment/201007/150049531.jpg"></a>
1、添加 安裝映像!
其實步驟和添加啟動映像是一樣一樣的!是以在這裡就沒有了圖檔!
<a target="_blank" href="http://blog.51cto.com/attachment/201007/150104662.jpg"></a>
如圖是已經添加好的映像!
四、 安裝用戶端!
現在伺服器端已經做好準備,隻欠在客戶機上安裝作業系統!
找到一台裸機,在BIOS 中設定為從網卡啟動,
當提示“press F12 for network service boot”時,按下“F12”鍵
<a target="_blank" href="http://blog.51cto.com/attachment/201007/150126737.jpg"></a>
進入 “windows boot manager”界面時,選擇“Microsoft windowssetup(86)”】
<a target="_blank" href="http://blog.51cto.com/attachment/201007/150143190.jpg"></a>
Window 正在加載檔案
<a target="_blank" href="http://blog.51cto.com/attachment/201007/150219381.jpg"></a>
正在啟動“PE過程”
<a target="_blank" href="http://blog.51cto.com/attachment/201007/150242229.jpg"></a>
進入選擇“語言”階段,連接配接到WDS後需要輸入正确的使用者名和密碼!
<a target="_blank" href="http://blog.51cto.com/attachment/201007/150303341.jpg"></a>
下面出現我們要安裝的映像!
<a target="_blank" href="http://blog.51cto.com/attachment/201007/150327488.jpg"></a>
我們現在選擇安裝的位置
<a target="_blank" href="http://blog.51cto.com/attachment/201007/150339354.jpg"></a>
之後“裸機”開始與伺服器聯系!
現在系統已經開始了一部分!已經結束了複制和展開檔案!
<a target="_blank" href="http://blog.51cto.com/attachment/201007/150357872.jpg"></a>
當安裝完成後,計算機将在10秒後重新啟動!
下面我們已經安裝好了系統!
<a target="_blank" href="http://blog.51cto.com/attachment/201007/150416661.jpg"></a>
綜上:以上部分隻是我學習的筆記,圖檔可能很少,僅供參考!其實作業系統安裝成功後,應該和捕獲的win7 的作業系統是一樣的(隻是computer name ,SID發生變化)!
本文轉自 位鵬飛 51CTO部落格,原文連結:http://blog.51cto.com/weipengfei/343357,如需轉載請自行聯系原作者