VM Migration with HCX + PowerCLI

日本語は下のほうに

 

Congratulation!

Yuta Watanabe, NBA player, contracted  Toronto Raptors in April 19.

https://www.nba.com/raptors/raptors-sign-watanabe-standard-nba-contract

He continued his tireless efforts grabbed a standard contract.

 

 

Let me introduce VM migrations @VMC on AWS.

I have engaged VMC on AWS service for 2 years.

 

VMC on AWS does not have to design, just deploy and consume it.

But customer have to design connecting on premise and VMC, and VM migration.

I have to tell VMC on AWS environment. Mostly network connection for them.

And how to migrate VMs from on premise to VMC on AWS.

I mean design element still remains on VMC.

 

I propose HCX for customer having on premise and VMC environment.

HCX is powerful tool not only extend Layer2 but for VM migration.

I would like to refer VM migration with HCX in this article.

 

Customer select cold, bulk, vMotion and Replication-Assisted vMotion(RAV) for their VM migration with HCX 4.0.

They can migrate easily from HCX GUI.

If they have more than 100 VMs, it is hard to migrate without any mistake in a certain period.

We recommend using PowerCLI in the case.

Anyone can use PowerCLI for HCX migration.

 

Please see following links.

https://vdc-repo.vmware.com/vmwb-repository/dcr-public/557aee4d-26f9-4810-bc12-b1cf22401c8f/ca9f89cf-cdea-4e9c-9e50-f214cf902c1b/doc/New-HCXNetworkMapping.html

 

https://vmusketeers.com/2020/01/06/hcx-powercli-scripts/

 

I confirmed it on PowerCLI 12.3, SDDC 1.14, HCX 4.0.1 and vSphere7 environment.

It worked.

 

RAV is new migration type on VMC on AWS.

You can select RAV with "-migrationType RAV".

 

VMC uses vSAN for the storage, you need add "-DiskProvisionType Thin".

RAV migration requires "-ScheduleStartTime" and "-ScheduleEndTime".

 

Let me show on my lab experience.

 

> Connect-HCXServer -server hcx01.corp.local -user administrator@xxxx -Password XXXXXX -force

 

Server                         User                         

------                         ----                         

hcx01.corp.local               administrator@vsphere.local  

 

You also have to connect HCX@VMC on AWS.

 

> get-hcxvm

 

Name                                               PowerState Id         

----                                               ---------- --         

yVM3                                               PoweredOn vm-20032   

yVM4                                               PoweredOn vm-26001   

yVM5                                               PoweredOn vm-26002   

 

> Get-HCXNetwork

 

Name                                             Type                         Id            

----                                                       ----                         --            

mgmt-app-network                        OpaqueNetwork                network-o23   

VMOTION                                       OpaqueNetwork                network-o28   

sddc-cgw-network-1                      OpaqueNetwork                network-o29   

mgmt-ls                                          OpaqueNetwork                network-o30   

VSAN                                              OpaqueNetwork                network-o35   

direct-connect-ls                            OpaqueNetwork                network-o34   

L2E_VM_Network22-RP2-22-94f187f3-1473668478                OpaqueNetwork                network-o1050 

L2E_VM_Network22-RP2-22-94f187f3-1473668478                NsxtSegment                  /infra/tier-...

MA-VMW-VMotion                        Network                      network-1039  

DistributedVirtualPortgroup  dvportgroup-...

vMotion1                                                   DistributedVirtualPortgroup  dvportgroup-...

VM Network22-RP2                                           DistributedVirtualPortgroup  dvportgroup-...

 <SNIP>

 

VM Migration

Syntax

Get-HCXMigration [-EntityId <String>] [-MigrationType {vMotion | Bulk | Cold | RAV | OsAssistedMigration}] [-NumberOfMigration <Int32>] [-Server <HcxServer>] [-State {MIGRATED | MIGRATE_CANCELED | MIGRATE_FAILED | MIGRATING}] [-Username <String>] [<CommonParameters>]

 

<https://vdc-repo.vmware.com/vmwb-repository/dcr-public/6bd6daa3-08a8-4660-9159-23265b9d6c00/4d533cf0-f009-4fa0-8679-8d505fbe846b/doc/Get-HCXMigration.html>

 

Syntax

Start-HCXMigration [-Migration] <HCXMigration> [-Confirm] [-Server <HcxServer[]>] [-WhatIf] [<CommonParameters>]

 

<https://vdc-repo.vmware.com/vmwb-repository/dcr-public/6bd6daa3-08a8-4660-9159-23265b9d6c00/4d533cf0-f009-4fa0-8679-8d505fbe846b/doc/Start-HCXMigration.html>

 

 

日本語はここから

渡辺雄太さんがトロントラプターズとの本契約を勝ち取りました。

おめでとうございます。

 

ディフェンス、リバウンド、3ptには定評がありましたが、最近のプレーではドリブルでのペネトレートからのシュート、パスが冴えわたってきています。

 

トロントは2019年にも優勝したチームであり、選手層が厚いために彼は短い時間の出場となっていますが、その中で成果を出し続けてきたことへの評価だと思います。

 

このサイトを読んでジーンときてしまいました。

https://www.theplayerstribune.com/jp/posts/basketball-nba-Yuta-watanabe-raptors-kotobanochikara

 

さて、本題のHCXは、Cold, Bulk, vMotion, RAV と、多くの移行パターンが選べるようになって、HCX 4.0はさらに使い易くなっています。

 

HCX + PowerCLIですが、リンク先のmuketeerのサイトにもある通り、完動します。

GUIからでも勿論移行は出来ましたが、設定すべきオプションが多いので、移行台数が多いケースではPowerCLIをお薦めします。

CSVファイルから読み込む形にすれば、さらに操作は容易になるでしょう。

 

最後まで読んでいただき、ありがとうございました。