MIGRATE WINDOWS VM FROM HYPER-V TO AWS
In this blog, we will show you the Migrate Windows VM from Hyper-V to AWS
ENVIRONMENT OVERVIEW
- We have installed Hyper-V Role on windows 2016 server in our Lab environment.
- Also, we have created an external V-switch which will provide internet access to the Hyper-V VMs.
DOWNLOAD AND INSTALL SMS CONNECTOR
- Open the web browser and download the SMS connector from the below URL.
https://s3.amazonaws.com/sms-connector/AWS-SMS-Connector-for-SCVMM-HyperV.zip
- Extract the files to the desired drive.
IMPORT SMS CONNECTOR VM IN HYPER-V
- Open the Hyper-V snap-in and click on the Import Virtual Machine.
- A new popup window will show up. Click Next to continue.
- Provide the SMS connector folder which we extracted earlier.
- Select the Virtual Machine from the list.
- Select the Copy the virtual machine (create a new unique ID) option.
- You can choose the different file location to store the VHD files or leave defaults.
- Select the correct external virtual switch from the drop-down list.
- Review the settings and click on the Finish button.
CONFIGURING AWS SMS CONNECTOR
- Power on the SMS Connector VM.
- After a few seconds, the system will prompt for login credentials.
- Type the username as ec2-user and password as ec2pass.
- Run the sudo setup.rb command to display the configuration menu. Type ec2pass as a password when it prompts.
- Type 2 to reconfigure the network settings on this VM.
- Again type 2 to setup static IP.
- Provide the IP information for this VM.
- IP has been configured successfully.
INSTALLING HYPER-V CONFIGURATION SCRIPT
- Download the Hyper-V Configuration script from this URL https://s3.amazonaws.com/sms-connector/aws-sms-hyperv-setup.ps1 and save it in a folder.
- Open the PowerShell window and type the below command to verify the MD5 Hash.
Get-FileHash aws-sms-hyperv-setup.ps1 -Algorithm MD5
- Use the below command to validate the SHA256.
Get-FileHash aws-sms-hyperv-setup.ps1 -Algorithm SHA256
- Download the below files and compare the above MD5 and SHA256 values.
https://s3.amazonaws.com/sms-connector/aws-sms-hyperv-setup.ps1.md5
https://s3.amazonaws.com/sms-connector/aws-sms-hyperv-setup.ps1.sha256
- Also, we need to check the digital signature of aws-sms-hyperv-setup.ps1 file and make sure it’s signed for AWS.
- We set the execution policy to unrestricted in our demo environment to execute the PowerShell Scripts.
set-executionpolicy unrestricted
- Now, execute the aws-sms-hyperv-setup.ps1 file. We select the option 1 as per our Lab environment.
- Provide the IP address of the SMS connector VM.
- Provide the username which has administrator permission for Hyper-V. Also, allow the script to make changes in windows system configuration.
- Script completed successfully.
CONFIGURING HYPER-V SMS CONNECTOR
- Browse the AWS SWS Connector VM IP through a web browser. Click on Get started now.
- Review the License Agreement and click Next.
- Provide a password for the management console.
- Verify the network configuration information.
- In the Log Log Uploads and Upgrades page, select Upload logs automatically & AWS Server Migration Service auto-upgrade checkboxes.
- Select the region where our migrated VMs to be located.
- For AWS credentials, we have created a new user and its members of ServerMigrationConnector & ServerMigrationServiceRole roles.
- Provide Access & Secret key of that server in the relevant section.
- You can create a new Access & Key through the IAM console. Go to users section and click on the specified username the switch to security credentials.
- You can create a new access key by clicking the create button.
- Choose the VM Manager Type.
- Provide the Hyper-V Host login credentials.
- Then type the IP of Hyper-V Host and Click on the Verify cert button.
- It will popup a new window, click on the Trust button.
- Make sure that you have selected Ignore Minor Errors
- AWS SMS connector configuration completed successfully.
CREATING IAM ROLE FOR SMS
- Open AWS console and search for the IAM service.
- Then click on Roles – Create Role option.
- Select the SMS service and move to the permission page.
- Make sure that Server Migration Service Role has been added to the list.
- We leave the tags as default.
- Provide a name and description for this role and click on Create Role.
- The new role created successfully.
MIGRATE WINDOWS VM HYPER-V TO AWS
- Go to Server Migration Service (SMS) and click on the connectors link.
- You will able to see our connector appliance that was installed in our on-premises environment.
- Click on the Import server catalog to get the list of VMs which are available in the Hyper-V host.
- After a few seconds, you will get the list of available VMs in your on-prem environment.
- Select the server to migrate to AWS and click on Create Replication Job.
- Desire the License type from the drop-down list and click Next.
- Select the Replication Job Type & Start replication run settings based on your requirements.
- Provide the IAM role name which we created earlier and click on Next.
- Click on the create button to start the Migration process.
- Once the migration is completed, a new AMI will be available under the images section.
REFERENCE
https://docs.aws.amazon.com/server-migration-service/latest/userguide/HyperV.html
Thanks for reading this blog. We hope it was useful for you to learn the steps to migrate Windows VM from Hyper-V to AWS.