AWS ec2 import-instance error-No valid partitions. Not a valid volume.[Client error]

3.5k Views Asked by At

I am trying to import a SO VMDK file(OVA/OVF) of Ubuntu server 14.04 to AWS ,But facing the below error

enter image description here,

even though the machine seems to have proper partitioning and volumes

enter image description here.

This happens only in case of Ubuntu server, while Windows server machines are successfully imported.I am trying to import using the ec2-api-tools only.

1

There are 1 best solutions below

0
On

I had similar problem with OVA images exported from VirtualBox. In my case converting it to raw image format worked. So if you are using VirtualBox, import the OVA to it, and then convert VDI storage drive to raw. For example:

VBoxManage clonehd "/mnt/b/VirtualBox VMs/ub.vdi" ./ub.img --format raw

Then you upload ub.img to S3, and use that in your containers.json file for aws ec2 import-image command. For example:

[
  {
    "Description": "My Server OVA",
    "Format": "raw",
    "Url": "s3://<your-s3-bucket>/ub.img"
  }
]

The command:

aws ec2 import-image --description "My server VM" --disk-containers "file:///./containers.json"

and to monitor the import process:

aws ec2 describe-import-image-tasks --import-task-ids <import-id-from-previous-command>