Amazon EC2: how to convert an existing PV AMI to HVM -
Amazon EC2: how to convert an existing PV AMI to HVM -
question:
how should utilize new aws ec2 classes (r3, i2) existing ami without recreating whole scheme setup?
the new ec2 classes back upwards hvm based virtualization have pvm ami images.
answer:
start ubuntu hvm linux, version, new
start ubuntu / existing ami / pvm linux, , install grub packages on them: apt-get install grub-pc grub-pc-bin grub-legacy-ec2 grub-gfxpayload-lists
stop pvm linux
detach root (/dev/sda1) partition @ pvm linux
attach pvm linux root partition running hvm linux somewhere, e.g.: /dev/sdf
on hvm linux: mkdir -p /mnt/xvdf && mount /dev/xvdf /mnt/xvdf
rsync -avzxa /boot/ /mnt/xvdf/boot/
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
chroot /mnt/xvdf
grub-install --no-floppy --recheck --force /dev/xvdf
update-grub2
exit chroot: ctrl+d
stop hvm linux
detach /dev/sda1 original root , detach /dev/sdf pvm root
attach pvm root hvm linux /dev/sda1
start hvm linux, voilĂ !
create new ami image running hvm linux, hvm virtualized.
amazon-web-services amazon-ec2 ami
Comments
Post a Comment