# Dell EMC Unity VSA - Part1: 佈署安裝 ###### tags: `dellemc` `unity` [toc] **Dell EMC UnityVSA (Virtual Storage Appliance)** 可讓客戶輕鬆佈署 Dell EMC Unity 系列,快速進階認識並使用儲存和資料管理功能。 :::warning 因為是**第一次**接觸 Dell EMC 儲存產品,只是想透過不同的角度來面對未來幾個月需要學習的東西,或許對於存儲專家大不敬,也許也有點離經叛道,但總想這樣嘗試看看,說不定還有點樂趣! 最主要還是為了能達到**快速佈署**、**功能上手**,進一步能**協助實際安裝和組態的工作效率**。 ::: # 準備安裝 ## 下載 Unity VSA [下載連結](https://www.dell.com/support/home/zh-tw/product-support/product/unityvsa-(virtual-storage-appliance)/drivers)(需要有效帳號登入) 基本上瀏覽 Dell 官方網站,選擇**支援** > **驅動程式與下載項目**,在搜尋欄位輸入 **UnityVSA**,選擇所需產品名稱。  選擇 OVA 映像檔 **`Dell UnityVSA 5.2.1.0.5.013 OVA Image`** 進行下載。 > 應為目前最新版本。  ## 驗證 OVA 檔案 | | | | --- | --- | | **檔案名稱** | UnityVSA-5.2.1.0.5.013.ova | | **SHA256SUM** | d21de5218d9c8de1080471c674ba54fcc14abbd33bcad2756a58d7f5b0a9469d | 使用以下命令確認 sha256sum 驗證碼是否相符。 ```bash $ sha256sum UnityVSA-5.2.1.0.5.013.ova ``` ## OVFTool 探索 使用 OVFTool 工具來探索 OVA 檔案,對我而言真的是有點強迫症上身!不過卻可以透過這樣的方式,迅速了解安裝模式。 輸入以下命令檢視 OVA 檔案內容。 ```bash $ ovftool --hideEula --X:enableHiddenProperties --disableVerification --allowExtraConfig UnityVSA-5.2.1.0.5.013.ova ``` **輸出內容** ```bash OVF version: 1.0 VirtualApp: false Name: UnityVSA Version: 5.2.1 Vendor: Dell EMC Corporation Vendor URL: http://www.dellemc.com Annotation: UnityVSA Appliance (5.2.1) Download Size: 2.67 GB Deployment Sizes: Flat disks: 84.00 GB Sparse disks: 2.66 GB Networks: Name: Management Network Description: Network for the management port(s) Name: Data Network Port 0 Description: Network for data port 0 Name: Data Network Port 1 Description: Network for data port 1 Name: Data Network Port 2 Description: Network for data port 2 Name: Data Network Port 3 Description: Network for data port 3 Virtual Machines: Name: vsa-template Operating System: otherguest64 Virtual Hardware: Families: vmx-09 Number of CPUs: 2 Cores per socket: 1 Memory: 12.00 GB Disks: Index: 0 Instance ID: 10 Capacity: 22.00 GB Disk Types: SCSI-VirtualSCSI Index: 1 Instance ID: 11 Capacity: 30.00 GB Disk Types: SCSI-VirtualSCSI Index: 2 Instance ID: 12 Capacity: 32.00 GB Disk Types: SCSI-VirtualSCSI NICs: Adapter Type: VmxNet3 Connection: Management Network Adapter Type: VmxNet3 Connection: Management Network Adapter Type: VmxNet3 Connection: Data Network Port 0 Adapter Type: VmxNet3 Connection: Data Network Port 1 Adapter Type: VmxNet3 Connection: Data Network Port 2 Adapter Type: VmxNet3 Connection: Data Network Port 3 Properties: Key: friendly_name Category: System Name Label: System Name Type: string Description: User friendly name for the system Key: mgmt_ip_v4 Category: IPv4 Management Settings (Leave Blank for Automatic Configuration) Label: IP Address Type: string Description: IPv4 address for the management interface Key: mgmt_netmask_v4 Category: IPv4 Management Settings (Leave Blank for Automatic Configuration) Label: Subnet Mask Type: string Description: IPv4 netmask for the management interface Key: mgmt_gateway_v4 Category: IPv4 Management Settings (Leave Blank for Automatic Configuration) Label: Gateway Type: string Description: IPv4 gateway for the management interface Key: mgmt_ip_v6 Category: IPv6 Management Settings (Leave Blank for Automatic Configuration) Label: IP Address Type: string Description: IPv6 address for the management interface Key: mgmt_preflen_v6 Category: IPv6 Management Settings (Leave Blank for Automatic Configuration) Label: Subnet Mask Type: string Description: IPv6 prefix length for the management interface Key: mgmt_gateway_v6 Category: IPv6 Management Settings (Leave Blank for Automatic Configuration) Label: Gateway Type: string Description: IPv6 gateway for the management interface References: File: OS-c4dev_PIE_7822R-5.2.1.0.5.013-VVNX_OVA_RETAIL-disk1.vmdk File: OS-c4dev_PIE_7822R-5.2.1.0.5.013-VVNX_OVA_RETAIL-disk2.vmdk File: OS-c4dev_PIE_7822R-5.2.1.0.5.013-VVNX_OVA_RETAIL-disk3.vmdk ``` 從以上內容大致可以得到以下資訊: - Unity VSA 安裝完成後,是一組 **2 vCPUs** 和 **12 GB 記憶體** 的虛擬機器。 - 會配置 **6 組網路卡**。其中 2 張為網路管理使用,其餘 4 張為一般網路界面提供服務使用。 - 會提供 **3 組虛擬磁碟空間**作為系統空間使用,分別為 **22, 30, 32 GB**。若要存儲空間,請調整虛擬機配置添加新的虛擬硬碟空間。 - 安裝時僅需要提供 **IP 位址(v4, v6 都可以) 相關組態**,提供 Unity VSA 作為**管理服務使用**。 # 動手安裝 使用 Ansible 進行一般 OVA 佈署,而不使用滑鼠點擊、鍵盤輸入那種浪費時間的安裝方式。只要透過宣告式佈署,只要環境不變,不管是誰或是佈署幾次都會是一樣**成功的結果**。 首先將環境參數寫入 **`unityvsa_config.yml`** 檔案,提供安裝時必要的組態資訊。以下僅提供必要組態參數作為範例,若有需求請自行增減及變動。 ## unityvsa_config.yml ```yaml= --- ## ovftool & ova information ovftool: "/usr/bin/ovftool" pod: "dellemc" owner: "Richard" # path to ova file ovapath: "/mnt/ovaPath/dellemc_ova" ovafile: "UnityVSA-5.2.1.0.5.013.ova" ### vCenter vc: ip: "10.*.*.1" vmname: "vcsa01" user: "administrator@vsphere.local" pass: "VMware1!VMware1!" datacenter: "Datacenter" cluster: "Cluster" datastore1: "SC2080_Lab01" esxi01: ip: "10.*.*.2" hostname: "esxi01.vsphere.local" esxi02: ip: "10.*.*.3" hostname: "esxi02.vsphere.local" esx_list: - ip: "10.*.*.2" - ip: "10.*.*.3" ## port group for storage: UnityVSA, DDVE storage_portgroup: "PG-STORAGE" storage_vswitch: "vSwitch0" storage_vlanid: 0 ## dns domain: "vsphere.local" dns_server01: "8.8.8.8" ## unity setting unity: ## Please amend this vmname for your purpose vmname: "{{ owner }}-{{ pod }}-UnityVSA01" ip: "10.*.*.85" netmask: "255.255.255.0" gateway: "10.*.*.254" hostname: "unity01" domain: "{{ domain }}" dns: "{{ dns_server01 }}" network: "{{ storage_portgroup }}" diskmode: "thin" datastore: "{{ vc.datastore1}}" parentfolder: "{{ owner }}" folder: "Storage" poweron: true ``` :::info - 以上對於 Unity VSA 使用的網路卡設定寫法,目前還沒時間進行驗證,只要對於第一組網路卡給予設定就可以了(**第一張網路卡僅提供網路管理使用**)!這似乎就是**實體佈署 Unity 存儲設備時設定管理 IP 的步驟**。 - Unity VSA 佈署完成後,就當作只有一組控制器使用,提供一組 IP 位址後續可以透過瀏覽器登入,再使用 **Unisphere UI** 進行初始化就可以了。 - 以上是我目前的**猜想**跟**假設**,需要 **Dell EMC 專家** 給予正確的指導。 ::: 接著就是佈署 Unity VSA OVA 的劇本檔 **`deployUnityVSA.yml`**。佈署劇本將會完成: - OVA 佈署執行,並配置管理 IP 位址,完成佈署後開機備用 - 建立放置 VM 的資料夾 - 將 VM 遷移至建立的資料夾 - 使用 vMotion 將 VM 遷移至指定的 ESXi 主機 ## deployUnityVSA.yml 原本使用 Ansible 模組 **`community.vmware.vmware_deploy_ovf`** 佈署 OVA 檔案,發現套用在 DDVE 和 PPDM 安裝佈署時不時會發生以下錯誤訊息。  所以重新改寫佈署方式,將以下原本使用 **`vmware_deploy_ovf`** 的部份直接採用 **OVFTool 工具** 進行佈署。 ```yaml= community.vmware.vmware_deploy_ovf: hostname: "{{ vc.ip }}" username: "{{ vc.user }}" password: "{{ vc.pass }}" datacenter: "{{ vc.datacenter }}" cluster: "{{ vc.cluster }}" datastore: "{{ unity.datastore }}" disk_provisioning: "{{ unity.diskmode }}" name: "{{ unity.vmname }}" networks: "{u'{{ item.eth }}':u'{{ item.net }}'}" validate_certs: no inject_ovf_env: yes power_on: yes ovf: "{{ ovapath }}/{{ ovafile }}" properties: friendly_name: "{{ unity.hostname }}" mgmt_ip_v4: "{{ unity.ip }}" mgmt_netmask_v4: "{{ unity.netmask }}" mgmt_gateway_v4: "{{ unity.gateway }}" delegate_to: localhost with_items: "{{ unityNetworks }}" ``` 以下是修正過後的 YAML 劇本檔。其中第 52 - 75 行為修正後寫法。之後對於 PPDM 和 DDVE 也都改採此模式進行佈署安裝,初步測試看來沒有問題。 ```yaml= --- - hosts: local gather_facts: false connection: local tasks: - name: 'Load the default configuration' include_vars: ../00_config/unityvsa_config.yml - name: '建立儲存用連接埠群組 PG-STORAGE' community.vmware.vmware_portgroup: hostname: "{{ item.ip }}" username: "{{ item.user }}" password: "{{ item.pass }}" validate_certs: false hosts: "{{ item.ip }}" switch: "{{ storage_vswitch }}" portgroup: "{{ storage_portgroup }}" vlan_id: "{{ storage_vlanid | default(0) }}" state: present delegate_to: localhost with_items: "{{ esx_list }}" - name: '建立父系資料夾' community.vmware.vcenter_folder: hostname: "{{ vc.ip }}" username: "{{ vc.user }}" password: "{{ vc.pass }}" validate_certs: false datacenter_name: "{{ vc.datacenter }}" folder_name: "{{ owner }}" folder_type: vm state: present register: vm_folder_creation_result delegate_to: localhost - name: '建立 VM 存放資料夾' community.vmware.vcenter_folder: hostname: "{{ vc.ip }}" username: "{{ vc.user }}" password: "{{ vc.pass }}" validate_certs: false datacenter_name: "{{ vc.datacenter }}" parent_folder: "{{ unity.parentfolder }}" folder_name: "{{ unity.folder }}" folder_type: vm state: present register: vm_folder_creation_result delegate_to: localhost - name: 'Deploy Unity VSA' shell: > {{ ovftool }} '--name={{ unity.vmname }}' --acceptAllEulas --allowExtraConfig --X:enableHiddenProperties --X:injectOvfEnv --noSSLVerify --overwrite '--datastore={{ unity.datastore }}' '--diskMode={{ unity.diskmode }}' '--net:Management Network={{ unity.network }}' '--net:Management Network={{ unity.network }}' '--net:Data Network Port 0={{ unity.network }}' '--net:Data Network Port 1={{ unity.network }}' '--net:Data Network Port 2={{ unity.network }}' '--net:Data Network Port 3={{ unity.network }}' '--prop:friendly_name={{ unity.hostname }}' '--prop:mgmt_ip_v4={{ unity.ip }}' '--prop:mgmt_netmask_v4={{ unity.netmask }}' '--prop:mgmt_gateway_v4={{ unity.gateway }}' '--powerOn={{ unity.poweron | string }}' '{{ ovapath }}/{{ ovafile }}' 'vi://{{ vc.user | urlencode }}:{{ vc.pass | urlencode }}@{{ vc.ip }}/{{ vc.datacenter }}/host/{{ vc.cluster }}/{{ esxi01.hostname }}' - name: '遷移 VM 至指定資料夾' community.vmware.vmware_guest_move: hostname: "{{ vc.ip }}" username: "{{ vc.user }}" password: "{{ vc.pass }}" validate_certs: false datacenter: "{{ vc.datacenter }}" name: "{{ unity.vmname }}" dest_folder: "/{{ vc.datacenter }}/vm/{{ unity.parentfolder }}/{{ unity.folder }}" delegate_to: localhost - name: 'vMotion 至指定 ESXi 主機' community.vmware.vmware_vmotion: hostname: "{{ vc.ip }}" username: "{{ vc.user }}" password: "{{ vc.pass }}" validate_certs: false destination_datacenter: "{{ vc.datacenter }}" vm_name: "{{ unity.vmname }}" destination_host: "{{ esxi02.hostname }}" delegate_to: localhost ``` 使用以下 Ansible 命令完成第一次佈署測試作業。 ```bash $ ansible-playbook deployUnityVSA.yml ``` ## 驗證安裝 為了驗證第一次安裝狀態,登入 vCenter 檢視虛擬機器狀態資訊。 佈署資訊及硬體資訊應無問題。  選擇 **Configure** > **Settings - vApp Options**,也可檢視組態狀態和資訊。相信使用 OVFTool 工具佈署後,回到這裡檢視相關組態,也變成了一種習慣。  好喔,目前為止沒有問題。到這裡都還簡單,後面才是挑戰。 # 第一次登"陸" 上面安裝 OVA 及設定管理 IP 位址,在實體 Unity 存儲設備安裝應該就是設備上架、開啟電源、硬體初始化和組態控制器管理 IP 位址的作業吧?!而且**聽說**實體 Unity 設定 IP 位址似乎需要特定的軟體 **`Dell Unity InitCLI.exe`**?請參考以下說明。 :::info [使用 Connection Utility 配置管理 IP 位址](https://hackmd.io/@farmer87/dellemc_unity_mgmt_ip) ::: 著陸的方式有兩種:**瀏覽器**和**SSH**。嘗試之前務必確認管理 IP 位址組態正確,並能 Ping 通。 ## 瀏覽器 開啟瀏覽器,使用預設 **Unisphere** 登入資訊: **`admin`** / **`Password123#`**。  驗證成功,便會進入初始化流程。就先在此暫時打住吧! ## SSH 若想使用 SSH 連線,預設**未啟用**。可以登入 VM Console,輸入以下命令進行啟用。 ```bash svc_ssh --enable ``` :::info [Dell EMC Unity: How to Enable or disable Secure Shell on the system. (User Correctable)](https://www.dell.com/support/kbdoc/en-us/000022526/dell-emc-unity-how-to-enable-or-disable-secure-shell-on-the-system-user-correctable) ::: 開啟終端機使用預設 **`service`/`service`** 進行 SSH 連線,這樣以後遠端操作就方便多了!在此就先停一下吧。  ## 著陸失敗? 如果未能正確配置 IP 位址,可以開啟 VM Console,同樣使用 **service/service** 登入,可參考官方安裝手冊以命令設定: ```bash ## for IPv4 svc_initial_config -4 "<ipv4_address> <ipv4_netmask> <ipv4_gateway>" ## for IPv6 For an IPv6 address, enter: svc_initial_config -6 "<ipv6_address> <ipv6_prefix_length> <ipv6_default_gateway> ``` 設定完成後可以使用 **`svc_diag`** 命令檢視。  若想用 SSH 遠端操作也是可行,而且是不是很方便?**最初的目的不就是希望能夠這樣使用!**  :::warning **注意** 可能是因為**安全因素**和**使用者權限**,**svc_diag** 命令前面須加上 **`sudo /EMC/Platform/bin/`** 才能順利執行成功。 ::: # 待續 接著就要完成 **Initial Configuration**,先讓我用 **Unisphere UI** 確認一下初始化流程。再來挑戰使用 [**Unisphere CLI**](https://dl.dell.com/content/manual39334587-dell-unity-family-unisphere-command-line-interface-user-guide.pdf) 或 [**Ansible**](https://github.com/dell/ansible-unity) 的方式完成組態吧。  目前初期想要"玩"成: - [X] 申請授權並上傳授權檔 - [ ] 上傳並安裝語言包(已經上傳檔案,但搞不懂要如何更新,難道更升級系統一樣?) - [X] 下載並安裝 Unisphere CLI - [X] 一般裝機設定作業 (部份,持續更新) - [X] 一般維運任務(部份,持續更新) 其他沒想到的,再請我的教官給予指導進行吧。 ## uemcli 嘗鮮 安裝 **Unisphere CLI** 後在本機執行,透過 **`uemcli`** 連線 Unity VSA 查詢系統狀態,其中包含要申請授權的 **System UUID**。 ```bash $ uemcli -sslPolicy accept -d ${unity} -u admin -p ${passwd} /sys/general show -detail ```  檢視 NTP 設定。 ```bash $ uemcli -sslPolicy accept -d ${unity} -u admin -p ${passwd} /net/ntp/server show -detail ```  組態 DNS 設定。 ```bash $ uemcli -sslPolicy accept -d ${unity} -u admin -p ${passwd} /net/dns/config set -nameServer "1.1.1.1,1.0.0.1,1.1.1.2,1.0.0.2" ```  以 Unisphere UI 確認。 ```bash $ uemcli -sslPolicy accept -d ${unity} -u admin -p ${passwd} /net/dns/config show -detail ``` 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up