星期二, 1月 26, 2016

20160126-VMware-VSOS-Day 2

20160126-VMware-VSOS-Day 2

Module 4 Performance in a Virtualized Environment

Lesson 1: Performance Overview

Virtualization = Resource Sharing

Emulation = 無中生有

Network Virtualization
  • 軟體
  • 操作簡單
  • Layer 2 over Layer 3

VMware Photon - VMware with docker

Virtualization Architectures
虛擬化架構
  • VM
  • Hypervisor
    • VMware VMkernel 32MB ~ 100MB ( VMware 將 Drivers包含在Hypervisor )
    • Microsoft Hyper-V 1MB ~ 2MB ( Microsoft 將Driver 放在VM內 )
  • 硬體

Hypervisor
  • Type 1 Bare-Metal
    • Monolithic kernel
      • VMware ESXi
    • Micro kernel
      • Microsoft Hyper-V
  • Type 2 Hosted
    • VMware Workstation

ESXi Architecture
The VMkernel ( hypervisor ) runs a virtual machine monitor ( VMM ) that is responsible for the execution of the virtual machine:
  • CPU is controlled by the scheduler and virtualized by the VMM
  • Memory is allocated by the VMkernel and virtualized by the VMM
  • Network and storage I/O devices are proxied through native device drivers

-- Class break --

Lesson 2 : Monitoring Tools

Performance Monitoring Tools
  • vCenter Server performance charts
  • resxtop
    • 在遠端執行 esxtop
    • d - 監控 disk
    • f - 增加或是減少欄位顯示
    • c -  監控 CPU
      • V 只監控VM
      • e - 展開監控清單
        • 輸入 GID 確認要展開的清單
    • W - 儲存監控選項
      • 預設儲存在家目錄
      • 透過 resxtop -c  設定檔 來執行
    • n - 監控網路

resxtop Utility

Using esxtop in Reply Mode
  • esxtop can be used in replay mode to replay resource utilization statistics collected using vm-support

Lab 3: VMware Monitoring Tools
  • 參考 Lab 文件
  • Task 1: Start Database Activity in a Virtual Machine
  • Task 2: Examine Host and Storage overview charts
  • Task 3: Configure Advanced Performance Charts
    • 這個部分自訂比較有感覺
  • Task 4: Start resxtop
  • Task 5: Explore resxtop output
  • Task 6: Run resxtop in batch mode
    • 筆記整理在上面
  • Task 7: Use Windows Performance Monitor to display Captured statistics

-- 中午休息 --

Module 5 Network Scalability

Lesson 1: Distributed Switch Features

Review: Distributed Switches
  • ESX 要 Enterprise Plus 版本
  • 簡化管理
  • Migration 容易

名詞差異
vSphere Client
  • VMkernel port
  • Uplink
Web Client
  • VMkernel Adapter
  • Physical Adapter

About Network I/O Control Version 3
  • 設定網路流量的頻寬

Note
  • virtual switch 如果有多個 uplink, 預設會 NIC teaming

Bandwidth Reservation for System Traffic
  • 保留頻寬不可以超過總頻寬 75%

Notes:
  • 把 port group 視為 switch

Backing Up and Restoring Configurations

如果 vCenter Crash
  • 安裝 vCenter
  • 加入 Hosts
  • vDS 還原

Notes
  • vDS 設定檔存在 vCenter

Rollback and Recovery of the Management Network
  • By default rollback is enabled
  • Automatic rollback if misconfiguration is detected
    • 如果沒辦法設定到 vCenter
  • Use DCUI to recover

Lesson 2: Distributed Switch Advanced Features

VLAN Policies for Distributed Port Groups
  • VLAN
  • VLAN trunking
    • VLAN 封包都可以通過
  • Private VLAN
    • VLAN 內再切割子VLAN
    • Type
      • Promiscuous
        • Secondary ID 會與Primary ID 相同
        • 可以跟其他 Private VLAN 通
      • Isolated
        • 只能跟 Promiscuous 通
      • Community
        • 可以跟相同 Community 通
        • 可以跟 Promiscuous 通
        • 不可以跟 Isolated 通

Configuring Private VLANs
  • 事先定義
  • VLAN ID
  • PVLAN ID

Assigning a Private VLAN to a Distributed Port Group
  • 套用到 port group

-- Class break --


Configuring NetFlow on a Distributed Switch
  • 透過 Port Group 傳資料給 NetFlow Collector
  • Switch IP address
    • 在 vDS 上面設定, 他不是IP, 只是用來讓NetFlow Collector 識別用字串

Port Mirroring
vSS
  • 如果要複製封包, 要啟用 Promiscuous Mode, 來處理, 但是效能會下降
vDS
  • 使用Port Mirroring, 可以指定不同方式複製到指定的 port, 效能較好


Lab 4: Backing Up and Restoring vSphere Distributed
  • 參考 Lab 文件
  • Task 1: Back Up the Distributed Switch Configuration
    • 透過 Settings -- > Export Configuration 來備份
  • Task 2: Prepare to Capture Mirrored Network Traffic
  • Task 3: Configure Port Mirroring on the Distributed Switch
    • 設定 port mirroring, 指定 source and destination port
  • Task 4: Capture Traffic Using Port Mirroring
  • Task 5: Restore the Distributed Switch Configuration

額外練習, 透過 vMA 備份 ESXi 主機
vicfg-cfgbackup  --server  IP或FQDN  -s  存檔檔名

vCenter Backup 想法
  • DB
  • /etc/vmware-vpx/SSL
  • /etc/vmware-vpx/vpxd.cfg

想法上可以分開備份
  • vDS 設定
  • ESXi host profile

透過 vMA 去進行 vicfg-cfgbackup 好處是還原不用經過 vCenter

Module 6 Network Optimization

Lesson 1: Networking Virtualization Concepts

Virtual Network Adapters
  • flexible
    • 32-bits guest OS
    • 內建 driver
    • 模擬 AMD PCnet 網卡
    • 安裝 VMware Tools 後則變成 vmxnet( 虛擬網卡 )
  • E1000
    • 64-bit guest OS
    • 內建 driver
    • 模擬 Intel E1000
    • 安裝 VMware Tools 後則變成 vmxnet( 虛擬網卡 )
  • 建議使用 VMXNET3


About Jumbo Frames
  • A jumbo frame is an Ethernet frame with a bigger MTU, up to 9000 bytes:
    • Reduces the number of frames transmitted
    • Reduces the CPU utilization on the transmit and receive side
  • Virtual machines must be configured with E1000, E1000E, VMXNET2, or VMXNET3 adapters
  • The network must support jumbo frames end to end.

About SplitRx Mode
  • Only support for VMXNET3 network adapters.

Lesson 2: Monitoring Networking I/O Activity

Network Capacity Metrics
  • Dropped network packets indicate a bottleneck in the network.

Lab 5: Monitoring Network Performance
  • 參考 Lab 文件
  • Task 1: Prepare to Monitor Network Performance
  • Task 2: Prepare the Client and Server Virtual Machine
  • Task 3: Measure Network Activity on an ESXi Physical Network
  • Task 4: Use Traffic Shaping to Simulate Network Congestion
    • Traffic Shaping 來限制頻寬很有感覺
  • Task 5: Position the Client and the Server on the Same Port Group
  • Task 6: Restart the Test and Measure Network Activity
    • 同一個主機同一個 Port Group 效能好很多
  • Task 7: Stop the Test and Analyze Results


-- Class End --

沒有留言: