Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
NOM
gdcloud compute disks create : créez des disques de machine virtuelle.
SYNOPSIS
gdcloud compute disks create DISK_NAME [flags]
EXAMPLES
To create a disk with a certain image, run:
gdcloud compute disks create example-disk \
--project example-project \
--size 10GB \
--image ubuntu-20.04-server-cloudimg-amd64-1.0 \
--image-project vm-system
To create a blank disk, run:
gdcloud compute disks create example-disk \
--project example-project \
--size 10GB
INDICATEURS FACULTATIFS
--image string The image name for the disk.
The disk will be created from the given image.
If not specified, the created disk will be blank.
To view a list of available image to use, run "gdcloud compute images list".
--image-project string The project of the image for the disk.
If specifying one of our public shared images, "image-project" must be provided.
The public shared image project is "vm-system".
If not specified, but "image" is provided, the current default project will be used.
Only public shared images and images in the same project as the instance are supported.
--size string The size of the disk.
The value must be a whole number followed by a size unit of GB for gigabyte, or TB for terabyte.
For example, "10GB" will produce a 10 gigabyte disk.
The disk size must be a multiple of 1 GB.
If not specified, the minimum disk size of the boot image will be used.
If the minimum disk size is not set in the image, an error will be thrown.
OPTIONS GCLOUD GÉNÉRALES
Ces options sont disponibles pour toutes les commandes : --configuration, --format, --help, --project, --quiet.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eThe \u003ccode\u003egdcloud compute disks create\u003c/code\u003e command is used to create virtual machine disks.\u003c/p\u003e\n"],["\u003cp\u003eYou can create a disk from a specific image using the \u003ccode\u003e--image\u003c/code\u003e flag, or a blank disk if this flag is not used.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--image-project\u003c/code\u003e flag specifies the project where the image is located, especially when using public shared images like those from "vm-system".\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--size\u003c/code\u003e flag determines the disk size, which must be specified as a whole number followed by either "GB" or "TB", and must be a multiple of 1 GB.\u003c/p\u003e\n"],["\u003cp\u003eThere are other flags available for all gdcloud commands including \u003ccode\u003e--configuration\u003c/code\u003e, \u003ccode\u003e--format\u003c/code\u003e, \u003ccode\u003e--help\u003c/code\u003e, \u003ccode\u003e--project\u003c/code\u003e, \u003ccode\u003e--quiet\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# gdcloud compute disks create\n\nNAME\n----\n\ngdcloud compute disks create - Create virtual machine disks.\n\nSYNOPSIS\n--------\n\n gdcloud compute disks create DISK_NAME [flags]\n\n### EXAMPLES\n\n To create a disk with a certain image, run:\n\n gdcloud compute disks create example-disk \\\n --project example-project \\\n --size 10GB \\\n --image ubuntu-20.04-server-cloudimg-amd64-1.0 \\\n --image-project vm-system\n\n To create a blank disk, run:\n\n gdcloud compute disks create example-disk \\\n --project example-project \\\n --size 10GB\n\n### OPTIONAL FLAGS\n\n --image string The image name for the disk.\n The disk will be created from the given image.\n If not specified, the created disk will be blank.\n To view a list of available image to use, run \"gdcloud compute images list\".\n --image-project string The project of the image for the disk.\n If specifying one of our public shared images, \"image-project\" must be provided.\n The public shared image project is \"vm-system\".\n If not specified, but \"image\" is provided, the current default project will be used.\n Only public shared images and images in the same project as the instance are supported.\n --size string The size of the disk.\n The value must be a whole number followed by a size unit of GB for gigabyte, or TB for terabyte.\n For example, \"10GB\" will produce a 10 gigabyte disk.\n The disk size must be a multiple of 1 GB.\n If not specified, the minimum disk size of the boot image will be used.\n If the minimum disk size is not set in the image, an error will be thrown.\n\n### GDCLOUD WIDE FLAGS\n\nThese flags are available to all commands: `--configuration`, `--format`, `--help`, `--project`, `--quiet`.\n\nFor more information, see the [gdcloud CLI reference overview](/distributed-cloud/hosted/docs/latest/gdch/resources/gdcloud-reference/gdcloud) page."]]