Skip to content

License type conversion failed (Ubuntu Pro) - Potential bug

0

Hi Everyone I have been converting some Ubuntu machines to Ubuntu Pro using AWS license type conversion. This is working for most EC2 instances but some have failed.

One particular EC2 instance failed with the following error message: EC2 instance i-123456789 failed to start. Ensure that you have permissions for EC2 StartInstances. Note that the IAM role for this machine has the following policies attached so there should be no issues from an SSM agent point of view:

  • AmazonSSMManagedInstanceCore
  • AmazonSSMPatchAssociation

I tried manually starting the instance from the EC2 page and it failed complaining about capacity reservation. I removed the capacity reservation and the machine started. I then switched it off so I could try the license type conversion again but now the machine does not appear in the list of machines which can be converted. It feels like AWS now thinks the machine has already been converted but its hasn’t.

Has anyone else found this? I think it’s a bug.

asked 10 months ago239 views

3 Answers
0

This issue appears to be related to several factors that can cause license type conversion failures in AWS License Manager.

First, the error message indicates that the instance failed to start after the conversion process. While you have the necessary SSM permissions, the license conversion process requires specific EC2 permissions as well, particularly ec2:StartInstances and ec2:StopInstances. These permissions need to be granted to the user or role performing the conversion, not just to the instance's IAM role.

The capacity reservation issue you encountered when manually starting the instance is likely what caused the initial conversion failure. License Manager needs to be able to stop and start the instance during the conversion process, and any constraints that prevent this (like capacity reservation issues) will cause the conversion to fail.

As for why the instance no longer appears in the list of machines eligible for conversion, there are a few possible explanations:

  1. The instance must be in a stopped state before conversion.
  2. The instance must be running Ubuntu LTS to be eligible for conversion to Ubuntu Pro.
  3. Stop protection might be enabled on the instance, which would prevent the conversion process.
  4. The instance must have outbound internet access to retrieve a license token from Canonical servers.

Additionally, if the system believes a conversion task is still in progress or was partially completed, it might not show the instance as eligible for another conversion attempt.

To resolve this issue, you could try:

  1. Ensure the instance is completely stopped
  2. Verify stop protection is disabled
  3. Confirm the instance has the required outbound internet access
  4. Check that you have all the necessary permissions for license conversion (beyond just the SSM permissions)

If these steps don't resolve the issue, it could indeed be a bug in the License Manager service, and contacting AWS Support would be the next appropriate step.
Sources
Troubleshooting license type conversion in License Manager - AWS License Manager
Convert a license type for Linux in License Manager - AWS License Manager
Conversion prerequisites for License Manager license types - AWS License Manager
Eligible subscription types for Linux in License Manager - AWS License Manager

answered 10 months ago

0

What looks to have happened is that AWS thinks the machine has been converted to Ubuntu Pro. That’s why the machine does not appear in the list of machines to convert. This command proves that: aws ec2 describe-instances --instance-ids i-123456789 --query "Reservations[].Instances[].{InstanceId: InstanceId, PlatformDetails: PlatformDetails, UsageOperation: UsageOperation}" But SSHing into the machine and running sudo pro status shows its not licensed. I’m going to try rolling the machine back to an earlier backup.

answered 10 months ago

0

Rolling back has worked but I would not count it as a solution. I was just lucky that I had a backup to rollback. There is a definite bug or weirdness when it comes to license upgrades and capacity reservations.

answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.