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
オプションのフラグ
--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.
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 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."]]