How to enable SAC with Cloud Shell

0

I am unable to take RDP of ec2 instance since it is gone to safe mode with network, is it possible to enable SAC by using AWS CloudShell

1개 답변
0

Hi there,

SAC needs to be enabled within the OS and since Cloudshell is similar to the AWS CLI, I believe you will only be able to make API calls on it. To solve this issue you can use bcdedit utility on the rescue instance and use EC2Rescue to recover your instance to the last know working state. To revert back out of Safe Mode with Network I was able to do that by following the steps below:

Note: Please create a backup of your instance in case something happens :-)  
  1. Open the Amazon EC2 console. Locate and select the affected instance. Choose Instance state option then stop the instance.
  2. Launch a new instance (rescue instance) in the same in the same Availability Zone as the impaired instance.
  3. Detach the volume from the impaired instance.
  4. Attach the volume of impaired instance to a rescue instance as secondary drive (xvdf).
  5. RDP into the rescue instance and bring the drive online from the Disk Management.
  6. Open Command prompt as administrator and run this command:
bcdedit /store D:\boot\bcd /deletevalue safeboot

(replace D with the right drive letter of the impaired disk. You can get that from the Disk Management).

  1. Download EC2Rescue on your rescue instance.
  2. Open the EC2Rescue application and select next. From Select mode window choose Offline instance your secondary disk will show on the list, select it and click next.
  3. Choose restore option on Select Offline Instance Option window then restore from the last known good configuration. The disk will automatically go offline from the disk manager after this.
  4. Detach the volume from the rescue instance and attach it back to the impaired instance as a primary disk (/dev/sda1).
  5. Start the instance. It will boot in normal mode and will be available in few minutes.

You can technically be able to enable Windows SAC (Special Admin Console), which will allow you to boot to safe mode directly using EC2 serial console (for Nitro instances) . By connecting to the instance's serial console and using SAC, you can interrupt the boot process and boot Windows in safe mode.

[1] Use SAC to troubleshoot your Windows instance: https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/troubleshooting-sac.html

[2] Configure access to the EC2 Serial Console: https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/configure-access-to-serial-console.html

[3] Using EC2Rescue to troubleshoot Amazon EC2 windows: https://aws.amazon.com/premiumsupport/knowledge-center/ec2rescue-windows-troubleshoot/

Cebi
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠