Evacuating Instances

If a hardware malfunction or other error causes a Compute node to fail, you can evacuate instances to make them available again. You can optionally include the target host on the evacuate command. If you omit the host, the scheduler chooses the target host.

To preserve user data on the server disk, configure shared storage on the target host. When you evacuate the instance, Compute detects whether shared storage is available on the target host. Also, you must validate that the current VM host is not operational. Otherwise, the evacuation fails.

  1. List all hosts.

    $ openstack host list
    +------------------------------+-------------+----------+
    | Host Name                    | Service     | Zone     |
    +------------------------------+-------------+----------+
    | mcp2.az.mc.metacloud.net     | conductor   | az       |
    | mcp3.aaz.mc.metacloud.net    | conductor   | az       |
    | mcp3.az.mc.metacloud.net     | scheduler   | az       |
    | mcp3.az.mc.metacloud.net     | consoleauth | az       |
    | mcp3.az.mc.metacloud.net     | console     | az       |
    | mcp2.az.mc.metacloud.net     | consoleauth | az       |
    | mcp2.az.mc.metacloud.net     | console     | az       |
    | mcp2.az.mc.metacloud.net     | scheduler   | az       |
    | mcp1.az.mc.metacloud.net     | consoleauth | az       |
    | mcp1.az.mc.metacloud.net     | conductor   | az       |
    | mcp1.az.mc.metacloud.net     | scheduler   | az       |
    | mcp1.az.mc.metacloud.net     | console     | az       |
    | mhv1.az.mc.metacloud.net     | compute     | az       |
    | mhv2.az.mc.metacloud.net     | compute     | az       |
    | mhv8.az.mc.metacloud.net     | compute     | az       |
    | mhv9.az.mc.metacloud.net     | compute     | az       |
    | mhv5.az.mc.metacloud.net     | compute     | az       |
    | mhv4.az.mc.metacloud.net     | compute     | az       |
    | mhv6.az.mc.metacloud.net     | compute     | az       |
    | mhv10.az.mc.metacloud.net    | compute     | az       |
    | mhv3.az.mc.metacloud.net     | compute     | az       |
    | mhv7.az.mc.metacloud.net     | compute     | az       |
    +------------------------------+-------------+----------+
    
  2. Evacuate the instance. You can use the --password PWD option to pass the instance password to the command. If you do not specify a password, the command generates and prints one after it finishes successfully. The following command evacuates a server from a failed host to .

    $ nova evacuate <EVACUATED_SERVER_NAME> <HOST_B>
    

    The command rebuilds the instance from the original image or volume and returns a password. The command preserves the original configuration, which includes the instance ID, name, uid, and IP address.

    +-----------+--------------+
    | Property  |    Value     |
    +-----------+--------------+
    | adminPass | <password>   |
    +-----------+--------------+
    
  3. To preserve the user disk data on the evacuated server, deploy Compute with a shared file system. The following example does not change the password.

    $ nova evacuate <EVACUATED_SERVER_NAME> <HOST_B> --on-shared-storage