How to move a VSAN Cluster from one vCenter Server to another?

Reference:

http://www.virtuallyghetto.com/2014/09/how-to-move-a-vsan-cluster-from-one-vcenter-server-to-another.html

Prior VSAN 6.6

Step 1 – Deploy a new vCenter Server and create a vSphere Cluster with VSAN Enabled.

Step 2 – Disconnect one of the ESXi hosts from your existing VSAN Cluster and then add that to the VSAN Cluster in your new vCenter Server.

Step 3 – Add the remainder ESXi hosts to the VSAN Cluster in the new vCenter Server.

Step 4 – Re-create each of the VM Storage Policies and re-attach them to the existing Virtual Machines


VSAN 6.6

Step 1 – Deploy a new vCenter Server and create a vSphere Cluster with VSAN Enabled.

Step 2 – Modify the ESXi Advanced Setting

Foreach ($vmhost in (Get-Cluster -Name VSAN-Cluster | Get-VMHost))
{
$vmhost | Get-AdvancedSetting -Name "VSAN.IgnoreClusterMemberListUpdates" | Set-AdvancedSetting -Value 1 -Confirm:$false
}

Step 3 – Add the remainder ESXi hosts to the VSAN Cluster in the new vCenter Server.

Step 4 – Revert the ESXi Advanced Setting

Foreach ($vmhost in (Get-Cluster -Name VSAN-Cluster | Get-VMHost))
{
$vmhost | Get-AdvancedSetting -Name "VSAN.IgnoreClusterMemberListUpdates" | Set-AdvancedSetting -Value 0 -Confirm:$false
}

Step 5 – Re-create each of the VM Storage Policies and re-attach them to the existing Virtual Machines

vCenter Appliance root Partition 100% full due to Audit.log files not being rotated

Reference:

https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2149278

  • 100% capacity used for /dev/sda3.
  • Size of audit.log file is very large
  • /var/log/audit folder consumes majority of the space

Remove the audit.log:

  1. Log in to the vCenter Server Appliance through SSH.
  2. Run this command to enable access the Bash shell:
    shell.set --enabled true

  3. Type shell and press Enter.
  4. Navigate to the /var/log/audit folder with this command:
    cd /var/log/audit
  5. Remove the the audit.log file with this command:
    rm -rf audit.log
  6. Restart all vCenter Server services.

    service-control --stop --all
    service-control --start --all

VMware backup Transport Mode

Reference:

https://pubs.vmware.com/vsphere-50/index.jsp#com.vmware.vddk.pg.doc_50/vddkDataStruct.5.5.html

Virtual Disk Transport Methods

LAN (NBD) Transport

  • Storage applications can uses LAN transport for data access
  • NBD (network block device) or NBDSSL (encrypted)
  • NBD is a Linux-style kernel module that treats storage on a remote host as a block device
  • NBDSSL uses SSL to encrypt all data passed over the TCP/IP connection.

SAN Transport

  • SAN mode requires applications to run on a physical machine (a backup server)
  • This is the fastest transport method for applications deployed on a SAN-connected ESX/ESXi host
  • Reads data directly from the SAN or iSCSI LUN where a virtual disk resides

HotAdd Transport

  • not supported for backing up virtual machines with IDE disks
  • read the linked clone’s virtual disks for backup

Snapshot Format – vmfsSparse

Reference:

vsanSparse Tech Note

vmfsSparse

 

vmfsSparse

  • Commonly referred to as the redo log format
  • Original snapshot format used by VMware

vmfsSparse Snapshot create:

  • A snapshot is taken of a base disk using the redo log format
  • A child delta disk is created
  • The parent is then considered a point-in-time (PIT) copy
  • The running point of the virtual machine is now the delta
  • New writes by the virtual machine go to the delta

vmfsSparse Snapshot delete:

vmfsSparse_delete_snapshot


vmfsSparse Snapshot revert

vmfsSparse_revert_snapshot

Deduplication and Compression in VSAN

Reference:

http://www.yellow-bricks.com/2016/02/10/whats-new-for-virtual-san-6-2/

https://blogs.vmware.com/virtualblocks/2015/08/31/too-soon-nah-vsan-technology-preview/

http://cormachogan.com/2016/02/12/vsan-6-2-part-1-deduplication-and-compression/

https://blogs.vmware.com/vsphere/2016/03/virtual-san-6-2-deduplication-and-compression-deep-dive.html

Requirements:

VSAN 6.2 or later

All-Flash VSAN

VSAN 6.2

deduplication and compression happens during destaging from the caching tier to the deduplication tier

deduplication granularity is 4KB

Data block will only be stored compressed when it can be compressed down to 2KB or smaller

The domain for deduplication is the disk group in each host

Pic 1

Deduplication on VSAN uses the SHA-1 hashing algorithm, creating a “fingerprint” for every data block. This hashing algorithm ensures that no two blocks of data result in the same hash, so that all blocks of data are uniquely hashed. When a new block arrives in, it is hashed and then compared to the existing table of hashes. If it already exists, then there is no need to store this new block. VSAN simply adds a new reference to it. If it does not already exist, a new hash entry is created and the block is persisted.

Another new space-saving technique in VSAN 6.2 is compression. VSAN uses the LZ4 compression mechanism, and it works on 4KB blocks. If a new block is found to be unique, it also goes through compression. If the LZ4 compression manages to reduce the size of the block to less than or equal to 2KB, then the compressed version of the block is persisted to the capacity tier. If compression cannot reduce the size to less than 2KB, then the full-sized block is persisted. We do it this way (deduplication followed by compression) because if the block already exists, then we don’t have to pay the compression penalty for that block.

VSAN Overview

Reference:

https://tsmith.co/2014/vsan-overview/

vmw-vsan

VSAN is a scale out storage solution that utilizes the local storage of the ESXi hosts, and presents a single datastore to the cluster.

What VSAN consists of:

  • ESXi hosts
  • vCenter 5.5
  • VSAN Network – VMkernel port group on 1GB or 10GB (preferred) NICs
  • Disk Groups – a collections of a single SSD and up to 7 HDDs
    • Up to 5 Disk Groups per ESXi host
    • SSD should be at least 10% of HDD capacity in Disk Group
  • HA Cluster
  • Storage Profiles

Setup the Virtual SAN Network

Reference:

https://code.vmware.com/web/dp/vmware-virtual-san-poc-guide

https://blogs.vmware.com/virtualblocks/2017/04/11/goodbye-multicast/

vCenter > Hosts & Clusters > Manage > Networking > Virtual adapters


Click on the icon to add a new virtual adapter (VMkernel Network Adapter)

select a distributed port group called VSAN network that has already been created

 

select Virtual SAN traffic

Remarks:

VMware vSAN in 6.6 will no longer use Multicast. All vSAN traffic will instead use Unicast.

Performance impact when using VMware snapshots

Reference:

http://vmdamentals.com/?p=332

http://up2v.nl/2014/06/12/what-are-the-dangers-of-snapshots-and-how-to-avoid/

https://daemonchild.com/2010/12/15/vsphere-snapshots/

http://blog.dewin.me/2014/05/what-is-buzz-around-backup-from-storage.html

 

Snapshot create:

VMware Snapshot - Active

Original VMDK 會變成 Read Only

Snapshot Log File 會 create, 個 file size 會每 16 MB 咁 growth.

要留意既係如果 read data 既時候, 有可能要 read 晒 2 個 VMDK, 因為有 data 會o係 original VMDK, 亦有 change 既 data o係 snapshot VMDK 度.

 

Snapshot Delete:

VMware Snapshot - Merging

其實 Delete snapshot, 佢首先會 create 另一個 snapshot, 叫 consolidated helper snapshot, 新 change 會寫落 consolidated helper snapshot, 跟住開始將 snapshot merge 落 original VMDK 度.

正常黎講, consolidated helper snapshot 係會細過普通 snapshot, 不停重覆, 直至細到一個程度 (應該係 16 MB 以內) 就會 freeze VM 做 commit 最後一個 consolidated helper snapshot.

 

但假如部 VM 好多 write 既動作, 變成 consolidated helper snapshot 永遠都唔會細….咁個 delete snapshot 動作就會做好耐

VMware VDP / Avamar & Data Domain

Reference:

http://www.rockygiglio.com/tech/backups-suck-so-make-them-easy-vmware-vdp/

vmw-dgrm-vsphere-data-prot-back-emc-lg

VDP 其實同 Avamar 係同一樣野….雖則 VMware 同 EMC 都話兩樣野係唔同….

但如果睇番 Technical document, EMC 既 Avatar 同 VMware 既 VDP Appliance, 內裡既 component 係一模一樣….

o係我角度,我會當佢地係同樣既野.

當 VDP / Avamar 夾埋 Data Domain 一齊用既時候, Data Domain 就會係 backup storage media, 而 metadata 就會 store o係 VDP Appliance / Avamar 度.

VMware Backup (VCB & VADP)

Reference:

https://pubs.vmware.com/vsphere-4-esx-vcenter/index.jsp?topic=/com.vmware.vsphere.intro.doc_40/c_vmware_consolidated_backup.html

https://itzikr.wordpress.com/2012/07/10/emc-networker-8-is-here/

https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1021175

VMware Consolidated Backup (VCB)

VMware vStorage APIs for Data Protection (VADP)

VM take 左個 snapshot 之後, backup proxy server 會 mount 起 original VMDK 去做 backup.

VADP compare with VCB

VMware vSphere Storage APIs – Data Protection
VCB
Requires additional download & install
No, built into the data protection software
Yes
Full virtual machine image backup
Yes, single step copy – source to target
Yes, with two step copy – source to VCB proxy and VCB proxy to the target
Incremental virtual machine image backup
Yes – using change block tracking
No
File level backup
Yes, both Windows and Linux
Yes, Windows only
Full virtual machine image restore
Yes
Yes, by using VMware Converter
Incremental virtual machine image restore
Yes
No
File level restore
Yes, using restore agents
Yes, using restore agents
CLI for image backup
No
Yes
CLI for file backup
Yes
Yes

VMware Fault Tolerance (FT)

Reference:

https://www.pluralsight.com/blog/it-ops/vmware-fault-tolerance

http://virtualkenneth.com/2010/12/13/design-vmware-ft-network-activeactive-or-activepassive/

VMware FT

VMware Fault Tolerance (FT) 同 HA 最大分別就係如果隻 ESXi host 死左, VM 係可以即時做到 Failover, 冇 down time.

要做到即時 failover, 係因為其實有隻 secondary 既 VM 不停 replicate 緊 primary VM, 令到兩隻 VM sync. 當 detect 到 primary VM failed, secondary VM 就會變成 active.

VMware Enhanced vMotion Compatibility (EVC)

Reference:

https://www.vladan.fr/what-is-vmware-enhanced-vmotion-compatibility-evc/

http://download.ithome.com.tw/article/index/id/4425

EVC 允許您在不同代 CPU 之間 VMotion

Enhanced VMotion Compatibility(EVC)就是讓虛擬化環境內虛擬機器使用的CPU處理器可以相容的設定,由於虛擬化環境內,每台ESXi主機的CPU處理器不一定完全都一樣,所以當ESXi主機上的虛擬機器要移轉到其他主機上ESXi主機上時,由於CPU不符,就會無法移轉,有了EVC的功能,就可以讓CPU處理器可以在不同型號的CPU處理器相容,不會因為CPU處理器不同而無法移轉。

cluster level > Select the cluster > VMware EVC > Edit > Chose a radio button

VMware Enhanced vMotion Compatibility EVC

VMkernel TCP/IP Stacks

Reference:

http://www.mindthevirt.com/vmkernel-tcpip-stacks-1080

https://virtualizationreview.com/articles/2015/10/26/configure-multiple-tcpip-stacks-in-vsphere-6.aspx

http://wahlnetwork.com/2016/05/26/vmotion-tcpip-stack-layer-3-vmotion/

3 major TCP/IP stack

One of the primary reasons for creating a separate TCP/IP stack from the default one in many cases is to use a different default gateway

當你需要將 VMware 唔同既 traffic 分開唔同 network 經唔同既 default gateway 走就需要 configure TCP/IP stack

Default TCP/IP stack

Management traffic between ESXi hosts and vCenter server are considered as the default TCP/IP stack. Also, host related traffic like vMotion, NFS/iSCSI storage, HA and vSphere FT are part of it.

vMotion TCP/IP stack

By creating a VMkernel port on the vMotion TCP/IP stack you can isolate vMotion traffic to this stack. By doing so, vMotion traffic will be disabled on the default TCP/IP stack. The vMotion TCP/IP stack is used for live VM migrations.

VMware recommends configuring a separate vMotion TCP/IP stack and isolate management traffic from vMotion traffic.

依個 vMotion TCP/IP stack 係 for Layer 3 vMotion, 原本既 vMotion traffic 只係 Layer 2 only. 要 enable 左 vMotion TCP/IP stack 先可以做到 Layer 3 vMotion.

Provisioning TCP/IP stack

The provisioning TCP/IP stack is used for cold VM migration, cloning and snapshotting traffic. In case of a long-distance vMotion (new in vSphere 6), NFC (network file copy) traffic can be configured to use the provisioning TCP/IP stack. Setting up a provisioning TCP/IP stack is useful when you want to isolate this traffic from other TCP/IP stacks. A dedicated provisioning TCP/IP stack is common in VDI environments and in setups with frequent VM snapshots.

Long Distance VMotion (Cross vCenter vMotion)

Reference:

https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2106949

https://www.vladan.fr/vsphere-6-features-long-distance-vmotion/

vShere 6 Features - vMotion across vCenters

Requirements:

  • A RTT (round-trip time) latency of 150 milliseconds or less, between hosts. (previously 10 ms was necessary)
  • Enterprise Plus license
  • vCenter 6 (both ends)
  • Single SSO domain
  • 250 Mbps network bandwidth per vMotion operation
  • L2 connectivity for VM network (Does not change ip of the VM)

Changes to Snapshot mechanism “Delete All”

Reference:

http://www.yellow-bricks.com/2010/07/05/changes-to-snapshot-mechanism-delete-all/

Old situation (pre vSphere 4 Update 2)

  • Base disk – 15GB
  • Snapshot 1 – 1GB –> possibly grows to 13GB
  • Snapshot 2 – 1GB –> possibly grows to 12GB
  • Snapshot 3 – 1GB –> possibly grows to 11GB
  • Snapshot 4 – 10GB

vSphere 4 U2 或之前, “Delete All" snapshot 既動作係將 Snapshot 4 加到 Snapshot 3, Snapshot 3 加到 Snapshot 2, Snapshot 2 加到 Snapshot 1, 最後 Snapshot 1 加到 Base disk, 之後就 delete snapshot. 但咁樣做就會用左 Total 61GB 既 Snapshot 同 Base disk o係 Delete All 既過程.

New situation

  • Base disk – 15GB
  • Snapshot 1 – 1GB
  • Snapshot 2 – 1GB
  • Snapshot 3 – 1GB
  • Snapshot 4 – 10GB

新既方法,首先會將 Snapshot 1 加到 Base disk, Snapshot 2 加到 Base disk, Snapshot 3 加到 Base disk, Snapshot 4 加到 Base disk. 之後就 Delete snapshot. 最後成個過程都只係用左 28 GB.

在 WordPress.com 建立免費網站或部落格.

向上 ↑

使用 WordPress.com 設計專業網站
立即開始使用