hi I'm Brandon cloud Support Engineer
here at the AWS headquarters in Seattle
sometimes customers tell me they are
unable to connect to their Amazon ec2
windows instance I tell them that
sometimes things like misconfigured
firewall remote desktop or a network
interface settings are the culprit
today I'm going to show you how to use
the diagnose and rescue feature of ec2
rescue to resolve many common problems
that can prevent connection to your
windows instance let's get started
diagnose and rescue is an offline mode
feature of ec2 rescue it requires that
the root volume of the affected instance
be attached to another healthy ec2
windows instance for the purposes of
this video we'll call the second
instance our helper instance the helper
instance must meet the following
specifications it must be in the same
availability zone as the problem
instance it must be running Windows
Server 2008 r2 or later and must have
the dotnet framework 3.5 Service Pack 1
or later installed all current Amazon
provided Windows a.m. is come with the
latest dotnet version pre-installed and
it must be accessible through a Remote
Desktop Protocol connection it's
important to note that ec2 rescue can
only be run on Windows Server 2008 r2 or
later but it can analyze the offline
volumes of Windows Server 2008 or later
if you don't already have a helper
instance meeting these specifications go
ahead and launch one now we also highly
recommend that you take a snapshot of
the affected instances route volume or
make an ami of the instance we don't
cover these tasks in this video so you
can just pause it here until we're ready
to move on at this point
I've already logged in to the AWS
management console I'm going to navigate
to the ec2 dashboard then on the Left
I'll go ahead and select instances to
stop the affected instance select it and
then click actions instance state and
stop wait for the instance to stop
completely this can take a few minutes
so pause the video if necessary now that
the instance is stopped as you can see
select the affected end
and look under the details tab in the
lower part of the dashboard under the
root device click on slash dev slash SDA
one then click the EBS ID from the
dialog that appears this will take you
to the root volumes EBS page
pro tip before I detach volumes from
their instance I like to give them an
easy to remember contextual name to make
them easy to find later on as you can
see mine already has one detach the
volume by selecting it then clicking
actions and detach then click yes detach
wait for the volume to become
unavailable under state another pro tip
use the API refresh button in the top
right corner of the console to update
the status of resources more quickly as
you can see the volume is now available
attach the volume to your helper
instance by selecting it then clicking
actions and attach select your helper
instance from the drop down menu leave
the device setting as default but record
that value for later reference click
attach
now with the offline root volume of the
affected instance attached to our helper
instance as a secondary volume we can
use ECT rescue to diagnose and rescue
our instance after downloading extract
the zip file and launch ec2 rescue by
double clicking the executable note the
executable should always be launched
from the directory containing the Tools
config file accept any UAC warnings then
review and accept the license agreement
a couple of things to quickly point out
are the help and feedback buttons the
Help button opens an included help
system that provides a little more
detail about how to use easy to rescue
go ahead and use it if you ever get
stuck the feedback button allows you to
let us know about any issues or feature
requests or just share your thoughts
about the tool it does require an
internet connection to function click
Next to go to the select mode screen
click the icon to the left of the
offline instance to enter the offline
instance mode
you will be shown a list of attached
disks eligible for analysis by ec2
Rescue select the disk you just attached
and click Next double check that you've
selected the correct disk then confirm
they are sure by clicking yes if not
click no and select the appropriate disk
and click OK
note the system information displayed on
the left side of the window if you'd
like copy this information and save it
to pass on to your system administrator
or AWS support click on the icon to the
left of diagnose and rescue the
diagnosis and rescue feature analyzes a
number of settings in the registry of
the loaded volume that can commonly
prevent connection to Windows ec2
instance those settings include
real-time is universal Windows advanced
firewall profile settings remote desktop
configuration ec2 config service
configuration including the ec2 set
password and ec2 handle user data
plug-ins for Windows Server 2008 through
2012 r2 you won't see it here but on
2016 instances you'll see ec2 launch
configuration which includes the
resetting of the administrator password
using PowerShell desired state
configuration also you'll see the NIC
configuration each setting is
accompanied by a symbol indicating that
settings effect on your connection to
the server red X indicates that as
configured this setting will normally
prevent successful connection to the
instance yellow exclamation point and
the case that is configured the setting
could possibly prevent successful
connection to the instance green check
indicates that this setting is properly
configured for successful connection
blue eye indicates information such as
NIC driver info or features such as
resetting the instances admin password
that may be adventurous to the user this
page is just a summary and is
informational only click Next to go to
the detected possible issues page this
page only shows possible configurations
and configurable features were
applicable as you can see I've
this instance with several issues I'll
go ahead and check all these boxes so
we'll fix all of them then I'll click
Next on the next page you'll go ahead
and review the changes you've selected
then click rescue click OK to confirm
again and the changes are made review
results then click Next
the done screen on this page it confirms
the changes have been applied to your
selected instance provides brief
instructions on reattaching the offline
volume to its original instance and
provides instructions on how to view the
tools log in case something went wrong
in the process go ahead and click finish
unless you need to access the contents
of the selected disk leave the offline
selected disk box checked this will
automatically take the disk offline so
that is no longer detected by windows if
a disk signature collision is detected
the fixed disk signature check box is
also available we recommend that you
leave this checked so any disk signature
collision issues will be fixed
automatically click OK to finish and
closing the tool hopefully the change is
made via ec2 rescue have resolved the
underlying issue that prevented
connectivity to your instance as you can
see I'm back in the AWS management
console looking at the volume that I
attached to the helper instance to
confirm we need to reattach that volume
to the affected instance started and
test the connection to test the volume
by selecting it then clicking actions
and detach wait for the volume to become
available under state you can click the
API refresh button to see if the volume
is available yet as you can see the
volume is now available go ahead and
attach the volume back to the affected
instance by selecting it then clicking
actions and attach select the affected
instance from the drop down change the
device setting to /dev / FDA 1 to make
it the root device of that instance
click attach
go back to the instances page to start
the instance to start it select the
instance and click actions instance
state and start give the instance enough
time to boot and start passing status
checks to see where the instance is in
the boot process use the get instance
screenshot feature of the ec2 console
when the instance appears ready confirm
the issues are fixed by attempting to
RDP if this is not resolved your
connectivity issue or you think that the
issue is related to your instance
crashing boot looping or suffering from
possible registry corruption you may
want to use eg rescues restore feature
to rollback changes to the registry or
restore from backup otherwise I suggest
that you use the tools capture log
feature to capture the instances logs
and have them on hand to share with your
system administrator or AWS support for
more advanced troubleshooting thanks for
watching and happy cloud computing from
all of us here at AWS