# Reboot an Instance

## Problem

User has the need to reboot an instance.

## Environment

* Platform9 Managed OpenStack - All Versions
* Nova

## Procedure

1. By default, when an instance is rebooted, it is a soft reboot. A soft reboot attempts a graceful shutdown and restart of the instance.

{% tabs %}
{% tab title="None" %}

```none
$ openstack server reboot SERVER
```

{% endtab %}
{% endtabs %}

2. To perform a hard reboot, pass the \*\*`--hard`\*\*parameter. A hard reboot power cycles the instance.

{% tabs %}
{% tab title="None" %}

```none
$ openstack server reboot --hard SERVER
```

{% endtab %}
{% endtabs %}

3. Rescue mode provides a way for access, even if an image renders the instance inaccessible. By default, it starts an instance from the initial image attaching the current boot disk as a secondary one. For example, this operation may be performed, if a filesystem of an instance becomes corrupted due to prolonged use.
   1. To perform an instance reboot into rescue mode, run the following command.

```
$ openstack server rescue SERVER
```

```
2. To restart the instance from the normal boot disk, run the following command.
```

```
$ openstack server unrescue SERVER
```

```
3. If you want to rescue an instance with a specific image, rather than the default one, use the **`--image`** parameter.
```

```
$ nova rescue --image IMAGE_ID SERVER
```

**Note:** On running the \*\*`--openstack server rescue`\*\*command, the instance performs a soft shutdown first. This means that the guest operating system has a chance to perform a controlled shutdown before the instance is powered off. The shutdown behavior is configured by the \*\*`shutdown_timeout`\*\*parameter that can be set in the *nova.conf* file. Its value stands for the overall period (in seconds) a guest operating system is allowed to complete the shutdown. The default timeout is 60 seconds. The timeout value can be overridden on a per image basis by means of \*\*`os_shutdown_timeout`\*\*that is an image metadata setting allowing different types of operating systems to specify how much time they need to shut down cleanly.

## Additional Information

[Reboot an Instance](https://docs.openstack.org/ocata/user-guide/cli-reboot-an-instance.html)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://platform9.com/kb/pmo/how-to/reboot-an-instance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
