標籤:windows server 2016 nano server deploy 部署
一、在虛擬機器中部署Nano Server
將下載好的Windows Server 2016安裝ISO解壓,可以看到有一個NanoServer目錄,這個目錄存放的就是用於定製化Nano鏡像所需要的檔案。
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/98/5E/wKioL1k6l8OyU0PoAACnLwHS5xs573.png" />
在這個目錄中有兩個子目錄和一個WIM檔案,不要隨意更改名字,包括Nanoserver根目錄,因為製作鏡像的指令碼裡都定義好了這些目錄的名稱,如果更改目錄名或檔案名稱而不修改指令碼的話就會導致最終產生鏡像失敗。
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/98/5E/wKiom1k6l8PAiQDiAABllFhSPik595.png" />
開啟NanoServerImageGenerator目錄,這裡就能看到用於產生鏡像的指令碼了。開啟Powershell,定位到這個目錄。
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/98/5E/wKioL1k6l-uTJZiiAABujBFAJzI089.png" />
使用Import-Module命令匯入模組
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/98/5E/wKiom1k6l-uQDObJAAAWhZafvGY499.png" />
使用New-NanoServerImage產生Nano Server所需的VHD檔案,加入-verbose為了看到產生鏡像的過程
-mediapath:指定nanoserver的上層路徑
-basepath: 指定目錄作為臨時VHD產生路徑
-deploymentType: guest虛擬機器
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/98/5E/wKioL1k6l-zyrvN5AABHfYhYNvQ831.png" />
注意下產生過程,顯示在臨時目錄產生了這個VHD,並將VHD載入到了E盤,並在這個E盤之星了建立引導條目的命令,簡而言之,這個VHD就是個可引導的虛擬磁碟檔案。
此外還可以看到在引導做完後,又使用了DIMS來進行這個VHD的定製化,包括加網域設定,驅動載入,可選的功能載入,還可以進行一些資料的匯入,這些都是可以通過unattend.xml檔案來控制,這個步驟和常規版本的windows server應該是一樣的,日後我們再來看這個定製化。
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/98/5E/wKiom1k6l-zhSXZWAABJI38_Jac647.png" />
完成後這個VHD檔案其實就是一個系統磁碟了,可以建立一個虛擬機器,來掛載這個VHD檔案。
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/98/5E/wKioL1k6l-2hyo8ZAAASdYNnqaQ728.png" />
啟動虛擬機器,秒進NanoServer。。。
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/98/5E/wKiom1k6l-3B4hhdAABQdUF6E4I973.png" />
進入系統後可以看到最基本的資訊,並做一個網路初始化,後續我們將慢慢討論如何來管理NanoServer
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/98/5E/wKioL1k6l-7xMMndAACXJFO4Xdw746.png" />
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/98/5E/wKiom1k6l-6QF4pRAAAOErHMgKM512.png" />
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/98/5E/wKioL1k6l-_CIDdvAAArlFRbWGI677.png" />
Windows Nano Server 部署