DaaS: Cannot update Machine Profile for the AWS catalog Error Set-prov scheme validation failed. Value cannot be null

book

Article ID: CTX697265

calendar_today

Updated On:

Description

The launch template is created on AWS and used as Machine Profile. It fails with error "Set-prov scheme validation failed. Value cannot be null."  when you add the launch template, while editing machine catalog.

Cause

The master image AMI used for failing catalog is encrypted (with root device name /dev/sdaX which is encrypted) 

The launch template is  “Encrypted” but the root device name  is not matching/missing the AMI’s root device name "/dev/sdaX" in the launch template.

Resolution

Please follow these steps:

1. Review the output of following command from AWS CLI:

aws ec2 describe-images --image-ids <ami-id of the master image>  --query "Images[].{AMI:ImageId,Name:Name,Devices:BlockDeviceMappings}"

2. Note down the snapshot id from above command and check if the Disk is encrypted

3. Get the Launch template id used as Machine Profile and get the version number

4. Review the output of following command from AWS CLI

aws ec2 describe-launch-template-versions --launch-template-id <lt-XXXXXXXXXXXXXXXXX>  --versions <version number of the launch template> --query "LaunchTemplateVersions[].LaunchTemplateData.BlockDeviceMappings"

5. If the output is none "[ ]" then it means the Storage volume <Root device> is not attached to the Launch template

6. Create a new launch template version and select the same KMS Key as per the snap-id for Root device /dev/sdax <from step1>

a. Use this command to get the KMS Key:

aws ec2 describe-snapshots \
    --snapshot-ids <snap-id> \
    --query "Snapshots[0].KmsKeyId" \
    --output text

Note down the arn retrieved 

b. Use the AWS Management Console to create new launch template

1. Open the Amazon EC2 console.
2. Navigate to Launch Templates in the left sidebar and select your template.
3. Click Actions and select Modify template (Create new version).
4. Scroll down to the Storage (Volumes) section.
5. Expand the volume mapped to /dev/sda1.
6. Ensure Advanced settings are visible, check Encrypted, and choose the correct KMS key from the dropdown menu (or paste the ARN retrieved in above step).
7. Click Create template version

7. Go to the affected Machine Catalog in DaaS console and attach the newly created Launch Template 

Issue/Introduction

The launch template is created on AWS and used as Machine Profile. It fails with error "Set-prov scheme validation failed. Value cannot be null."  when you add the launch template, while editing machine catalog.

Additional Information

How to find KMS Key:

https://docs.aws.amazon.com/kms/latest/developerguide/finding-keys.htmlhttps://docs.aws.amazon.com/kms/latest/developerguide/finding-keys.html

Create an AWS EC2 catalogCreate an AWS EC2 catalog

https://docs.citrix.com/us/en/citrix-daas/install-configure/machine-catalogs-create/create-machine-catalog-aws.html