Migrating Virtual Machines: why?
In this blog post, we’ll discuss how to migrate your on-premise virtual machines to AWS – focusing mostly on the forklift method – along with key prerequisites and limitations.
Cloud Computing can be described as a metered data center service for running applications at global scale. Instead of having to invest heavily in data centers and physical servers, you can use a cloud computing provider’s servers and only pay for the computing resources you actually consume. Now there’s no need to desperately guess at your future capacity needs: you can access as much or as little as you need, and scale up and down as required. With Cloud Computing, you can easily deploy your application in multiple regions around the world with just a few clicks and provide lower latency and a better experience for your customers at minimal cost. By migrating your application to the cloud you can save on power, cooling, administration, and software licensing costs. Once the move is complete, you’ll be free to concentrate on your application, not on infrastructure
Migrating virtual machines (and the applications they’re running) to the cloud can be cumbersome and complicated unless you use the right tools for the job. Amazon Web Services offers a variety of ways to migrate your applications and servers.
Forklift: the forklift, or Lift&Shift, a method is best suited for moving a legacy application to the cloud. That is, rather than moving single system components over time, you forklift the whole environment, with all its complex dependencies, in one go.
Hybrid migration strategy: Rather than moving the entire server all at once, individual parts of the application can be moved. This can reduce the risk of unexpected behavior after migration and it is ideal for 3 Tier applications.
Leverage the cloud: Redesign the application with AWS in mind. It might cost a bit more up front, but embedding scalable and manageable services like auto-scaling and edge caching of static content can greatly reduce administration activities – and costs – over the long haul.
Migrating Virtual Machines: the Forklift method:
Let’s look at forklifts in detail:
1.Identify VM for Lift & Shift
- Operating systems that can be imported into EC2, Windows: Windows Server 2012 R2 (Standard), Windows Server 2012 (Standard, Datacenter), Windows Server 2008 R2 (Standard, Datacenter, Enterprise),Windows Server 2008 (Standard, Datacenter, Enterprise), Windows Server 2003 R2 (Standard, Datacenter, Enterprise), Windows Server 2003 (Standard, Datacenter, Enterprise) with Service Pack 1 (SP1) or later
- Linux: Linux/Unix (64-bit)- Red Hat Enterprise Linux (RHEL) 5.1-5.10, 6.1-6.5, CentOS 5.1-5.10, 6.1-6.5, Ubuntu 12.04, 12.10, 13.04, 13.10, Debian 6.0.0-6.0.8, 7.0.0-7.2.0 (RHEL 6.0 is unsupported because it lacks the drivers required to run on Amazon EC2).
- Image-Formats Supported: RAW format, VHD, VMDK, (you can only import VMDK files into Amazon EC2 that were created through the OVF export process in VMware).
- Imported Red Hat Enterprise Linux (RHEL) instances must use Cloud Access (BYOL) licenses.
- Imported Linux instances must use 64-bit images. Importing 32-bit Linux images is not supported.
- Expanded disk image of an imported compressed image cannot exceed 1 TB.
- Make sure your VM only uses a single disk. Importing a VM using more than one disk is not supported. For Linux VMs, /boot and / can be located in different partitions, but they need to be on the same disk.
- This method is not recommended for deployments relying on shared storage or very large storage devices.
2.Install the AWS CLI
In order to initiate and manage the migration (import), you’ll need to install the Ec2 CLI tools on the machine where the source images reside. You can refer to AWS documentation for installing CLI tools or view the first video of How to Use the AWS Command-Line Interface course.
3.Migrating virtual machines: prepare your VM
- Uninstall the VMWare Tools from your VMWare VM.
- Disconnect any CD-ROM drives (virtual or physical).
- Set your network to DHCP instead of a static IP address. If you want to assign a static private IP address, be sure to use a non-reserved private IP address in your VPC subnet.
- Shut down your VM before exporting it.
- On Windows, enable Remote Desktop (RDP) for remote access, and on Linux enable SSH server access.
- Allow RDP and SSH access through your host firewall if you have one.
- Use secure passwords for your all user accounts and disable Auto logon on your Windows VM.
- Make sure that your Linux VM uses GRUB (GRUB legacy) or GRUB 2 as its boot loader.
- Make sure that your Linux VM uses one of the following root file systems: EXT2, EXT3, EXT4, Btrfs, JFS, or XFS.
- Export your VM from its virtual environment for VMware and Microsoft Hyper-V.
4.Execute the VM Export
- Use ec2-import-instance to create a new import instance task:
ec2-import-instance disk_image_filename -f file_format -t instance_type -a architecture -b s3_bucket_name -o owner -w secret_key -p platform_name
5.Check the VM import status
- The ec2-describe-conversion-tasks command returns the status of an import task
- Status values include: active, canceling, canceled, and completed
- Check the status of your import task:
6.Start your Ec2 Instance
- Login to your AWS console.
- In the navigation pane, click Instances.
- Note the instance ID from VM import status, right-click the instance, select Instance State, and then click Start.
Migrating virtual machines: conclusion
This is one common scenario for migrating virtual machines to AWS.
Before choosing any particular migration approach, make sure you understand both its prerequisites and limitations…then boldly migrate to the cloud!
Google Cloud Platform Certification: Preparation and Prerequisites
Google Cloud Platform (GCP) has evolved from being a niche player to a serious competitor to Amazon Web Services and Microsoft Azure. In 2019, research firm Gartner placed Google in the Leaders quadrant in its Magic Quadrant for Cloud Infrastructure as a Service for the second consecuti...
New Lab Challenges: Push Your Skills to the Next Level
Build hands-on experience using real accounts on AWS, Azure, Google Cloud Platform, and more Meaningful cloud skills require more than book knowledge. Hands-on experience is required to translate knowledge into real-world results. We see this time and time again in studies about how pe...
New on Cloud Academy: AWS Solution Architect Lab Challenge, Azure Hands-on Labs, Foundation Certificate in Cyber Security, and Much More
Now that Thanksgiving is over and the craziness of Black Friday has died down, it's now time for the busiest season of the year. Whether you're a last-minute shopper or you already have your shopping done, the holidays bring so much more excitement than any other time of year. Since our...
Understanding Enterprise Cloud Migration
What is enterprise cloud migration? Cloud migration is about moving your data, applications, and even infrastructure from your on-premises computers or infrastructure to a virtual pool of on-demand, shared resources that offer compute, storage, and network services at scale. Why d...
6 Reasons Why You Should Get an AWS Certification This Year
In the past decade, the rise of cloud computing has been undeniable. Businesses of all sizes are moving their infrastructure and applications to the cloud. This is partly because the cloud allows businesses and their employees to access important information from just about anywhere. ...
AWS Regions and Availability Zones: The Simplest Explanation You Will Ever Find Around
The basics of AWS Regions and Availability Zones We’re going to treat this article as a sort of AWS 101 — it’ll be a quick primer on AWS Regions and Availability Zones that will be useful for understanding the basics of how AWS infrastructure is organized. We’ll define each section,...
Application Load Balancer vs. Classic Load Balancer
What is an Elastic Load Balancer? This post covers basics of what an Elastic Load Balancer is, and two of its examples: Application Load Balancers and Classic Load Balancers. For additional information — including a comparison that explains Network Load Balancers — check out our post o...
Advantages and Disadvantages of Microservices Architecture
What are microservices? Let's start our discussion by setting a foundation of what microservices are. Microservices are a way of breaking large software projects into loosely coupled modules, which communicate with each other through simple Application Programming Interfaces (APIs). ...
Kubernetes Services: AWS vs. Azure vs. Google Cloud
Kubernetes is a popular open-source container orchestration platform that allows us to deploy and manage multi-container applications at scale. Businesses are rapidly adopting this revolutionary technology to modernize their applications. Cloud service providers — such as Amazon Web Ser...
AWS Internet of Things (IoT): The 3 Services You Need to Know
The Internet of Things (IoT) embeds technology into any physical thing to enable never-before-seen levels of connectivity. IoT is revolutionizing industries and creating many new market opportunities. Cloud services play an important role in enabling deployment of IoT solutions that min...
Which Certifications Should I Get?
As we mentioned in an earlier post, the old AWS slogan, “Cloud is the new normal” is indeed a reality today. Really, cloud has been the new normal for a while now and getting credentials has become an increasingly effective way to quickly showcase your abilities to recruiters and compan...
How to Go Serverless Like a Pro
So, no servers? Yeah, I checked and there are definitely no servers. Well...the cloud service providers do need servers to host and run the code, but we don’t have to worry about it. Which operating system to use, how and when to run the instances, the scalability, and all the arch...