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 個月前檢視次數 697 次
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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南