AWS t1.micro to t2.micro migration could be a challenge.
And more when you are a beginner.
Must Read: AWS Migration in 5 Super Easy Steps
Why Is It Not Easy To Migrate From t1.micro to t2.micro?
Normally, we launch a new instance from AMI. This AMI is created from the snapshot which is taken from the existing instance. Thereafter, the migration part is done smoothing.
However, the process is not the same with different virtualization types.
- T1.micro: Paravirtualization or PV
- T2.micro: Hardware Virtual Machine or HVM
Therefore, before we begin to the migration steps, here are the prerequisites:
- You need to be a root user to execute the commands. Use “: sudo su.”
- Make sure they are in the same availability zone. Mixing the availability zone increases the workload.
Looking for Managed AWS?
T1.Micro to T2.Micro Migration: Steps
Now that you are armed, here’s a step-by-step method for upgrading an Ubuntu PV t1.micro instance:
#1 Start Ubuntu PV machine with AMI of existing PV t1.micro instance.
#2 Spin a new HVM instance.
#3 Install Grub packages
Apt-get install grub-pc grub-pc-bin grub-legacy-ec2 grub-gfxpayload-lists
#4 Shut down PV Linux.
#5 Detach: Root partition of PV – sda1
#6 On running HVM, attach PV sda1 in the name of sdf
#7 On HVM – Make directory
mkdir -p /mnt/xvdf && mount /dev/xvdf /mnt/xvdf
#8 Resync – Copy data from HVM sda to sdf : rsync -avzXA /boot/ /mnt/xvdf/boot/
#9 Mount data
mount -o bind /dev /mnt/xvdf/dev && mount -o bind /dev/pts /mnt/xvdf/dev/pts && mount -o bind /proc /mnt/xvdf/proc && mount -o bind /sys /mnt/xvdf/sys
#10 Chroot /mnt/xvdf
You May Also Like: DigitalOcean vs AWS EC2
#11 Install Grub
grub-install –no-floppy –recheck –force /dev/xvdf
#12 Update Grub : update-grub2
#13 Exit chroot: CTRL+D
#14 Stop HVM
#15 Detach both EBS (/dev/sda and /dev/sdf)
#16 Attach dev/sdf as HVM dev/sda
#17 Run HVM Linux on t2.micro
#18 Now you can create an image on t2.micro which will now be HVM.
Still having trouble in migration? Talk to our experts to ease that load.