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"]],["最后更新时间 (UTC):2025-09-04。"],[[["\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 specified image using the \u003ccode\u003e--image\u003c/code\u003e flag, or a blank disk if the flag isn't provided.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--size\u003c/code\u003e flag allows you to set the disk size in GB or TB, with a minimum requirement of being a multiple of 1 GB, and defaulting to the minimum size of the image used.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--image-project\u003c/code\u003e flag is necessary when using a public shared image, which must be specified as "vm-system".\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--project\u003c/code\u003e flag is required to specify the project ID where the disk will be created.\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/appliance/resources/gdcloud-reference/gdcloud) page."]]