名称
gdcloud compute disks create - 创建虚拟机磁盘。
摘要
gdcloud compute disks create DISK_NAME [flags]
示例
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.
GDCLOUD 全局标志
以下标志适用于所有命令:--configuration
、--format
、--help
、--project
、--quiet
。
如需了解详情,请参阅 gdcloud CLI 参考概览页面。