2021-04-29 16:02:52 +02:00
<!--
title: Flavors
description:
published: true
2021-04-29 16:12:34 +02:00
date: 2021-04-29T14:12:33.382Z
2021-04-29 16:02:52 +02:00
tags:
editor: ckeditor
dateCreated: 2021-04-29T14:02:49.705Z
-->
< h1 > Les flavors< / h1 >
2021-04-29 16:12:34 +02:00
< h2 > Lister les flavors< / h2 >
2021-04-29 16:04:41 +02:00
< p > Les flavors vous permettent de choisir la taille de votre machine virtuelle. La sélection disponible peut être affichée en utilisant : < code > openstack flavor list< / code > < / p >
2021-04-29 16:02:52 +02:00
< pre > < code class = "language-plaintext" > openstack flavor list
+--------------------------------------+---------------------------+------+------+-----------+-------+-----------+
| ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public |
+--------------------------------------+---------------------------+------+------+-----------+-------+-----------+
| 23c60b2b-6a1a-4870-ba41-ab1d6ce0c516 | cpu1-ram2-disk10 | 2048 | 10 | 0 | 1 | True |
| 2655c1e3-a43a-4dea-a957-650517e8fa72 | cpu2-ram6-disk20_iops | 6144 | 20 | 0 | 2 | True |
| 450314a4-3575-45d5-88c2-41ca78201ebe | cpu2-ram6-disk60 | 6144 | 60 | 0 | 2 | True |
| e5874e74-181c-4534-94db-ba035ded5dce | cpu2-ram6-disk20 | 6144 | 20 | 0 | 2 | True |
| ef91c4c8-c28f-44b0-b7a0-3115652b52d1 | cpu2-ram6-disk40 | 6144 | 40 | 0 | 2 | True |
| f2c62dc0-4b83-4208-868a-fbc4dbc2ff3a | cpu1-ram2-disk20 | 2048 | 20 | 0 | 1 | True |
+--------------------------------------+---------------------------+------+------+-----------+-------+-----------+< / code > < / pre >
< p > Ils se déclinent en plusieurs versions offrant différents niveaux de performances. Le suffixe < code > _iops< / code > derrière une saveur signifie une limite d'iops plus élevée.< / p >
< figure class = "table" >
< table >
< tbody >
< tr >
< td style = "background-color:hsl(0, 0%, 90%);" > < strong > Flavor< / strong > < / td >
< td style = "background-color:hsl(0, 0%, 90%);" > < strong > Performances maximales< / strong > < / td >
< / tr >
< tr >
< td > cpu2-ram6-disk20 < / td >
< td > iops: 1k en lecture et écriture - net: 200MB/s< / td >
< / tr >
< tr >
< td > cpu2-ram6-disk20_iops < / td >
< td > iops: 8k en lecture et écriture - net: 200MB/s< / td >
< / tr >
< tr >
< td > cpu2-ram6-disk20_perf < / td >
< td > iops: 8k en lecture et écriture - net: 500MB/s< / td >
< / tr >
< / tbody >
< / table >
< / figure >
2021-04-29 16:04:41 +02:00
< p > Vous pouvez voir toutes les propriétés des flavors en utilisant la commande : < code > openstack flavor list --long< / code > < / p >
< pre > < code class = "language-plaintext" > openstack flavor list --long
+--------------------------------------+---------------------------+------+------+-----------+-------+-----------+------+-------------+--------------------------------------------------------------------+
| ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public | Swap | RXTX Factor | Properties |
+--------------------------------------+---------------------------+------+------+-----------+-------+-----------+------+-------------+--------------------------------------------------------------------+
[...]
| e5874e74-181c-4534-94db-ba035ded5dce | cpu2-ram6-disk20_standard | 6144 | 20 | 0 | 2 | True | | 1.0 | disk_total_iops_sec='1000', quota:disk_write_bytes_sec='209715200' |
| 450314a4-3575-45d5-88c2-41ca78201ebe | cpu2-ram6-disk20_iops | 6144 | 20 | 0 | 2 | True | | 1.0 | disk_total_iops_sec='8000', quota:disk_write_bytes_sec='209715200' |
| f2c62dc0-4b83-4208-868a-fbc4dbc2ff3a | cpu2-ram6-disk20_perf | 6144 | 20 | 0 | 2 | True | | 1.0 | disk_total_iops_sec='8000', quota:disk_write_bytes_sec='524288000' |
[...]
+--------------------------------------+---------------------------+------+------+-----------+-------+-----------+------+-------------+--------------------------------------------------------------------+< / code > < / pre >
2021-04-29 16:02:52 +02:00
< p > < / p >
2021-04-29 16:12:15 +02:00
< h2 > Créer un flavor< / h2 >
< p > Pour créer un flavor il faut utiliser la commande < code > openstack flavor create< / code > avec les arguments suivants :< / p >
< pre > < code class = "language-plaintext" > openstack flavor create FLAVOR_NAME --id FLAVOR_ID --ram RAM_IN_MB --disk ROOT_DISK_IN_GB --vcpus NUMBER_OF_VCPUS< / code > < / pre >
< p > Par exemple pour créer un flavor pour une petite machine virtuelle :< / p >
< pre > < code class = "language-plaintext" > openstack flavor create cpu1-ram2-disk10 --id auto --ram 2048 --disk 10 --vcpus 1< / code > < / pre >
< p > < / p >
< h2 > Supprimer un flavor< / h2 >
< p > Pour cela il suffit d'utiliser la commande < code > openstack flavor delete < FLAVOR_ID> < / code > < / p >
< pre > < code class = "language-plaintext" > openstack flavor delete 23c60b2b-6a1a-4870-ba41-ab1d6ce0c516< / code > < / pre >
< p > < / p >
< p > < / p >