

# Convert a license type in License Manager
<a name="conversion-procedures"></a>

You can convert Windows licenses, Microsoft SQL Server licenses, and Ubuntu Linux subscriptions using the License Manager console or AWS CLI. You might need to complete additional steps to convert the license or subscription in the operating system of the instance.

You can convert license types using the License Manager console or the AWS CLI. When you create a license type conversion, License Manager validates the billing products on your instance. If these preliminary validations are successful, License Manager creates a license type conversion. You can check the status of a license type conversion by using the `list-license-conversion-tasks` and ` get-license-conversion-task` AWS CLI commands.

License Manager might update the resources associated with your self-managed licenses as part of a license type conversion. Specifically, for any self-managed license with automated discovery rules of type `License Included`, License Manager disassociates the resource in the license type conversion from the license if the `license included` automated discovery rule explicitly excludes the resource.

For example, if your self-managed license contains two automated discovery rules, and each rule excludes license-included Windows Server, then a license type conversion from BYOL to license included Windows Server results in disassociation of the instance from the self-managed license. However, if only one of the two automated discovery rules contains a `License Included` rule, then the instance is not disassociated.

You should not start or stop your instance while a license type conversion is in progress. When the license type conversion succeeds, its status changes from `IN_PROGRESS` to `SUCCEEDED`. If License Manager encounters issues during the workflow, it updates the status of the license type conversion to `FAILED`, and updates the status message with an error message.

**Note**  
The billing product information on the AMI used to launch an instance does not change when you convert the license type. To retrieve accurate billing information, use the Amazon EC2 [https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html) API. Additionally, if you have existing workflows that search for billing information from AMIs, update those workflows to use `DescribeInstances`.

**Contents**
+ [

# Convert a license type for Windows and SQL Server in License Manager
](conversion-procedures-windows.md)
  + [

## License type conversion limits
](conversion-procedures-windows.md#conversion-limits)
  + [

## Convert a license type using the License Manager console
](conversion-procedures-windows.md#conversion-console)
  + [

## Convert a license type using the AWS CLI
](conversion-procedures-windows.md#conversion-cli)
+ [

# Convert a license type for Linux in License Manager
](conversion-procedures-linux.md)
  + [

## Convert a license type using the License Manager console
](conversion-procedures-linux.md#convert-license-type-console-linux)
  + [

## Convert a license type using the AWS CLI
](conversion-procedures-linux.md#convert-license-type-cli-linux)
    + [

### Supported conversions for Red Hat
](conversion-procedures-linux.md#rhel-li-conversions)
      + [

#### Convert from RHEL for SAP with HA and Update Services (Sold by AWS in AWS Marketplace) to RHEL for SAP with HA and Update Services (Sold by Red Hat in AWS Marketplace)
](conversion-procedures-linux.md#rhel-sap-aws-to-redhat)
      + [

#### Convert from RHEL for SAP with HA and Update Services (Sold by AWS in AWS Marketplace) to Red Hat Subscriptions (Sold by Red Hat in AWS Marketplace)
](conversion-procedures-linux.md#rhel-sap-aws-to-saas)
      + [

#### Convert from Red Hat License-Included (LI) to RHEL (Sold by Red Hat in AWS Marketplace)
](conversion-procedures-linux.md#rhel-li-to-marketplace)
      + [

#### Convert from Red Hat Enterprise Linux (RHEL) for AWS to Red Hat License-Included (LI)
](conversion-procedures-linux.md#rhel-aws-to-li)
    + [

### Convert from Red Hat Subscriptions (Sold by Red Hat in AWS Marketplace) to Red Hat License-Included (LI)
](conversion-procedures-linux.md#rhel-saas-to-li)
    + [

### Other requirements
](conversion-procedures-linux.md#rhel-other-requirements)
    + [

### Convert to Ubuntu Pro
](conversion-procedures-linux.md#ubuntu-li-conversions)
  + [

## Remove a Ubuntu Pro subscription
](conversion-procedures-linux.md#remove-subscription-ubuntu-pro)

# Convert a license type for Windows and SQL Server in License Manager
<a name="conversion-procedures-windows"></a>

You can use either the License Manager Console or the AWS CLI to convert the license type of eligible Windows and SQL Server instances.

**Topics**
+ [

## License type conversion limits
](#conversion-limits)
+ [

## Convert a license type using the License Manager console
](#conversion-console)
+ [

## Convert a license type using the AWS CLI
](#conversion-cli)

## License type conversion limits
<a name="conversion-limits"></a>

**Important**  
The use of Microsoft software is subject to the licensing terms of Microsoft. You are responsible for complying with Microsoft licensing terms. This documentation is provided for convenience, and you are not entitled to rely on its description. This documentation does not constitute legal advice. If you have questions about your licensing rights to Microsoft software, consult with your legal team, Microsoft, or your Microsoft reseller.

License Manager restricts the types of license conversions that you can create in accordance with the Microsoft Service Provider License Agreement (SPLA). Some of the restrictions that license type conversion is subject to are listed as follows. This is not a comprehensive list and is subject to change.
+ The Amazon EC2 instance must be launched from your own virtual machine (VM) image.
+ License-included SQL Server cannot be run on a Dedicated Host.
+ A license-included SQL Server instance must have at least 4 vCPUs.

## Convert a license type using the License Manager console
<a name="conversion-console"></a>

You can use the License Manager console to convert a license type.

**Note**  
Only instances that are in a stopped state and have been associated by AWS Systems Manager Inventory are displayed.

**To start a license type conversion in the console**

1. Open the License Manager console at [ https://console.aws.amazon.com/license-manager/ ](https://console.aws.amazon.com/license-manager/).

1. From the left navigation pane, choose **License type conversion**, then choose **Create license type conversion**.

1. For **Source operating system**, choose the platform of the instance you want to convert:
   + **RHEL**
   + **RHEL for SAP**
   + **Ubuntu LTS**
   + **Windows BYOL**
   + **Windows license included**

1. (Optional) Filter the available instances by specifying a value for **Instance ID** or **Usage operation value**.

1. Select the instances whose licenses you want to convert, and then choose **Next**.

1. Enter the **Usage operation value** for the license type, select the license that you are converting to, and choose **Next**.

1. Verify that you are satisfied with your license type conversion configuration and choose **Start conversion**.

You can view the status of your license type conversion from the license type conversion panel. The Conversion status column displays the status of the conversion as **In progress**, **Completed**, or **Failed**.

**Important**  
If you convert Windows Server from license included to BYOL, you must activate Windows according to your Microsoft license agreement. See [Convert Windows Server from license included to BYOL](#convert-to-byol) for more information.

## Convert a license type using the AWS CLI
<a name="conversion-cli"></a>

To start a license type conversion in the AWS CLI:

**Determine the license type of your instance**

1. Verify that you have installed and set up the AWS CLI. For more information, see [Installing, updating, and uninstalling the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html) and [Configuring the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html).
**Important**  
You might need to update the AWS CLI to run certain commands and receive all required output in the following steps.

1. Verify that you have permissions to run the `create-license-conversion-task-for-resource` AWS CLI command. For help with this, see [Create IAM policies for License Manager](identity-access-management.md#iam-policy-examples).

1. To determine the license type currently associated with your instance, run the following AWS CLI command. Replace the instance ID with the ID of the instance for which you want to determine the license type.

   ```
   aws ec2 describe-instances --instance-ids <instance-id> --query "Reservations[*].Instances[*].{InstanceId: InstanceId, PlatformDetails: PlatformDetails, ProductCode: ProductCode, UsageOperation: UsageOperation, UsageOperationUpdateTime: UsageOperationUpdateTime}"
   ```

1. The following is an example response to the `describe-instances` command. Note that the `UsageOperation` value is the billing information code associated with the license. The `UsageOperationUpdateTime` is the time when the billing code was updated. For more information, see [https://docs.aws.amazon.com//AWSEC2/latest/APIReference/API_DescribeInstances.html](https://docs.aws.amazon.com//AWSEC2/latest/APIReference/API_DescribeInstances.html) in the *Amazon EC2 API reference*.

   ```
   "InstanceId": "i-0123456789abcdef",
   "Platform details": "Windows with SQL Server Enterprise",
   "UsageOperation": "RunInstances:0800",
   "UsageOperationUpdateTime: "2021-08-16T21:16:16.000Z"
   ```

**Note**  
The usage operation for Windows Server with SQL Server Enterprise BYOL is the same as the usage operation for Windows BYOL because they are identically billed.<a name="convert-to-byol"></a>

**Convert Windows Server from license included to BYOL**

When you convert Windows Server from license included to BYOL, License Manager does not automatically activate Windows. You must switch the KMS server for your instance from the AWS KMS server to your own KMS server.
**Important**  
In order to convert from license included to BYOL, the original Amazon EC2 instance must be launched from your own virtual machine (VM) image. For more information about converting a VM to Amazon EC2, see [VM Import/Export](https://docs.aws.amazon.com//vm-import/latest/userguide/vmimport-image-import.html#import-vm-image). Instances that were originally launched from an Amazon Machine Image (AMI) are not eligible for license conversion to BYOL.

Check your Microsoft license agreement to determine what methods you can use to activate Microsoft Windows Server. For example, if you are using a KMS server, you must obtain the address of your KMS server from the original BYOL configuration of the instance.

1. To convert the license type of your instance, run the following command, replacing the ARN with the ARN of the instance you want to convert:

   ```
   aws license-manager create-license-conversion-task-for-resource \
   	--resource-arn <instance_arn> \
   	--source-license-context UsageOperation=RunInstances:0002 \
   	--destination-license-context UsageOperation=RunInstances:0800
   ```

1. To activate Windows after you convert your license, you must point the Windows Server KMS server for your operating system to your own KMS servers. Log in to the Windows instance and run the following command:

   ```
   slmgr.vbs /skms <your-kms-address>
   ```

**Convert Windows Server from BYOL to license included**  
When you convert Windows Server from BYOL to license included, License Manager automatically switches the KMS server for your instance to the AWS KMS server. 

To convert the license type of your instance from BYOL to license included, run the following command, replacing the ARN with the ARN of the instance you want to convert:

```
aws license-manager create-license-conversion-task-for-resource \
	--resource-arn <instance_arn> \
	--source-license-context UsageOperation=RunInstances:0800 \
	--destination-license-context UsageOperation=RunInstances:0002
```

**Convert both Windows Server and SQL Server from BYOL to license included**  
You can switch multiple products at the same time. For example, you can convert both Windows Server and SQL Server in one license type conversion. 

To convert the license type of your Windows Server instance from BYOL to license included, and SQL Server Standard from BYOL to license included, run the following command, replacing the ARN with the ARN of the instance you want to convert:

```
aws license-manager create-license-conversion-task-for-resource \
	--resource-arn <instance_arn> \
	--source-license-context UsageOperation=RunInstances:0800 \
	--destination-license-context UsageOperation=RunInstances:0006
```

# Convert a license type for Linux in License Manager
<a name="conversion-procedures-linux"></a>

You can use either the License Manager Console or the AWS CLI to convert the license type of eligible Ubuntu LTS, RHEL, and RHEL for SAP instances.

**Topics**
+ [

## Convert a license type using the License Manager console
](#convert-license-type-console-linux)
+ [

## Convert a license type using the AWS CLI
](#convert-license-type-cli-linux)
+ [

## Remove a Ubuntu Pro subscription
](#remove-subscription-ubuntu-pro)

## Convert a license type using the License Manager console
<a name="convert-license-type-console-linux"></a>

You can use the License Manager console to convert a license type.

**Note**  
Only instances that are in a stopped state and have been associated by AWS Systems Manager Inventory are displayed.

**To start a license type conversion in the console**

1. Open the License Manager console at [ https://console.aws.amazon.com/license-manager/ ](https://console.aws.amazon.com/license-manager/).

1. From the left navigation pane, choose **License type conversion**, then choose **Create license type conversion**.

1. For **Source operating system**, choose the platform of the instance you want to convert:
   + **RHEL**
   + **RHEL for SAP**
   + **Ubuntu LTS**
   + **Windows BYOL**
   + **Windows license included**

1. (Optional) Filter the available instances by specifying a value for **Instance ID** or **Usage operation value**.

1. Select the instances whose licenses you want to convert, and then choose **Next**.

1. Enter the **Usage operation value** for the license type, select the license that you are converting to, and choose **Next**.

1. Verify that you are satisfied with your license type conversion configuration and choose **Start conversion**.

You can view the status of your license type conversion from the license type conversion panel. The Conversion status column displays the status of the conversion as **In progress**, **Completed**, or **Failed**.

## Convert a license type using the AWS CLI
<a name="convert-license-type-cli-linux"></a>

To start a license type conversion in the AWS CLI, you should confirm the license type of your instance is eligible, and then perform a license type conversion to change to the required subscription. For more information on eligible subscription types, see [Eligible subscription types for Linux in License Manager](conversion-types-linux.md).

**Determine the license type of your instance**  
Verify that you have installed and set up the AWS CLI. For more information, see Installing, updating, and uninstalling the AWS CLI and Configuring the AWS CLI.

**Important**  
You might need to update the AWS CLI to run certain commands and receive all required output in the following steps. Verify that you have permissions to run the `create-license-conversion-task-for-resource` AWS CLI command. For more information, see [Create IAM policies for License Manager](identity-access-management.md#iam-policy-examples).

To determine the license type currently associated with your instance, run the following AWS CLI command. Replace the instance ID with the ID of the instance for which you want to determine the license type:

```
aws ec2 describe-instances --instance-ids <instance-id> --query "Reservations[*].Instances[*].{InstanceId: InstanceId, PlatformDetails: PlatformDetails, UsageOperation: UsageOperation, UsageOperationUpdateTime: UsageOperationUpdateTime}"
```

The following is an example response to the `describe-instances` command. The **UsageOperation** value is the billing information code associated with the license. A usage operation value of `RunInstances` indicates that the instance is using AWS provided licensing. The `UsageOperationUpdateTime` is the time when the billing code was updated. For more information, see [https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html) in the *Amazon EC2 API Reference*.

```
"InstanceId": "i-0123456789abcdef",
"Platform details": "Linux/UNIX",
"UsageOperation": "RunInstances",
"UsageOperationUpdateTime: "2021-08-16T21:16:16.000Z"
```

### Supported conversions for Red Hat
<a name="rhel-li-conversions"></a>

The following conversions are supported for Red Hat Enterprise Linux (RHEL) products. Each conversion requires specific source and destination license contexts and may have additional requirements.

#### Convert from RHEL for SAP with HA and Update Services (Sold by AWS in AWS Marketplace) to RHEL for SAP with HA and Update Services (Sold by Red Hat in AWS Marketplace)
<a name="rhel-sap-aws-to-redhat"></a>

Example CLI command:

```
aws license-manager create-license-conversion-task-for-resource \
  --resource-arn <instance_arn> \
  --source-license-context "UsageOperation=RunInstances:0010,ProductCodes=[{ProductCodeType=marketplace,ProductCodeId=<source_product_code_id>}]" \
  --destination-license-context "UsageOperation=RunInstances:00g0,ProductCodes=[{ProductCodeType=marketplace,ProductCodeId=<destination_product_code_id>}]"
```

Notes:
+ RHEL for SAP with HA and Update Services (Sold by AWS in AWS Marketplace) has many different product code IDs (a.k.a. Marketplace code) depending your AWS Marketplace product subscription. Please check EC2 describe-instances response for the correct product code ID on your instances.
+ RHEL for SAP with HA and Update Services (Sold by Red Hat in AWS Marketplace) has two different product code IDs: du6111oq9lwrc996awt04qyql (NA & Global) and 952qwcsxkm430zxhpy32i7w8g (EMEA). Which you should use depends on your region. Please check your RHEL for SAP with HA and Update Services subscription in Marketplace to find out which one it is.

Once converted, you cannot convert the instance back to RHEL for SAP with HA and Update Services (Sold by AWS in AWS Marketplace), unless you are allowlisted for this private feature, which requires a Support request. For more information, see [Creating a support case](https://docs.aws.amazon.com/awssupport/latest/user/case-management.html#creating-a-support-case).

#### Convert from RHEL for SAP with HA and Update Services (Sold by AWS in AWS Marketplace) to Red Hat Subscriptions (Sold by Red Hat in AWS Marketplace)
<a name="rhel-sap-aws-to-saas"></a>

Red Hat Subscriptions (Sold by Red Hat in AWS Marketplace) refers to the SaaS subscriptions that customers can purchase from AWS Marketplace. There are also two listings at this moment.

Example CLI command:

```
aws license-manager create-license-conversion-task-for-resource \
  --resource-arn <instance_arn> \
  --source-license-context "UsageOperation=RunInstances:0010,ProductCodes=[{ProductCodeType=marketplace,ProductCodeId=<source_product_code_id>}]" \
  --destination-license-context "UsageOperation=RunInstances:00g0"
```

Notes:
+ RHEL for SAP with HA and Update Services (Sold by AWS in AWS Marketplace) has many different product code IDs (a.k.a. Marketplace code) depending your AWS Marketplace product subscription. Please check EC2 describe-instances response for the correct product code ID on your instances.
+ Red Hat Subscriptions (Sold by Red Hat in AWS Marketplace) do not have a product code to add to the instances.
  + Explanations: SaaS product product codes are not attached to EC2 instances, so customers are expected to not include a destination product code when invoking the create-license-conversion-task-for-resource CLI command.

Once converted, you cannot convert the instance back to RHEL for SAP with HA and Update Services (Sold by AWS in AWS Marketplace), unless you are allowlisted for this private feature, which requires a Support request. For more information, see [Creating a support case](https://docs.aws.amazon.com/awssupport/latest/user/case-management.html#creating-a-support-case).

#### Convert from Red Hat License-Included (LI) to RHEL (Sold by Red Hat in AWS Marketplace)
<a name="rhel-li-to-marketplace"></a>

Example CLI command:

```
aws license-manager create-license-conversion-task-for-resource \
  --resource-arn <instance_arn> \
  --source-license-context "UsageOperation=RunInstances:0010" \
  --destination-license-context "UsageOperation=RunInstances:00g0,ProductCodes=[{ProductCodeType=marketplace,ProductCodeId=<destination_product_code_id>}]"
```

Notes:
+ RHEL (Sold by Red Hat in AWS Marketplace) has two different product code IDs: 6cd5fxzrad0cu2j23p692xytz (NA & Global) and 6t1yup6mik9ng3ge36n33xqhw (EMEA). Which you should use depends on your region. Please check your RHEL for SAP with HA and Update Services subscription in Marketplace to find out which one it is.

#### Convert from Red Hat Enterprise Linux (RHEL) for AWS to Red Hat License-Included (LI)
<a name="rhel-aws-to-li"></a>

Example CLI command:

```
aws license-manager create-license-conversion-task-for-resource \
  --resource-arn <instance_arn> \
  --source-license-context "UsageOperation=RunInstances,ProductCodes=[{ProductCodeType=marketplace,ProductCodeId=<source_product_code_id>}]" \
  --destination-license-context "UsageOperation=RunInstances:0010"
```

Or this one:

```
aws license-manager create-license-conversion-task-for-resource \
  --resource-arn <instance_arn> \
  --source-license-context "UsageOperation=RunInstances:00g0,ProductCodes=[{ProductCodeType=marketplace,ProductCodeId=<source_product_code_id>}]" \
  --destination-license-context "UsageOperation=RunInstances:0010"
```

Notes:
+ Red Hat Enterprise Linux (RHEL) for AWS has two different product code IDs: 6cd5fxzrad0cu2j23p692xytz (NA & Global) and 6t1yup6mik9ng3ge36n33xqhw (EMEA). Which you should use depends on your region. Please check EC2 describe-instances response for the correct product code ID on your instances.
+ Red Hat Enterprise Linux (RHEL) for AWS instances may have usage operation RunInstances or RunInstances:00g0. This depends on whether the instances were originally launched from a Red Hat Enterprise Linux (RHEL) for AWS product AMI or they were later converted into this subscription. Please check EC2 describe-instances response for the correct usage operation on your instances.

Example CLI command:

```
aws license-manager create-license-conversion-task-for-resource \
  --resource-arn <instance_arn> \
  --source-license-context "UsageOperation=RunInstances:0010" \
  --destination-license-context "UsageOperation=RunInstances:00g0"
```

Notes:
+ Red Hat Subscriptions (Sold by Red Hat in AWS Marketplace) do not have a product code to add to the instances.
  + Explanations: SaaS product product codes are not attached to EC2 instances, so customers are expected to not include a destination product code when invoking the create-license-conversion-task-for-resource CLI command.
+ Red Hat Subscriptions (Sold by Red Hat in AWS Marketplace) must be subscribed to by the caller of the CLI command. Subscriptions in other accounts in the same organization are not supported yet.

### Convert from Red Hat Subscriptions (Sold by Red Hat in AWS Marketplace) to Red Hat License-Included (LI)
<a name="rhel-saas-to-li"></a>

Example CLI command:

```
aws license-manager create-license-conversion-task-for-resource \
  --resource-arn <instance_arn> \
  --source-license-context "UsageOperation=RunInstances:00g0" \
  --destination-license-context "UsageOperation=RunInstances:0010"
```

Notes:
+ Red Hat Subscriptions (Sold by Red Hat in AWS Marketplace) do not have a product code that is added to the instances.

### Other requirements
<a name="rhel-other-requirements"></a>

Instances must be in stopped state before creating their license conversion tasks. Customers should not try to start or terminate the instances before the license conversion tasks complete or fail. This is the same requirement for all license type conversions.

If the destination is one of these Marketplace products:
+ RHEL for SAP with HA and Update Services (Sold by Red Hat in AWS Marketplace)
+ RHEL (Sold by Red Hat in AWS Marketplace)
+ Red Hat Subscriptions (Sold by Red Hat in AWS Marketplace)

Then the customer must have an active subscription in Marketplace before invoking the CLI command. Otherwise, the conversion request might be rejected or might fail. Unlike in Console, when creating license conversion tasks from CLI, License Manager does not try to automatically subscribe customers to destination products.

### Convert to Ubuntu Pro
<a name="ubuntu-li-conversions"></a>

Before you convert your instance from Ubuntu LTS to Ubuntu Pro, your instance must have outbound internet access configured to retrieve a license token from the Canonical servers and install the Ubuntu Pro Client. For more information, see [Conversion prerequisites for License Manager license types](conversion-prerequisites.md).

To convert Ubuntu LTS to Ubuntu Pro, follow these steps:

1. Run the following command from the AWS CLI while specifying your instance’s ARN:

   ```
   aws license-manager create-license-conversion-task-for-resource \
       --resource-arn <instance_arn> \
       --source-license-context UsageOperation=RunInstances \
       --destination-license-context UsageOperation=RunInstances:0g00
   ```

1. Run the following command from within the instance to retrieve details about your Ubuntu Pro subscription status:

   ```
   pro status
   ```

1. Confirm your output indicates that the instance has a valid Ubuntu Pro subscription:  
![\[Example output of the Ubuntu pro command with an active Ubuntu Pro subscription.\]](http://docs.aws.amazon.com/license-manager/latest/userguide/images/ubuntu-pro-conversion-output-valid.png)

## Remove a Ubuntu Pro subscription
<a name="remove-subscription-ubuntu-pro"></a>

License type conversion can only be used to convert from Ubuntu LTS to Ubuntu Pro. If you need to convert from Ubuntu Pro to Ubuntu LTS, you will need to raise a request to Support. For more information, see [Creating a support case](https://docs.aws.amazon.com/awssupport/latest/user/case-management.html#creating-a-support-case).