Troubleshooting VM Import/Export
When importing or exporting a VM, most errors occur when you attempt to do something that isn't supported. To avoid these errors, read VM Import/Export Prerequisites before you begin an import or an export.
Errors
- AWS Error Code: InvalidParameter, AWS Error Message: Parameter disk-image-size=0 has an invalid format.
- Client.NotExportable: Only imported instances can be exported. (Service: AmazonEC2; Status Code: 400; Error Code: NotExportable; Request ID: <RequestID>).
- Client.Unsupported: No bootable partition found. (Service: AmazonEC2; Status Code: 400; Error Code: Unsupported; Request ID: <RequestID>)
- Client.UnsupportedOperation: This instance has multiple volumes attached. Please remove additional volumes.
- ClientError: Booter Networking failure/instance not reachable. Please retry after installation of .Net framework 3.5 SP1 or greater.
- ClientError: Footers not identical
- ClientError: Invalid configuration - Could not read fstab.
- ClientError: Uncompressed data has invalid length.
- ClientError: Unsupported configuration: Multiple directories found.
- ERROR: Bucket <MyBucketName> is not in the <RegionName> region, it's in <RegionName>.
- ERROR: File uses unsupported compression algorithm 0.
- Error starting instances: Invalid value <instance ID> for instanceId. Instance does not have a volume attached at root (/dev/sda1).
- Invalid S3 source location
- java.lang.OutOfMemoryError: Java heap space
- Service.InternalError: An internal error has occurred. Status Code: 500, AWS Service: AmazonEC2
- A client error (MalformedPolicyDocument) occurred when calling the CreateRole operation: Syntax errors in policy.
- The given S3 bucket is not local to the region.
- The service role <vmimport> does not exist or does not have sufficient permissions for the service to continue.
- FirstBootFailure: This import request failed because the Windows instance failed to boot and establish network connectivity.
- Linux is not supported on the requested instance
AWS Error Code: InvalidParameter, AWS Error Message: Parameter disk-image-size=0 has an invalid format.
The image format you used is not supported.
Resolution
Retry using one of the supported image formats: RAW, VHD, or VMDK.
Client.NotExportable: Only imported instances can
be exported. (Service: AmazonEC2; Status Code: 400; Error Code: NotExportable;
Request ID: <RequestID>).
You can only export an instance or an image that you previously imported into Amazon EC2.
Resolution
Export an instance or image that you previously imported into Amazon EC2.
Client.Unsupported: No bootable partition found.
(Service: AmazonEC2; Status Code: 400; Error Code: Unsupported; Request ID:
<RequestID>)
The VM has a root volume that is GUID Partition Table (GPT) partitioned.
Resolution
GPT partitioned volumes are not supported by the VM Import/Export tools. Convert your VM's root volume to an MBR partition and then try importing the VM again.
Client.UnsupportedOperation: This instance has multiple volumes attached. Please remove additional volumes.
The VM has multiple attached disks.
Resolution
Detach the extra drives and try again. If you need the data on the other volumes, copy the data to the root volume and try to export the VM again.
ClientError: Booter Networking failure/instance not reachable. Please retry after installation of .Net framework 3.5 SP1 or greater.
Windows VMs require the Microsoft .NET Framework 3.5 Service Pack 1 or later to support the EC2 Config Service.
Resolution
Install the Microsoft .NET Framework 3.5 Service Pack 1 or later on your Windows VM before you attempt to import it.
ClientError: Footers not identical
You attempted to import a differencing VHD, or there was an error in creating the VHD.
Resolution
Export your VM again and retry importing it into Amazon EC2.
ClientError: Invalid configuration - Could not read fstab.
Linux VMs with multi-boot volumes or multiple /etc directories are not supported.
Resolution
Configure your VM to have only one boot volume or /etc directory.
ClientError: Uncompressed data has invalid length.
The VMDK file is corrupted.
Resolution
You can try repairing or recreating the VMDK file, or use another one for your import.
ClientError: Unsupported configuration: Multiple directories found.
Linux VMs with multi-boot volumes or multiple /etc directories are not supported.
Resolution
Configure your VM to have only one boot volume or /etc directory.
ERROR: Bucket
<MyBucketName> is not in the
<RegionName> region, it's in
<RegionName>.
The Amazon S3 bucket is not in the same region as the instance you want to import.
Resolution
Try adding the --ignore-region-affinity option, which ignores
whether the bucket's region matches the region where the import task is created.
You can also create an Amazon S3 bucket using the Amazon Simple Storage Service console and set the region
to the region where you want to import the VM. Run the command again and specify
the new bucket you just created.
ERROR: File uses unsupported compression algorithm 0.
The VMDK was created using OVA format instead of OVF format.
Resolution
Create the VMDK in OVF format.
Error starting instances: Invalid value
<instance ID> for instanceId. Instance does not
have a volume attached at root (/dev/sda1).
You attempted to start the instance before the VM import process and all conversion tasks were complete.
Resolution
Wait for the VM import process and all conversion tasks to completely finish, and then start the instance.
Invalid S3 source location
The command syntax or Amazon S3 bucket name is incorrect.
Resolution
Create a new Amazon S3 bucket in the appropriate region solely for VM Import and upload the VM files to the root of the bucket.
java.lang.OutOfMemoryError: Java heap space
There is not enough virtual memory available to launch Java, or the image you are trying to import is too large.
Resolution
If you allocate extra memory to Java, the extra memory will only apply to JVM, but if that setting is specified (explicitly for the EC2 command line tools) it will override the global settings. For example, you can use the following command to allocate 512 MB of extra memory to Java 'set EC2_JVM_ARGS=-Xmx512m'.
Service.InternalError: An internal error has occurred. Status Code: 500, AWS Service: AmazonEC2
You tried to import an instance that does not have a default VPC without specifying the subnet and Availability Zone.
Resolution
If you're importing an instance without a default VPC, be sure to specify the subnet and Availability Zone.
A client error (MalformedPolicyDocument) occurred when calling the CreateRole operation: Syntax errors in policy.
You forgot to include file:// before the policy document name.
Resolution
Include file:// before the policy document name (e.g., file://trust-policy.json).
The given S3 bucket is not local to the region.
The Amazon S3 Bucket used for VM Import must reside in the same AWS region where you want to import the VM.
Resolution
Create the S3 bucket in the region where you want to import your VM.
The service role <vmimport> does not exist or does not have sufficient permissions for the service to continue.
The VM import service role is missing or incorrect. You may also receive this error if the IAM user trying to start the import does not have sufficient privileges to Amazon EC2 resources.
Resolution
Ensure that the service role exists and that it has all of the appropriate permissions.
FirstBootFailure: This import request failed because the Windows instance failed to boot and establish network connectivity.
When you import a VM using the ec2-import-instance command, the
import task might stop before its completed, and then fail. To investigate what went
wrong, you can use the ec2-describe-conversion-tasks command to describe the instance.
When you receive the FirstBootFailure error message, it means that your virtual disk image was unable to perform one of the following steps:
Boot up and start Windows.
Install Amazon EC2 networking and disk drivers.
Use a DHCP-configured network interface to retrieve an IP address.
Activate Windows using the Amazon EC2 Windows volume license.
The following best practices can help you to avoid Windows first boot failures:
Disable anti-virus and anti-spyware software and firewalls. These types of software can prevent installing new Windows services or drivers or prevent unknown binaries from running. Software and firewalls can be re-enabled after importing.
Do not harden your operating system. Security configurations, sometimes called hardening, can prevent unattended installation of Amazon EC2 drivers. There are numerous Windows configuration settings that can prevent import. These settings can be reapplied once imported.
Disable or delete multiple bootable partitions. If your virtual machine boots and requires you to choose which boot partition to use, the import may fail.
This inability of the virtual disk image to boot up and establish network connectivity could be due to any of the following causes.
Causes
TCP/IP networking and DHCP are not enabled
Cause: For any Amazon EC2 instance, including those in Amazon VPC, TCP/IP networking and DHCP must be enabled. Within a VPC, you can define an IP address for the instance either before or after importing the instance. Do not set a static IP address before exporting the instance.
Resolution: Ensure that TCP/IP networking is enabled. For more information, see Setting up TCP/IP (Windows Server 2003) or Configuring TCP/IP (Windows Server 2008) at the Microsoft TechNet website.
Ensure that DHCP is enabled. For more information, see What is DHCP at the Microsoft TechNet web site.
A volume that Windows requires is missing from the virtual machine
Cause: Importing a VM into Amazon EC2 only imports
the boot disk, all other disks must be detached and Windows must able to boot
before importing the virtual machine. For example, Active Directory often stores
the Active Directory database on the D:\ drive. A domain controller
cannot boot if the Active Directory database is missing or inaccessible.
Resolution: Detach any secondary and network disks attached to the Windows VM before exporting.
Move any Active Directory databases from secondary drives or partitions onto the primary Windows partition. For more information, see "Directory Services cannot start" error message when you start your Windows-based or SBS-based domain controller at the Microsoft Support website.
Windows always boots into System Recovery Options
Cause: Windows can boot into System Recovery Options for a variety of reasons, including when Windows is pulled into a virtualized environment from a physical machine, also known as P2V.
Resolution: Ensure that Windows boots to a login prompt before exporting and preparing for import.
Do not import virtualized Windows instances that have come from a physical machine.
The virtual machine was created using a physical-to-virtual (P2V) conversion process
Cause: A P2V conversion occurs when a disk image is created by performing the Windows installation process on a physical machine and then importing a copy of that Windows installation into a VM. VMs that are created as the result of a P2V conversion are not supported by Amazon EC2 VM import. Amazon EC2 VM import only supports Windows images that were natively installed inside the source VM.
Resolution: Install Windows in a virtualized environment and migrate your installed software to that new VM.
Windows activation fails
Cause: During boot, Windows will detect a change of hardware and attempt activation. During the import process we attempt to switch the licensing mechanism in Windows to a volume license provided by Amazon Web Services. However, if the Windows activation process does not succeed, then the import will not succeed.
Resolution: Ensure that the version of Windows you are importing supports volume licensing. Beta or preview versions of Windows might not.
No bootable partition found
Cause: During the import process of a virtual machine, we could not find the boot partition.
Resolution: Ensure that the disk you are importing has the boot partition. We do not support multi-disk import.
Linux is not supported on the requested instance
Cause: Linux import is only supported on specific instance types. You attempted to import an unsupported instance type.
Resolution: Retry using one of the supported instance types. Microsoft Windows BYOL instances must be launched as a dedicated instances or dedicated hosts for Microsoft Windows, and therefore cannot use the t2 instance type because it doesn't support dedicated instances.
General purpose:
t2.micro|t2.small|t2.medium|m3.medium|m3.large|m3.xlarge|m3.2xlargeCompute optimized:
c3.large|c3.xlarge|c3.2xlarge|c3.4xlarge|C3.8xlarge|cc1.4xlargeMemory optimized:
r3.large|r3.xlarge|r3.2xlarge|r3.4xlarge|r3.8xlargeStorage optimized:
i2.xlarge|i2.2xlarge|i2.4xlarge|i2.8xlarge

