仮想サーバの削除

仮想サーバを削除する手順を解説します。

削除は、基本的に作成した手順の逆順で、削除を実行します。

  1. 以下の設定を行います。
    $ TMP_VM_ID=<削除対象の仮想サーバのID>
  2. 次のAPIを実行します。
    $ curl -i -Ss $COMPUTE/v2/$PROJECT_ID/servers/$TMP_VM_ID -X DELETE \
    -H "X-Auth-Token: $OS_AUTH_TOKEN"
    HTTP/1.1 204 No Content
    Server: Apache
    Date: Www, DD MMM yyyy hh:mm:ss GMT
    x-compute-request-id: req-<ID>
    Cache-Control: no-cache
    X-Request-Id: <ID>
    X-Runtime: <runtime>
    Keep-Alive: timeout=5, max=100