How to Migrate On-Premises Virtual Machines to AWS?

By Aarav Goel 06-Jun-2022
How to Migrate On-Premises Virtual Machines to AWS?

Virtual Machine has revolutionized Modern App Development. Container App development that burst onto the scene in 2013, is the epilogue of the VM revolution. As an elemental part of Virtualization, VM and containers strive to bring improvement in data center technologies and application development.

The latest innovation in the space of virtualization is Cloud-based VMware. Amazon’s AWS leads the sector with hundreds of features for millions of customers across the globe. From hungry startups to well-established giants, every organization prefers to have cloud-based solutions with on-premises configuration. We will study the migration of On-premises VMware with Amazon Web Services.

 Enquire Now 

What is a Virtual Machine?

Virtual Machines are computers within computers. They are simulations of a modern physical computing system. The VMs are built on a similar architecture as our computers, They provide the functionality and working of our computing systems while running as a software program on top of an emulating software- The hypervisor.

The hypervisor is the underlying software that replicates the function of physical hardware resources with a software environment. This is much more convenient to use in terms of storage management, and memory consumption.

The physical hardware resources are known as host machines, while the Virtual Machines that run on hypervisors (resources) are known as guest machines.

To be able to perform their assigned tasks well, VMs are given certain attributes as guiding light for their functionality. These attributes help VMs perform their directed task. The basic characteristics of VMs are listed below

  • Computing
  • Storage
  • Memory
  • Networking
  • Hardware functionality available as a virtualized system

Virtual machines also contain some system binaries and libraries. These binary files and libraries are required to run the apps on the VMs.

On-Premises Cloud vs Public Cloud Virtual Environment

Organizations develop their apps through Virtual Machines in on-premises or the public cloud. Each version of these private and public clouds offers numerous advantages, and also each has its disadvantages. Let us look at each one of them in detail.

Cost: certain aspects of On-Premises Cloud can be very complex. The licensing fees of On-Premises are relatively simple to calculate. However, all the different choices from different vendors shoot up[ and complexify the cost calculations. Intense use of available resources throughout the project also bits into the users’ budget.

Security: Cloud-based providers are better prepared for security threats than on-premises solutions. It also becomes convenient for the user as cloud-based services come with in-built security options. There have been calls to scrutinize the security of cloud-based solutions and that will only make them more foolproof.

Flexibility: Unlike on-premises solutions, Cloud services such as AWS and Microsoft Azure can extend with simple tweaks and reconfigurations in licensing. These configs can also be removed easily. Companies with seasonal demands prefer this type of flexibility.

From a business perspective, organizations primarily, tech companies focused on building the next best product prefer to start in the cloud. It is just simpler and less redundant.

You May Also Like: What are Microservices - Learn All about Microservice Architecture, Frameworks and Tools

What is AWS?

AWS is one of the cloud-based alternatives to On-Premises VM. It is one of the oldest and most preferred cloud-based solutions in the market. The tech giant boasts of 200 fully-featured services from data centers across the globe.

What sets AWS apart?

AWS or the Amazon Web Services has millions of customers which include up and coming fastest-growing startups, well-established largest enterprises, and conventional and security-first government agencies. AWS is preferred over other services for its lower costs, agile framework, and innovation.

For organizations using cloud-based solutions to their problems have genuine security concerns. AWS is the most flexible and secure virtual environment available in the present times. The core infra of AWS is built with high-end security requirements that meet the demands of high-sensitivity organizations such as the military, global banks, and governments.

The arsenal of AWS is loaded with cloud security tools that include

  • 230 security, compliance, and governance services and features.
  • 90 security standards and compliance certifications,
  • 117 AWS storage services with encryption.

AWS has the most extensive cloud infrastructure. No other cloud service provider offers as many Regions with so many Availability Zones as AWS. These regions are connected to each other by low latency, high throughput, and highly redundant networking.

Amazon Web Services has in total 80 Availability Zones within 25 geographic regions across the world. It has announced 15 more Availability Zones and 5 more AWS Regions in Australia, India, Indonesia, Spain, and Switzerland.

Migrating On-Premises VM to AWS

Migrating to a cloud environment with all the on-premises configuration has always been a concern for the system administrators working in the tech. We will be looking closely at all the steps involved in migrating On-Premises VM to AWS. 

AWS is generally preferred over on premises VM because of the features it provides. With AWS, users always have the latest technologies to experiment and innovate with. This means quicker and efficient processes.

AWS has always been at the forefront when it comes to innovation and experimenting with new technologies that can transform businesses. The 2014 launch of AWS Lambda, which lets developers run their code without managing servers. The machine learning services Amazon SageMaker, provides developers machine learning–without any previous experience.

Establishing the Communication

To assist the merger of on-premises VM to AWS, Amazon has launched a service called Server Migration Service(SMS). The SMS automates the on-premises VM migration to the AWS Cloud.

Automation requires certain conditions to be met. The prerequisite includes connection of users’ data center to their AWS account via AWS Direct Connect. AWS Direct control is similar to VPN(Virtual Private Network). Also, it has a dedicated network to connect on-premises data centers to AWS. Once, the AWS Direct Control is set up, users are to create their AWS IAM roles, and attach policies to them. Let us look at the steps in detail.

  1. Create a fresh and unique IAM user
  2. Attach policy “ServerMigrationConnector” to the created IAM.
  3. Create an IAM role with the name “SMS”
  4. Assign policy name “ServerMigrationServiceRole” to the IAM role.

Setting up the connector for VMware Environment.

  1. Create a vCenter user
  2. Assign permissions to create and delete VM snapshots to be migrated to AWS
  3. Download their delta disks, as explained in the following steps.
    • Datastore -> Browse datastore and Low-level file operations (Datastore.Browse and Datastore.FileManagement)
    • vApp -> Export (VApp.Export)
    • Virtual Machine -> Snapshot management -> Create snapshot and Remove Snapshot(VirtualMachine.State.CreateSnapshot and
    • VirtualMachine.State.RemoveSnapshot)
  • The roles should be assigned as mentioned below
  • * Assign vCenter role to the service account that is used to log in to vCenter.
    • * Assign: Propagating permissions to the datacenters containing the VMs to migrate.

Setting up AWS Account

  1. Login to your AWS account -> Server Migration service
  2. Download SMS Connector (for current version), a pre-configured FreeBSD VM in OVA format and deploy in your vCenter.
  3. Access the connector’s virtual machine console
  4. Log in
    • USERNAME: ec2-user
    • PASSWORD ec2pass.
  1. Obtain the IP address of the connector.
  2. Run the command sudo setup.rb
  3. From the displayed list, select option 2. This will show the current network information and a sub-menu for changes to the network settings.

Configuring Network

  1. Enter option 2 from the list to reconfigure your network menu. This will list a form to enter the network settings: Provide appropriate values and Enter.
  2. You will be redirected to the connector’s network configuration menu, configure the domain suffixes for the DNS suffix search list.
  3. If the environment uses a web proxy to connect to the internet, configure that now. Use ping to verify network access to targets inside and outside your LAN.
  4. In a web browser, go to the connector VM at its IP address (https://ip-address-of-connector/). This opens a setup wizard, Complete it.
  5. Choose Upload logs automatically and Server Migration Connector auto-upgrade.
  6. Choose your region from the AWS Region list.
  7. Enter the IAM user credentials created earlier in the steps. Hit Next.
  8. Allow permissions in the firewall for communicating with AWS SMS.
  9. For vCenter Service Account, enter the vCenter Hostname, Username, and Password. After accepting the vCenter certificate, complete registration and then view the connector configuration dashboard.
  10. Verify that the connector you registered shows up on the Connectors page.

Additional Read: Top 10 Cloud Certifications For 2021

Migrating the VM

Up until now, you have established communication with AWS. Now comes the part where you migrate to an AWS Cloud environment with on-premises configurations. Let us understand how.

  1. Open Server Migration service console.
  2. Choose Connectors from the navigation menu. Make sure that the deployed connector in the VMware environment is healthy.
  3. To obtain the list of servers to migrate, click on the Import server catalog
  4. select Re-import server catalog to verify the new servers added in the VMware environment after the latest import operation
  5. Choose a server to replicate and select Create replication job.
  6. Go to the configure server-specific settings page,
  7. From the License type column, select the license type for AMIs to be created from the replication job.
  8. Linux servers use Bring Your Own License (BYOL). Windows servers use either AWS-provided licenses or BYOL. AWS offers an Auto feature to select the appropriate license by SMS.
  9. Choose a One-time migration option. This will trigger a single replication of the server without scheduling repeating replications.
  10. Choose Start replication run, configure the replication run
  11. Provide name ‘sms’ for IAM service role,
  12. Disable the automatic AMI deletion, as only one server needs to migrate.
  13. Verify the settings and submit.

 Enquire Now 

Associated Course

32 Hours
English
32 Hours
English
32 Hours
English
Aarav Goel

Aarav Goel has top education industry knowledge with 4 years of experience. Being a passionate blogger also does blogging on the technology niche.