Skip to content

Suspendre une instance⚓︎

Lorsqu’une VM est suspendue, un snapshot de sa mémoire et de son disque sont pris et la machine éteinte. En dehors des snapshots stockées, l’instance ne consomme plus aucune ressource sur l'hyperviseur.

$> openstack server suspend <instance_to_suspend>
instance_to_suspend : nom ou iD de l'instance à suspendre

Exemple :

$> openstack server list
+--------------------------------------+---------------+--------+-------------------------+------------------+----------+
| ID                                   | Name          | Status | Networks                | Image            | Flavor   |
+--------------------------------------+---------------+--------+-------------------------+------------------+----------+
| c01c4b53-83da-47f9-a441-46670971c7f8 | test-instance | ACTIVE | test-network=10.0.0.140 | ubuntu-22.04-LTS | m1.small |
+--------------------------------------+---------------+--------+-------------------------+------------------+----------+
$> openstack server suspend test-instance
$> openstack server list
+--------------------------------------+---------------+-----------+-------------------------+------------------+----------+
| ID                                   | Name          | Status    | Networks                | Image            | Flavor   |
+--------------------------------------+---------------+-----------+-------------------------+------------------+----------+
| c01c4b53-83da-47f9-a441-46670971c7f8 | test-instance | SUSPENDED | test-network=10.0.0.140 | ubuntu-22.04-LTS | m1.small |
+--------------------------------------+---------------+-----------+-------------------------+------------------+----------+

$> openstack server resume <instance_to_resume>
instance_to_resume : nom ou iD de l'instance suspendu à relancer

Exemple :

$> openstack server list
+--------------------------------------+---------------+-----------+-------------------------+------------------+----------+
| ID                                   | Name          | Status    | Networks                | Image            | Flavor   |
+--------------------------------------+---------------+-----------+-------------------------+------------------+----------+
| c01c4b53-83da-47f9-a441-46670971c7f8 | test-instance | SUSPENDED | test-network=10.0.0.140 | ubuntu-22.04-LTS | m1.small |
+--------------------------------------+---------------+-----------+-------------------------+------------------+----------+
$> openstack server resume test-instance
$> openstack server list
+--------------------------------------+---------------+--------+-------------------------+------------------+----------+
| ID                                   | Name          | Status | Networks                | Image            | Flavor   |
+--------------------------------------+---------------+--------+-------------------------+------------------+----------+
| c01c4b53-83da-47f9-a441-46670971c7f8 | test-instance | ACTIVE | test-network=10.0.0.140 | ubuntu-22.04-LTS | m1.small |
+--------------------------------------+---------------+--------+-------------------------+------------------+----------+