Saturday, December 17, 2016

Troubleshooting Stopping Your Instance



Troubleshooting Stopping Your Instance
If you have stopped your Amazon EBS-backed instance and it appears "stuck" in thestopping state, there may be an issue with the underlying host computer.
First, try stopping the instance again. If you are using the stop-instances (AWS CLI) command be sure to use the --force option.
If you can't force the instance to stop, you can create an AMI from the instance and launch a replacement instance.
You are not billed for any instance hours while an instance is not in the running state.
To create a replacement instance
  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
  2. In the navigation pane, choose Instances and select the instance.
  3. Choose ActionsImageCreate Image.
  4. In the Create Image dialog box, fill in the following fields and then choose Create Image:
    1. Specify a name and description for the AMI.
    2. Choose No reboot.
  5. Launch an instance from the AMI and verify that the instance is working.
  6. Select the stuck instance, choose ActionsInstance StateTerminate. If the instance also gets stuck terminating, Amazon EC2 automatically forces it to terminate within a few hours.
If you are unable to create an AMI from the instance as described in the previous procedure, you can set up a replacement instance as follows:
To create a replacement instance (if the previous procedure fails)
  1. Select the instance, open the Description tab, and view the Block devices list. Select each volume and write down its volume ID. Be sure to note which volume is the root volume.
  2. In the navigation pane, choose Volumes. Select each volume for the instance, and choose ActionsCreate Snapshot.
  3. In the navigation pane, choose Snapshots. Select the snapshot that you just created, and choose ActionsCreate Volume.
  4. Launch an instance of the same type as the stuck instance (Amazon Linux, Windows, and so on). Note the volume ID and device name of its root volume.
  5. In the navigation pane, choose Instances, select the instance that you just launched, choose ActionsInstance State, and then choose Stop.
  6. In the navigation pane, choose Volumes, select the root volume of the stopped instance, and choose ActionsDetach Volume.
  7. Select the root volume that you created from the stuck instance, choose Actions,Attach Volume, and attach it to the new instance as its root volume (using the device name that you wrote down). Attach any additional non-root volumes to the instance.
  8. In the navigation pane, choose Instances and select the replacement instance. ChooseActionsInstance StateStart. Verify that the instance is working.
  9. Select the stuck instance, choose Actions,Instance StateTerminate. If the instance also gets stuck terminating, Amazon EC2 automatically forces it to terminate within a few hours.
If you're unable to complete these procedures, you can post a request for help to theAmazon EC2 forum. To help expedite a resolution, include the instance ID and describe the steps that you've already taken.

No comments:

Post a Comment