やってみた
2)CloudEndureの管理画面で初期設定
AWSでCloudEndureが提示するポリシーを作成し、専用のIAMにアタッチします
[create policy] -[JSON]
ポリシーは以下の中身をそのまま貼り付けます。
https://docs.cloudendure.com/Content/IAMPolicy.json
(CloudEndure管理画面左ペインの[Stup & Info]-[AWS CREDENTIALS]のThe Project must have these permissionsのリンク先)
専用のIAM Userを作成し、上記ポリシーをアタッチします
UserNmae: CloudEndure
アクセスの種類:プログラムによるアクセス
→アクセスキーが発行されますので、これをCloudEndureに登録しましょう。
CloudEndureの管理画面にサインインします
https://console.cloudendure.com/#/signIn
CloudEndure管理画面左ペインの[Stup & Info]-[AWS CREDENTIALS]でアクセスキーとシークレットアクセスキーを設定します。
CloudEndure管理画面左ペインの[Stup & Info]-[REPRICATION SETTINGS]でレプリケーション設定を行います。
Migration Source:Other Infrastructure
Migration Target:AWS Asia Pacific(Tokyo)
Choose the Replication Server instance type:t3.micro
Choose the subnet where the Replication Servers will be launched:任意のサブネット
上記で[SAVE REPLICATION SETTINGS]
4)レプリケーションの設定(2)移行元にエージェントのインストール
CloudEndure管理画面左ペインの[Machines]-[AddMachines]でAgentインストール用のコマンドが得られます。
For Linux machines
Download the CloudEndure Agent Installer for Linux:
wget -O ./installer_linux.py https://console.cloudendure.com/installer_linux.py
sudo python ./installer_linux.py -t <付与されたトークン> --no-prompt
このコマンドをそのままレプリケーション元のサーバで実行します。
※今回検証時にはEventlogに
agentInstallFailed Failed to install agent on machineエラーが出ました。
cloudendure.logによればgccが入っていなかったのが原因だったので、gccをインストールしています。
※末尾にCentOS5へのgcc追加メモを追記しています。
sudo python ./installer_linux.py -t <Token> --no-prompt
The installation of the CloudEndure Agent has started.
Running the Agent Installer for a 32 bit system...
Connecting to CloudEndure Console... Finished.
Identifying disks for replication.
Disk to replicate identified: /dev/sda of size 20.0 GiB
All disks for replication were successfully identified.
Downloading CloudEndure Agent... Finished.
Installing CloudEndure Agent... Finished.
Adding the Source machine to CloudEndure Console... Finished.
Instance ID: <インスタンスID>.
Installation finished successfully.
上記ログを確認後、EC2に以下のインスタンスが起動していることを確認
インスタンス: i-xxxxxxxxxxxxxxxxxxx (CloudEndure Replication Server conxx)
CloudEndureの管理画面-Machinesで、登録されているマシンの同期が完了するとテストが可能になります(旗が黄色になっています)。
[BLUEPRINT]でインスタンスの構成を定義できます。
MachineType:t3.micro→上記制限のため利用できない(ちゃんとエラーになる)のでt2.microで確定
Launch type:On demand
Subnet:任意
Security Group:任意
Private IP:Create New
EIP:None
PublicIP :Yes
あとはデフォルトで[SAVE BLUEPRINT]
設定したら、テストモードで仮想マシンを移行先で起動します。
[Launchi target machine]-testmode
→この時、AWS上ではコンバーターインスタンスが起動して死んでいく
■Job Progressで進捗確認
Launch Test | Completed Successfully
2020/5/4 17:55:30 Job started
2020/5/4 17:55:30 Started waiting for latest snapshot
2020/5/4 17:56:12 Finished waiting for latest snapshot
2020/5/4 17:56:15 Started cleanup of volume Volume:vol-hogehoge
2020/5/4 17:56:16 Finished cleanup of volume Volume:vol-hogehoge
2020/5/4 17:56:19 Started machine conversions
2020/5/4 17:57:43 Finished machine conversions
2020/5/4 17:58:54 Started creating a replica for instance localhost.localdomain
2020/5/4 18:00:25 Finished creating a replica for instance localhost.localdomain
2020/5/4 18:00:26 Job finished
sshして(このときpemはなくレプリケーション元のOSのログインID/PWでログインすることになる)挙動を確認。
7)後始末
コンソールからターゲットマシンを削除します。
プロジェクト内にターゲットマシンが無くなると、Replication Serverは自動で削除されます。
以上!
■(オマケ)CentOS5にgccを追加したメモ
vi /etc/yum.repos.d/CentOS-Base.repo
baseurlを以下に変更
[base]
baseurl=http://archive.kernel.org/centos-vault/5.9/os/$basearch
[updates]
baseurl=http://archive.kernel.org/centos-vault/5.9/updates/$basearch/
[extras]
baseurl=http://archive.kernel.org/centos-vault/5.9/extras/$basearch/
[centosplus]
baseurl=http://archive.kernel.org/centos-vault/5.9/centosplus/$basearch/
[contrib]
baseurl=http://archive.kernel.org/centos-vault/5.9/contrib/$basearch/
※ここではバージョンを 5.9 としていますが、手順1で確認した CentOS のバージョンを指定してください。
yum install でgcc入れる
yum install gcc c++