1. Navigate back to AWS MGN console and select the Source Server, then Launch settings, and click on Modify.
2. By default the AWS MGN is launching the test and cutover instance in the default VPC and subnet in the region. Therefore, these steps are required in order to launch the EC2 instance in the designated VPC, subnet, and security group.
a. Template version description: Enter the template description.
b. Instance type: select the instance type.
c. Key pair: (optional) select key pair for the login securely after launch. Make sure you have access to the key before selecting one or create a new pair.
d. Network settings: select Virtual Private Cloud (VPC). Do not select security group. The security group will be selected under the Network interface.
e. Storage: By default, this shows the migrated boot volume. Under the disk you can change the Volume type, the maximum number of IOPS supported. You can not change the Size, since this disk will be created from a snapshot of the migrated disk.
f. Resource tags: Keep the generated tags or enter your own customized tags.
Under Network Interface:
g. Subnet: Select launch subnet.
h. Security group: select security group, make sure that security group and subnet are under the same VPC.
i. Auto-assign public IP: (Optional) for easy access during testing the migration assign public IP. Or opt-out and use jump box or bastion machines.
2. Under Advance details, scroll down and copy the bash script below in paste it into User data. Make sure to enter the required variables in green at the beginning of the script. The script applies the best practice configuration for iSCSi and Multipath. Also provisions the data volume from Everpure Cloud Dedicated by creating a host, cloning the replicated snapshot, and connect the volume to the host.
This script works for Linux Ubuntu. Windows and other Linux distributions will be added soon. See Appendix Afor more information.
#!/bin/bash
# VARIABLES
CBS_MNGMT_IP=<enter-cbs-management-ip> # i.e CBS_MNGMT_IP=172.23.2.180
SNAPSHOT=<enter-snapshot-name> # i.e SNAPSHOT=flasharray-m20-1:cbs-aws-migration-policy.3.vvol-Linux-ubuntu/Data-a2e2d086
DATA_VOLUME_PATH=<enter-mount-path> # i.e DATA_VOLUME_PATH=/mnt/data
sudo apt -y install git
sudo git clone https://github.com/PureStorage-OpenConnect/cloudblockstore-scripts.git
sudo chmod 700 /cloudblockstore-scripts/linux-migration/ubuntu-post-migration.sh
sudo sh /cloudblockstore-scripts/linux-migration/ubuntu-post-migration.sh $CBS_MNGMT_IP $SNAPSHOT $DATA_VOLUME_PATH > /tmp/pure-post-migration.log 2>&1
3. Modifying the template won't change the current "default" version. In order to change it, navigate to EC2 console, under Launch Templates select the created template by MGN, (you can go back to the AWS MGN to verify the launch template ID is matching). Click on Actions and then Set default version.
4. Select the launch template from the list using the description name that has been entered in the previous step.
Step 2: