Who Installed the OpenStack Matters, But Here is Somewhat Generalized Guide to Evoke the Rescue Mode on Linux Instance via Python Nova Client. Rackspace, for example runs OpenStack but they have their own web GUI based method to bring the Rescue mode. This guide to OpenStack Nova instance rescue will work for your own OpenStack installation as well as on HP Cloud.
Steps For OpenStack Nova Instance RESCUE (HP Cloud) : Install Python Client Tools
OpenStack Python Nova Client must be installed. OPENSTACKRC file must be copied in the active profile file (.zshrc in case of Homebrew – iTerm2 – ZSH setup).
Steps For OpenStack Nova Instance RESCUE (HP Cloud)
Run :
---
1 | nova help rescue |
on local computer’s Terminal/iTerm2 window to get command line help :
Then you can run nova list
command to get the instance name or ID of the server. The command format will be :
1 | nova rescue serverID |
Original instance will loaded into the rescue instance under /dev/vdb
for HP Cloud. Before you access the information you will need to mount /dev/vdb
:
1 2 | sudo mkdir /example/ sudo mount /dev/vdb1 /example |
Before mounting, you possibly want to run the fdisk -l
command. You will get a thing like this :
1 | Disk /dev/vdb1: 2147 MB |
This is the rescue mode filesystem. Other one will be bigger in GB – that is the server’s file system. We can now access the files through the /example
directory. Just remember that you will need to put “/example” or what you will use as name in front of the usual paths to get to the files. For example, if you have a problem in the /etc/hosts
file, you will actually access that file at:
1 | /example/etc/hosts |
If you chowned the file wrongly from root, then root will be at /example/
. It s honestly not possible to predict what error you did and what steps you should do to undo.
You can get rid off rescue mode by this command from local host :
1 | nova unrescue serverID |
It is always better to take a snapshot before any work. If simple apt-get upgrade
breaks the system, it is very difficult to roll back or undo without snapshot.