Skip to content

Rescuing VMs

If a server in the NETWAYS Cloud is no longer reachable or fails to boot, it can be recovered through the rescue process.

The NETWAYS Cloud provides a dedicated rescue image for this purpose, which allows VMs to be recovered in the event of a failure via the cloud console or the OpenStack CLI.

During the rescue process, the original root volume of the failed VM is attached by OpenStack to the VM, typically as device vdb or partition vdb1. This allows faulty configurations - for example in system services or boot processes - to be fixed after mounting the relevant partition(s).

Limitations of the rescue feature

Due to limitations in OpenStack, the rescue process described here works only for local storage VMs, i.e. VMs that do not boot from a block storage volume.

Rescue via the Cloud Console

To rescue a VM via the cloud console, first log in to the NETWAYS Cloud. Then select the correct project and navigate to the Instance overview under Compute > Instances.

In the Actions menu of the failed VM, select Rescue Instance and choose the Netways Rescue Image from the list of available images.

After successfully resolving the issues, the VM can be returned to its normal state by selecting Unrescue Instance from the VM's Actions menu.

Rescue via the OpenStack CLI

To perform a rescue via the OpenStack CLI, you first need to configure the OpenStack CLI. Then retrieve the IDs of the rescue image and the failed VM.

openstack image list -c Name -c ID --name "Netways Rescue Image"

+--------------------------------------+----------------------+
| ID                                   | Name                 |
+--------------------------------------+----------------------+
| bec9c564-8ca0-47fe-8df1-1b7ec5ea7279 | Netways Rescue Image |
+--------------------------------------+----------------------+

openstack server list -c Name -c ID

+--------------------------------------+-----------+
| ID                                   | Name      |
+--------------------------------------+-----------+
| 6c8df75e-abcc-4bfb-ab20-94808c42564f | rescue-me |
+--------------------------------------+-----------+

With this information, the rescue process can be started:

openstack server rescue \
  --image bec9c564-8ca0-47fe-8df1-1b7ec5ea7279 \
  6c8df75e-abcc-4bfb-ab20-94808c42564f

After successfully repairing the VM, the rescue process can be ended:

openstack server unrescue 6c8df75e-abcc-4bfb-ab20-94808c42564f

VM in error state after rescue

After ending the rescue process, the VM may appear in the Error state in OpenStack. In this case, a hard reboot will help:

openstack server reboot --hard 6c8df75e-abcc-4bfb-ab20-94808c42564f

Afterwards, the VM should be listed as Active again.

Accessing VMs in Rescue Mode

In rescue mode, the VM can be accessed in several ways:

  • SSH: using the rescue user with either the SSH key provided when creating the VM or the auto-generated password of the rescue user (see below)
  • Cloud console: Open the Console via the instance view of the affected VM. The login credentials are displayed there above the login prompt.