0

How do I launch paravirtual AMI from EC2 instance? I get only HVM not paravirtual.

Please let me know how to do it on Ubuntu.

I looked at http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html

But I want to know how to launch it from console without command line.

1 Answers1

0

You can't get PV AMI from hvm ec2 instance! Because they just using different virtualization types.

But you can convert it.

Amazon EC2: how to convert an existing PV AMI to HVM

it showing how to convert pv ami to hvm ami. But its similiar with your question.


Update*

Now your instance type is hvm. (And i think it is ubuntu) And here is the step (i just edited) to get pv from it. (If you have more than 2 server then note servers' анд volumes' id to prevent make mistake)

  1. Start an Ubuntu PV linux, any version, new
  2. Start an Ubuntu HVM linux, and install grub packages on them: sudo apt-get install grub-pc grub-pc-bin grub-legacy-ec2 grub-gfxpayload-lists (if already installed thats ok)
  3. Stop HVM linux
  4. Detach root (/dev/sda1) partition at HVM linux
  5. Attach HVM linux root partition to running PV linux somewhere, e.g.: /dev/sdf
  6. On PV linux: sudo mkdir -p /mnt/xvdf && sudo mount /dev/xvdf /mnt/xvdf
  7. sudo rsync -avzXA /boot/ /mnt/xvdf/boot/
  8. sudo mount -o bind /dev /mnt/xvdf/dev && sudo mount -o bind /dev/pts /mnt/xvdf/dev/pts && sudo mount -o bind /proc /mnt/xvdf/proc && sudo mount -o bind /sys /mnt/xvdf/sys
  9. chroot /mnt/xvdf
  10. grub-install --no-floppy --recheck --force /dev/xvdf
  11. update-grub2
  12. exit chroot: CTRL+D
  13. stop PV Linux
  14. detach /dev/sda1 original root AND detach /dev/sdf HVM root
  15. attach HVM root to PV linux as /dev/sda1
  16. Start PV linux, voilà!
  17. Create a new AMI image from the running PV linux, it will be PV virtualized.

Doing all process takes around 40 minutes.

Community
  • 1
  • 1
Bagi
  • 181
  • 2
  • 13
  • 1
    What instance type do i need then? –  Nov 19 '14 at 12:12
  • If your server is new and you just want pv ami then it will require pv virtualized instance. You can do it with create new instance. On first step (choose amazon machine image) you can scroll down to bottom and choose Ubuntu Server 14.04 LTS (PV), SSD Volume Type and continue to fill rest of important informations. This will create PV machine. After instance is ready to use, you can create ami from it anytime. – Bagi Nov 20 '14 at 03:24