Convert VMDK images into AMI images

amazon-amiamazon-web-servicesconversionimagesvmdk

I have setup and environment for building the virtual machines in vmdk format and then use ec2 api tools to convert, bundle and upload it to the AWS Cloud. However, I am facing certain challenges in that.

  1. Created a virtual machine in vmdk format.
  2. used ec2-bundle-image to crete the image bundle.
  3. used ec2-upload-bundle to upload the bundle.
  4. register the manifest file from aws console.
  5. lauching the instance.

After launching the instance, i am getting the following errors:

 Xen Minimal OS!
  start_info: 0xb10000(VA)
    nr_pages: 0x6a400
  shared_inf: 0x00b9b000(MA)
     pt_base: 0xb13000(VA)
nr_pt_frames: 0x9
    mfn_list: 0x967000(VA)
   mod_start: 0x0(VA)
     mod_len: 0
       flags: 0x0
    cmd_line:  root=/dev/sda1 ro 4
  stack:      0x946780-0x966780
MM: Init
  _text: 0x0(VA)
 _etext: 0x61e65(VA)

   _erodata: 0x76000(VA)
 _edata: 0x7b6d4(VA)
stack start: 0x946780(VA)
       _end: 0x966d34(VA)
  start_pfn: b1f
    max_pfn: 6a400
Mapping memory range 0xc00000 - 0x6a400000
setting 0x0-0x76000 readonly
skipped 0x1000
MM: Initialise page allocator for e6c000(e6c000)-0(6a400000)
MM: done
Demand map pfns at 6a401000-7a401000.
Heap resides at 7a402000-ba402000.
Initialising timer interface
Initialising console ... done.
gnttab_table mapped at 0x6a401000.
Initialising scheduler
Thread "Idle": pointer: 0x7a402008, stack: 0x6a030000
Initialising xenbus
Thread "xenstore": pointer: 0x7a402478, stack: 0x6a040000
Dummy main: start_info=0x966880

Thread "main": pointer: 0x7a4028e8, stack: 0x6a050000
"main" "root=/dev/sda1" "ro" "4" 
vbd 2049 is hd0
******************* BLKFRONT for device/vbd/2049 **********


backend at /local/domain/0/backend/vbd/7502/2049
Failed to read /local/domain/0/backend/vbd/7502/2049/feature-barrier.
Failed to read /local/domain/0/backend/vbd/7502/2049/feature-flush-cache.
2503680 sectors of 0 bytes
**************************
vbd 2050 is hd1
******************* BLKFRONT for device/vbd/2050 **********


backend at /local/domain/0/backend/vbd/7502/2050
Failed to read /local/domain/0/backend/vbd/7502/2050/feature-barrier.
Failed to read /local/domain/0/backend/vbd/7502/2050/feature-flush-cache.
312705024 sectors of 0 bytes
**************************
vbd 2051 is hd2
******************* BLKFRONT for device/vbd/2051 **********


backend at /local/domain/0/backend/vbd/7502/2051
Failed to read /local/domain/0/backend/vbd/7502/2051/feature-barrier.
Failed to read /local/domain/0/backend/vbd/7502/2051/feature-flush-cache.
1835008 sectors of 0 bytes
**************************

[H
[J

GNU GRUB  version 0.97  (1740800K lower / 0K upper memory)



   [ Minimal BASH-like line editing is supported.   For

     the   first   word,  TAB  lists  possible  command

     completions.  Anywhere else TAB lists the possible

     completions of a device/filename. ]




grubdom>                                                                       
    [9;10H

Best Answer

Raju, If you have not done so already, I would refer to the AWS documentation for best practices regarding the VM Import/Export features:

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UsingVirtualMachinesinAmazonEC2.html You will need to use the ec2-import-instance and ec2-import-volume commands to push your VMDK instance and associated volume(s) to AWS.

If you have the luxury of throwing together a quick VMware vCenter host, I recommend doing so - as AWS has a free plugin that can help with this process: http://aws.amazon.com/ec2/vcenter-portal/

Hope that helps!