400 error when using "Replace root volume"

0

When I try to use the "Replace root volume" feature and I choose the snaphot option, nothing happens, but the browser dev console shows a 400 error for the POST request to: https://us-east-1.console.aws.amazon.com/ec2/alma/ec2-proxy?module=compute-react&call=CreateReplaceRootVolumeTask

Is this is known bug at the moment?

In case it helps, the current root volume is unencrypted and I am trying to replace it with an encrypted snapshot - any chance that is related?

Adrian
질문됨 9달 전696회 조회
3개 답변
1
수락된 답변

Your understanding is right, here is how you'd do it:

  1. Create snapshot of the root volume that is attached to instance
  2. Create a copy of snapshot with encrypting enabled
  3. Create a new Encrypted volume from an encrypted snapshot
  4. Detach the existing volume and replace it with the Encrypted volume -> Instance needs to be shutdown before this step.

Hope this helps.

Comment here if you have additional questions, happy to help.

Abhishek

profile pictureAWS
전문가
답변함 9달 전
profile pictureAWS
전문가
iBehr
검토됨 9달 전
0

Thanks @secondabhi_aws - I did already try that, but the detaching of the existing volume failed (silently), presumably because it's the root volume and the instance was still running. To avoid the need to shut down the instance, I thought I'd try the replace root volume option. But it seems like I will need to shut it down before I can detach the existing root volume, attach the new encrypted one and then restart the instance. But, you don't mention the need to shut it down, so wondering if there is a way to replace it without the shutdown. I understand logistically why this is likely not possible, but the lack of useful error messages in the AWS dashboard is pretty awful in my opinion.

Adrian
답변함 9달 전
  • Yes absolutely, instance needs to be shut down while detaching and attaching the root volume as otherwise it would not let you to do the same. I have updated my answer as well and mentioned this explicitly. I presumed it that you'd shutdown while detaching/attaching the volume. :)

0

I just checked the Network > Response tab and it has:

Invalid snapshot for root volume for virt i-xxxxxxxxxxxxxxxxx. The snapshot should be of one of the root volumes attached to the instance in the past

So I guess my first comment is why is that error hidden away in the dev console and not displayed in the GUI interface?

And, the snapshot is of the root volume, but it's an encrypted copy of the original snapshot. It's a shame this doesn't seem to work. From what I can tell this means I need to shutdown the instance, detach the volume and attach a new root volume made from this encrypted snapshot - does that sound correct?

Thanks.

Adrian
답변함 9달 전

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

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

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

관련 콘텐츠