Try   HackMD

VMware虛擬化環境進行簡易的iSCSI配置-NAS以QNAP為例

目錄


  • 環境說明
  • VM設定
  • NAS設定
  • 建置結果展示以及驗證

一、環境說明

本文章僅為了讓使用者可以順利使用iSCSI進行NAS儲存空間與Server進行連接而撰寫,會簡單提點iSCSI需要的設定與步驟。

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
開始前先介紹我會使用的設備:VM主機、NAS、網路線*2、Switch(L3 Firewall)。

可以簡單參考下圖的配置。

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

(一)、NAS環境檢視

說明NAS, 請參考下圖:

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

說明:第一張圖是NAS後面的網路插口,對應到第四張圖所框選之處。第二張圖是網路線所走的最後位置,是為Firewall(L3)。

(二)、Server環境檢視

為使用iSCSI, Server需要貢獻一個Port口或者說一張網卡,進行VMkernel 連接埠的設定。參考如下:

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

至此,基本環境檢視結束,進入VM設定。

二、VM設定

首先先將剛剛對VM需要使用的網路卡進行設定,使其成為vSwitch 還有設定連接埠群組詳細虛擬化環境網路建置的部分可以去看我先前撰寫的 文章

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

這裡比較重要,新增一個VMkernel NIC,最後在儲存區 介面卡新增一個供iSCSI功能的設定,使用軟體iSCSI將剛剛的VMKernel加入。

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
這裡其實要設定介面卡,新增並且啟用iSCSI

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
更新:這裡VMkernel NIC不要設定和NAS端口相同的IP,例如VMkernel NIC設定IP.166,NAS的Port IP.166,會衝突。請將VMkernel NIC假設另一組IP, 例如.200。

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

VMWare端設定結束。

三、NAS設定

先將剛剛在環境檢視看到的那個Port進行固定IP設定。

新增iSCSI目標,並切LUN給他,確認網路入口設定正確。

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

NAS端設定完成,使用虛擬機進行iSCSI連接測試。

四、建置結果展示以及驗證

驗證結果,直接輸入剛剛設定好的NAS Port固定IP, 我這邊設定為:10.100.100.166,直接輸入就可以看到我切的LUN了。

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

各環境下的設定不同,文件僅供參考。