Skip to content

Instantly share code, notes, and snippets.

@cwgem
Created February 6, 2013 06:03
Show Gist options
  • Save cwgem/4720692 to your computer and use it in GitHub Desktop.
Save cwgem/4720692 to your computer and use it in GitHub Desktop.
A good way to find PV-GRUB kernel IDs for custom kernel EC2 AMIs
def describe_pvgrub_images()
headers = ["Image ID", "Name", "Description", "Architecture", "Kernel ID"]
values = []
AWS.memoize do
@ec2.images.with_owner('amazon').filter('name', '*grub*').each do | i |
values << [i.id, i.name, i.description, i.architecture, i.kernel_id]
end
end
print_flex_table(headers, values)
end
@cwgem
Copy link
Author

cwgem commented Feb 6, 2013

Sample Output for us-west-2

Image ID     | Name                        | Description                                                             | Architecture | Kernel ID
-----------------------------------------------------------------------------------------------------------------------------------------------
aki-f637bac6 | pv-grub-hd00_1.03-i386.gz   | PV-GRUB release 1.03, 32-bit, configured for (hd0,0)/boot/grub/menu.lst | i386         |          
aki-f837bac8 | pv-grub-hd00_1.03-x86_64.gz | PV-GRUB release 1.03, 64-bit, configured for (hd0,0)/boot/grub/menu.lst | x86_64       |          
aki-fa37baca | pv-grub-hd0_1.03-i386.gz    | PV-GRUB release 1.03, 32-bit, configured for (hd0)/boot/grub/menu.lst   | i386         |          
aki-fc37bacc | pv-grub-hd0_1.03-x86_64.gz  | PV-GRUB release 1.03, 64-bit, configured for (hd0)/boot/grub/menu.lst   | x86_64       | 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment