Repository navigation
(2024.04 ‐ 2024.04.02) Linux virtual desktop may be stuck in the "RESUMING" status on reboot
Junbo Liang edited this page Jun 10, 2024
·
1 revision
Linux virtual desktops can get stuck in "RESUMING" status when restarting up after a manual or scheduled stop.
After the instance is rebooted, AWS Systems Manager doesn’t run any remote commands for creating a new DCV session and the following log message is missing in the vdc-controller CloudWatch logs (under the <environment-name>/vdc/controller CloudWatch log group):
Handling message of type DCV_HOST_REBOOT_COMPLETE_EVENT
2024.04 - 2024.04.02
For recovering the virtual desktops that are stuck in the “RESUMING” state:
- SSH into the problem instance from the EC2 console.
- Run the following commands on the instance:
sudo su -
/bin/bash /root/bootstrap/latest/virtual-desktop-host-linux/configure_post_reboot.sh
sudo reboot
- Wait for the instance to reboot.
For preventing new virtual desktops from running into the same issue:
- Download patch.py and vdi_stuck_in_resuming_status.patch by replacing
<output-directory>with the directory to download the patch script and patch file in the command below:- The patch only applies to RES 2024.04.02.
- The patch script requires AWS CLI v2, Python 3.9.16 or above, and Boto3.
- Configure the AWS CLI for the account / region where RES is deployed, and make sure that you have S3 permissions to write to the bucket created by RES.
OUTPUT_DIRECTORY=<output-directory>
curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.04.02/patch_scripts/patch.py --output ${OUTPUT_DIRECTORY}/patch.py
curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.04.02/patch_scripts/patches/vdi_stuck_in_resuming_status.patch --output ${OUTPUT_DIRECTORY}/vdi_stuck_in_resuming_status.patch
- Navigate to the directory where the patch script and patch file are downloaded. Run the following patch command:
python3 patch.py --environment-name <environment-name> --res-version 2024.04.02 --module virtual-desktop-controller --patch vdi_stuck_in_resuming_status.patch --region <aws-region>
- Restart the VDC Controller instance for your environment by replacing
<environment-name>with the name of your RES environment in the commands below:
ENVIRONMENT_NAME=<environment-name>
INSTANCE_ID=$(aws ec2 describe-instances \
--filters \
Name=tag:Name,Values=${ENVIRONMENT_NAME}-vdc-controller \
Name=tag:res:EnvironmentName,Values=${ENVIRONMENT_NAME}\
--query "Reservations[0].Instances[0].InstanceId" \
--output text)
aws ec2 terminate-instances --instance-ids ${INSTANCE_ID}