Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
© 2022 Yandex.Cloud LLC
Command line interface
  • Getting started with the CLI
  • Step-by-step instructions
    • All instructions
    • CLI installation
    • Authentication
      • Authenticating as a user
      • Authenticating as a service account
      • Authenticating as a federated user
    • Profile management
      • Creating a profile
      • Managing profile parameters
      • Getting profile information
      • Activating a profile
      • Deleting a profile
  • Concepts
    • Running commands
    • CLI configuration
    • Synchronous and asynchronous command execution modes
  • CLI releases
  • Troubleshooting
  • CLI reference
    • Overview
    • CLI manage
      • init
      • version
      • help
      • config
        • Overview
        • profile
          • Overview
          • activate
          • delete
          • create
          • list
          • get
        • unset
        • set
        • get
        • list
      • components
        • Overview
        • restore
        • update
    • Operations manage
      • Overview
      • get
      • wait
    • Service manage
      • load-balancer
        • Overview
        • target-group
          • Overview
          • list-operations
          • remove-targets
          • add-targets
          • delete
          • update
          • create
          • list
          • get
        • network-load-balancer
          • Overview
          • target-states
          • detach-target-group
          • attach-target-group
          • stop
          • start
          • delete
          • update
          • create
          • list
          • get
          • add-listener
          • list-operations
          • remove-listener
      • managed-mongodb
        • Overview
        • database
          • Overview
          • delete
          • create
          • list
          • get
        • user
          • Overview
          • revoke-permission
          • grant-permission
          • delete
          • update
          • create
          • list
          • get
        • backup
          • Overview
          • list
          • get
        • resource-preset
          • Overview
          • list
          • get
        • shards
          • Overview
          • delete
          • add
          • list
          • get
        • cluster
          • Overview
          • enable-sharding
          • stop
          • move
          • list-operations
          • start
          • list-logs
          • list-backups
          • backup
          • delete
          • remove-labels
          • reschedule-maintenance
          • add-labels
          • update-config
          • update
          • restore
          • create
          • list
          • get
        • hosts
          • Overview
          • stepdown
          • restart
          • delete
          • add
          • list
          • resetup
      • managed-mysql
        • Overview
        • hosts
          • Overview
          • delete
          • update
          • add
          • list
        • database
          • Overview
          • delete
          • create
          • list
          • get
        • user
          • Overview
          • revoke-permission
          • grant-permission
          • delete
          • update
          • create
          • list
          • get
        • backup
          • Overview
          • list
          • get
        • resource-preset
          • Overview
          • list
          • get
        • cluster
          • Overview
          • restore
          • create
          • list
          • get
          • start-failover
          • list-operations
          • stop
          • start
          • list-logs
          • move
          • list-backups
          • backup
          • delete
          • update-config
          • remove-labels
          • add-labels
          • update
          • reschedule-maintenance
      • managed-sqlserver
        • Overview
        • host
          • Overview
          • list
        • database
          • Overview
          • delete
          • backup-import
          • backup-export
          • restore
          • create
          • list
          • get
        • user
          • Overview
          • revoke-permission
          • grant-permission
          • delete
          • update
          • create
          • list
          • get
        • backup
          • Overview
          • list
          • get
        • resource-preset
          • Overview
          • list
          • get
        • cluster
          • Overview
          • delete
          • remove-labels
          • add-labels
          • update-config
          • update
          • start-failover
          • restore
          • create
          • list
          • get
          • stop
          • start
          • list-operations
          • list-backups
          • backup
      • managed-redis
        • Overview
        • cluster
          • Overview
          • stop
          • start
          • move
          • list-operations
          • list-logs
          • list-backups
          • backup
          • rebalance
          • delete
          • remove-labels
          • add-labels
          • update-config
          • update
          • reschedule-maintenance
          • start-failover
          • restore
          • create
          • get
          • list
        • hosts
          • Overview
          • delete
          • add
          • list
        • backup
          • Overview
          • list
          • get
        • resource-preset
          • Overview
          • list
          • get
        • shards
          • Overview
          • delete
          • add
          • list
          • get
      • managed-postgresql
        • Overview
        • hosts
          • Overview
          • update-config
          • delete
          • update
          • add
          • list
        • database
          • Overview
          • delete
          • update
          • create
          • list
          • get
        • user
          • Overview
          • revoke-permission
          • grant-permission
          • delete
          • update
          • create
          • list
          • get
        • backup
          • Overview
          • list
          • get
        • resource-preset
          • Overview
          • list
          • get
        • cluster
          • Overview
          • move
          • list-operations
          • list-logs
          • list-backups
          • backup
          • delete
          • remove-labels
          • add-labels
          • update-config
          • update
          • reschedule-maintenance
          • start-failover
          • restore
          • create
          • list
          • get
          • start
          • stop
      • managed-kafka
        • Overview
        • cluster
          • Overview
          • update
          • reschedule-maintenance
          • move
          • create
          • stop
          • start
          • list-logs
          • list-hosts
          • list-operations
          • delete
          • list
          • get
        • topic
          • Overview
          • delete
          • update
          • create
          • list
          • get
        • user
          • Overview
          • delete
          • update
          • create
          • list
          • get
      • managed-elasticsearch
        • Overview
        • backup
          • Overview
          • list
          • get
        • extension
          • Overview
          • update
          • delete
          • create
          • list
          • get
        • resource-preset
          • Overview
          • list
          • get
        • cluster
          • Overview
          • reschedule-maintenance
          • remove-labels
          • add-labels
          • stop
          • update-config
          • update
          • start
          • list-operations
          • list-logs
          • list-backups
          • backup
          • delete
          • restore
          • create
          • list
          • get
        • hosts
          • Overview
          • add
          • list
          • delete
      • vpc
        • Overview
        • subnet
          • Overview
          • move
          • list-used-addresses
          • list-operations
          • delete
          • remove-labels
          • add-labels
          • remove-range
          • add-range
          • update
          • create
          • list
          • get
        • address
          • Overview
          • move
          • list-operations
          • delete
          • update
          • create
          • list
          • get
        • network
          • Overview
          • move
          • list-route-tables
          • list-operations
          • list-security-groups
          • list-subnets
          • delete
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
        • route-table
          • Overview
          • move
          • list-operations
          • delete
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
        • security-group
          • Overview
          • list
          • update-rule-meta
          • update-rules
          • move
          • list-operations
          • delete
          • remove-labels
          • add-labels
          • update
          • get
          • create
      • dns
        • Overview
        • bind-file
          • Overview
          • migrate-to-terraform
        • zone
          • Overview
          • add-labels
          • replace-records
          • delete-records
          • add-records
          • list-records
          • delete
          • update
          • get
          • create
          • list
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • list-operations
          • remove-labels
      • kms
        • Overview
        • symmetric-key
          • Overview
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • list-operations
          • rotate
          • cancel-version-destruction
          • schedule-version-destruction
          • set-primary-version
          • delete
          • update
          • create
          • list-versions
          • list
          • get
        • symmetric-crypto
          • Overview
          • re-encrypt
          • generate-data-key
          • decrypt
          • encrypt
      • ydb
        • Overview
        • storage-type
          • Overview
          • list
          • get
        • resource-preset
          • Overview
          • list
          • get
        • backup
          • Overview
          • set-access-bindings
          • remove-access-binding
          • add-access-binding
          • list-access-bindings
          • delete
          • list
          • get
        • database
          • Overview
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • remove-labels
          • add-labels
          • delete
          • start
          • stop
          • update
          • restore
          • backup
          • create
          • list
          • get
      • certificate-manager
        • Overview
        • certificate
          • Overview
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • list-operations
          • delete
          • update
          • request
          • create
          • list
          • content
          • get
      • cdn
        • Overview
        • provider
          • Overview
          • activate
          • list-activated
        • cache
          • Overview
          • prefetch
          • purge
        • origin-group
          • Overview
          • update
          • create
          • list
          • get
          • delete
        • resource
          • Overview
          • delete
          • get-provider-cname
          • update
          • create
          • list
          • get
        • origin
          • Overview
          • delete
          • update
          • create
          • list
          • get
      • resource-manager
        • Overview
        • cloud
          • Overview
          • list-operations
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • update
          • list
          • get
        • folder
          • Overview
          • list-operations
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • delete
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
      • managed-clickhouse
        • Overview
        • hosts
          • Overview
          • delete
          • update
          • add
          • list
        • cluster
          • Overview
          • reschedule-maintenance
          • restore
          • create
          • list
          • get
          • stop
          • start
          • move
          • remove-graphite-rollup
          • add-graphite-rollup
          • remove-external-dictionary
          • add-external-dictionary
          • set-compression
          • clear-compression
          • list-operations
          • list-logs
          • list-backups
          • backup
          • add-zookeeper
          • delete
          • remove-labels
          • add-labels
          • update-config
          • update
        • shards
          • Overview
          • delete
          • update-config
          • update
          • add
          • list
          • get
        • backup
          • Overview
          • list
          • get
        • resource-preset
          • Overview
          • list
          • get
        • ml-model
          • Overview
          • delete
          • update
          • create
          • list
          • get
        • format-schema
          • Overview
          • delete
          • update
          • create
          • list
          • get
        • version
          • Overview
          • list
        • database
          • Overview
          • delete
          • create
          • list
          • get
        • user
          • Overview
          • update
          • create
          • list
          • get
          • remove-quota
          • update-quota
          • add-quota
          • revoke-permission
          • grant-permission
          • delete
        • shard-groups
          • Overview
          • delete
          • list
          • get
          • update
          • create
      • dataproc
        • Overview
        • subcluster
          • Overview
          • delete
          • update
          • create
          • list
          • get
        • cluster
          • Overview
          • list-operations
          • list-ui-links
          • list-hosts
          • stop
          • start
          • delete
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
        • job
          • Overview
          • cancel
          • create-hive
          • create-mapreduce
          • create-pyspark
          • create-spark
          • get
          • log
          • list
        • resource-preset
          • Overview
          • list
          • get
      • application-load-balancer
        • Overview
        • backend-group
          • Overview
          • delete-stream-backend
          • update-stream-backend
          • add-stream-backend
          • delete-grpc-backend
          • update-grpc-backend
          • add-grpc-backend
          • delete-http-backend
          • add-http-backend
          • update-http-backend
          • delete
          • update
          • create
          • list
          • get
        • http-router
          • Overview
          • delete
          • update
          • create
          • list
          • get
        • virtual-host
          • Overview
          • update-grpc-route
          • insert-grpc-route
          • remove-grpc-route
          • prepend-grpc-route
          • append-grpc-route
          • update-http-route
          • insert-http-route
          • remove-http-route
          • prepend-http-route
          • append-http-route
          • delete
          • update
          • create
          • list
          • get
        • target-group
          • Overview
          • get
          • remove-targets
          • add-targets
          • delete
          • update
          • create
          • list
        • load-balancer
          • Overview
          • create
          • list
          • get
          • target-states
          • remove-location
          • add-location
          • enable-traffic
          • disable-traffic
          • list-operations
          • update-stream-sni
          • update-sni
          • add-stream-sni
          • add-sni
          • remove-sni
          • remove-listener
          • update-stream-listener
          • update-listener
          • add-stream-listener
          • add-listener
          • delete
          • stop
          • start
          • update
      • cloud-desktop
        • Overview
        • desktop
          • Overview
          • reset-password
          • delete
          • create
          • list-operations
          • get-rdp-file
          • list
          • get
        • group
          • Overview
          • remove-access-bindings
          • add-access-bindings
          • set-access-bindings
          • list-access-bindings
          • delete
          • create
          • list-operations
          • list-desktops
          • list
          • get
      • lockbox
        • Overview
        • payload
          • Overview
          • get
        • secret
          • Overview
          • delete
          • add-version
          • update
          • create
          • list-versions
          • list
          • get
          • activate
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • list-operations
          • cancel-version-destruction
          • schedule-version-destruction
          • deactivate
      • managed-kubernetes
        • Overview
        • cluster
          • Overview
          • list-nodes
          • list-operations
          • list-node-groups
          • start
          • stop
          • delete
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
          • get-credentials
        • node-group
          • Overview
          • list-nodes
          • list-operations
          • delete
          • remove-node-labels
          • add-node-labels
          • remove-labels
          • add-labels
          • add-metadata
          • remove-metadata
          • update
          • create
          • list
          • get
        • list-versions
        • create-token
      • compute
        • Overview
        • placement-group
          • Overview
          • list-operations
          • list-instances
          • delete
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
        • host-type
          • Overview
          • list
          • get
        • host-group
          • Overview
          • list-operations
          • remove-labels
          • list-instances
          • list-hosts
          • delete
          • add-labels
          • update
          • list
          • create
          • get
        • disk-placement-group
          • Overview
          • list-operations
          • list-disks
          • remove-labels
          • delete
          • add-labels
          • update
          • create
          • list
          • get
        • filesystem
          • Overview
          • update
          • delete
          • create
          • list-operations
          • list
          • get
          • resize
          • remove-labels
          • add-labels
        • disk
          • Overview
          • list-operations
          • move
          • delete
          • resize
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
        • disk-type
          • Overview
          • list
          • get
        • image
          • Overview
          • list-operations
          • delete
          • remove-labels
          • add-labels
          • update
          • create
          • get-latest-from-family
          • list
          • get
        • snapshot
          • Overview
          • list-operations
          • delete
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
        • zone
          • Overview
          • list
          • get
        • instance-group
          • Overview
          • remove-labels
          • add-labels
          • remove-metadata
          • add-metadata
          • start
          • stop
          • update
          • create
          • list
          • get
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • list-logs
          • list-operations
          • delete-instances
          • stop-instances
          • list-instances
          • delete
        • instance
          • Overview
          • list
          • get
          • list-operations
          • move
          • remove-one-to-one-nat
          • add-one-to-one-nat
          • update-network-interface
          • detach-filesystem
          • attach-filesystem
          • detach-disk
          • attach-new-disk
          • attach-disk
          • restart
          • start
          • stop
          • get-serial-port-output
          • delete
          • remove-labels
          • add-labels
          • remove-metadata
          • add-metadata
          • update-container
          • update
          • create-with-container
          • create
        • connect-to-serial-port
      • container
        • Overview
        • registry
          • Overview
          • configure-docker
          • remove-ip-permissions
          • add-ip-permissions
          • set-ip-permissions
          • list-ip-permissions
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • delete
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
        • image
          • Overview
          • get
          • list-vulnerabilities
          • list-scan-results
          • get-last-scan-result
          • get-scan-result
          • scan
          • delete
          • list
        • cluster
          • Overview
          • list-nodes
          • list-operations
          • list-node-groups
          • remove-labels
          • start
          • stop
          • delete
          • add-labels
          • update
          • create
          • list
          • get
          • get-credentials
        • node-group
          • Overview
          • update
          • create
          • list
          • get
          • list-nodes
          • list-operations
          • delete
          • remove-node-labels
          • add-node-labels
          • remove-labels
          • add-labels
          • remove-metadata
          • add-metadata
        • repository
          • Overview
          • lifecycle-policy
            • Overview
            • list-dry-run-affected-images
            • get-dry-run-result
            • list-dry-run-results
            • dry-run
            • delete
            • update
            • create
            • list
            • get
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • list
          • get
      • iam
        • Overview
        • federation
          • Overview
          • list-operations
          • list-user-accounts
          • add-user-accounts
          • delete
          • update
          • create
          • list
          • get
        • key
          • Overview
          • delete
          • create
          • list
          • get
        • access-key
          • Overview
          • delete
          • create
          • list
          • get
        • api-key
          • Overview
          • delete
          • list
          • create
          • get
        • user-account
          • Overview
          • get
        • role
          • Overview
          • list
          • get
        • service-account
          • Overview
          • list-operations
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • delete
          • update
          • create
          • list
          • get
        • certificate
          • Overview
          • update
          • create
          • list
          • get
          • list-operations
          • delete
        • create-token
      • logging
        • Overview
        • group
          • Overview
          • list-operations
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • list-resources
          • stats
          • delete
          • update
          • create
          • list
          • get
        • read
        • write
      • datatransfer
        • Overview
        • transfer
          • Overview
          • deactivate
          • activate
          • list
          • get
          • delete
          • update
          • create
        • endpoint
          • Overview
          • create
            • Overview
            • clickhouse-target
            • clickhouse-source
            • mongo-target
            • mongo-source
            • mysql-target
            • mysql-source
            • postgres-target
            • postgres-source
          • update
            • Overview
            • postgres-target
            • postgres-source
            • mysql-target
            • mysql-source
            • clickhouse-target
            • clickhouse-source
            • mongo-target
            • mongo-source
          • list
          • delete
          • get
      • serverless
        • Overview
        • api-gateway
          • Overview
          • remove-domain
          • add-domain
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • list-operations
          • delete
          • update
          • create
          • get-spec
          • list
          • get
        • container
          • Overview
          • revision
            • Overview
            • deploy
            • get
            • list
          • deny-unauthenticated-invoke
          • allow-unauthenticated-invoke
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • list-operations
          • delete
          • remove-labels
          • add-labels
          • rollback
          • update
          • create
          • list
          • get
        • mdbproxy
          • Overview
          • update
            • Overview
            • clickhouse
            • postgresql
          • create
            • Overview
            • clickhouse
            • postgresql
          • list-operations
          • delete
          • remove-labels
          • add-labels
          • list
          • get
        • function
          • Overview
          • version
            • Overview
            • logs
            • get-by-tag
            • remove-tag
            • set-tag
            • create
            • get
            • list
          • runtime
            • Overview
            • list
          • set-access-bindings
          • list-access-bindings
          • invoke
          • logs
          • list-operations
          • tag-history
          • delete
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
          • remove-scaling-policy
          • set-scaling-policy
          • list-scaling-policies
          • deny-unauthenticated-invoke
          • allow-unauthenticated-invoke
          • remove-access-binding
          • add-access-binding
        • trigger
          • Overview
          • create
            • Overview
            • billing-budget
            • logging
            • cloud-logs
            • container-registry
            • object-storage
            • internet-of-things
            • message-queue
            • timer
            • yds
          • delete
          • remove-labels
          • add-labels
          • update
          • list
          • get
          • pause
          • list-operations
          • resume
      • iot
        • Overview
        • mqtt
          • Overview
          • subscribe
          • publish
        • device
          • Overview
          • password
            • Overview
            • add
            • delete
            • list
          • certificate
            • Overview
            • delete
            • add
            • list
          • delete
          • remove-topic-aliases
          • add-topic-aliases
          • logs
          • update
          • create
          • list
          • get
        • registry
          • Overview
          • password
            • Overview
            • delete
            • add
            • list
          • certificate
            • Overview
            • add
            • list
            • delete
          • get
          • remove-labels
          • delete
          • add-labels
          • logs
          • update
          • create
          • list
          • list-device-topic-aliases
      • organization-manager
        • Overview
        • user
          • Overview
          • remove
          • list
        • organization
          • Overview
          • leave
          • list-operations
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • update
          • list
          • get
        • federation
          • Overview
          • saml
            • Overview
            • certificate
              • Overview
              • get
              • list
              • create
              • update
              • list-operations
              • delete
            • get
            • create
            • list
            • update
            • delete
            • add-user-accounts
            • list-user-accounts
            • list-operations
  1. CLI reference
  2. Service manage
  3. compute
  4. instance
  5. create

yc compute instance create

Written by
Yandex.Cloud
,
improved by
Julien W.

    Create a virtual machine instance

    Command Usage

    Syntax:

    yc compute instance create <INSTANCE-NAME> [Flags...] [Global Flags...]

    Flags

    Flag Description
    --name string
    A name of the instance.
    --description string
    Specifies a textual description of the instance.
    --labels key=value[,key=value...]
    A list of label KEY=VALUE pairs to add.
    --zone string
    The zone of the instance to create.
    --metadata key=value[,key=value...]
    Metadata to be made available to the guest operating system running on the instance. See for details https://cloud.yandex.ru/docs/compute/concepts/vm-metadata
    --metadata-from-file key=value[,key=value...]
    Same as --metadata except that the value for the entry will be read from a local file.
    --ssh-key string
    Creates user 'yc-user' and adds SSH key from specified file to authorized keys using cloud-config. If your need more flexibility, use cloud-config passed in 'user-data' metadata key.
    --public-ip If true, one-to-one NAT public IP will be created for the default network interface. Cannot be passed together with --network-interface
    --public-address string
    If set, one-to-one NAT public IP will be created for the default network interface with the specified value. Cannot be passed together with --network-interface
    --create-disk PROPERTY=VALUE[,PROPERTY=VALUE...]
    Creates and attaches persistent disks to the instance. Possible property names: name Specifies the name of the disk. type The type of the disk. To get a list of available disk types, run 'yc compute disk-type list'. The default disk type is network-hdd. size The size of the disk in GB. You can also use M and T suffixes to specify smaller or greater size respectively. If not specified, inferred size is used. If the disk is created from a snapshot, disk size of the snapshot is used. If the disk is created from an image, size of the image is used.If no source is specified, default disk size is used. block-size Specifies the block size of the disk in bytes. You can also use K and M suffixes. snapshot-name A source snapshot used to create the disk. snapshot-id An ID of the source snapshot used to create the disk. image-name A source image used to create the disk. image-id An ID of the source image used to create the disk. image-family An image family that is used to create the disk. image-folder-id The folder ID that is used to resolve references for image-name or image-family. disk-placement-group-id An ID of the placement group to create the disk in disk-placement-group-name A placement group to create the disk in device-name Specifies a unique serial number of your choice that is reflected into the /dev/disk/by-id/ tree of a Linux operating system running within the instance. auto-delete Specifies if this persistent disk will be automatically deleted when the instance is deleted.
    --attach-disk PROPERTY=VALUE[,PROPERTY=VALUE...]
    Attaches persistent disks to the instances. The specified disks must already exist. Possible property names: disk-name The disk to attach to the instance. disk-id An ID of the disk to attach to the instance. device-name Specifies a unique serial number of your choice that is reflected into the /dev/disk/by-id/ tree of a Linux operating system running within the instance. auto-delete Specifies if this persistent disk will be automatically deleted when the instance is deleted.
    --create-boot-disk PROPERTY=VALUE[,PROPERTY=VALUE...]
    Creates a new disk and uses it as a boot disk of the instance. Possible property names: name Specifies the name of the disk. type The type of the disk. To get a list of available disk types, run 'yc compute disk-type list'. The default disk type is network-hdd. size The size of the disk in GB. You can also use M and T suffixes to specify smaller or greater size respectively. If not specified, inferred size is used. If the disk is created from a snapshot, disk size of the snapshot is used. If the disk is created from an image, size of the image is used.If no source is specified, default disk size is used. block-size Specifies the block size of the disk in bytes. You can also use K and M suffixes. snapshot-name A source snapshot used to create the disk. snapshot-id An ID of the source snapshot used to create the disk. image-name A source image used to create the disk. image-id An ID of the source image used to create the disk. image-family An image family that is used to create the disk. image-folder-id The folder ID that is used to resolve references for image-name or image-family. disk-placement-group-id An ID of the placement group to create the disk in disk-placement-group-name A placement group to create the disk in device-name Specifies a unique serial number of your choice that is reflected into the /dev/disk/by-id/ tree of a Linux operating system running within the instance. auto-delete Specifies if this persistent disk will be automatically deleted when the instance is deleted.
    --use-boot-disk PROPERTY=VALUE[,PROPERTY=VALUE...]
    Uses an already existing disk as a boot disk of the instance. Possible property names: disk-name The disk to attach to the instance. disk-id An ID of the disk to attach to the instance. device-name Specifies a unique serial number of your choice that is reflected into the /dev/disk/by-id/ tree of a Linux operating system running within the instance. auto-delete Specifies if this persistent disk will be automatically deleted when the instance is deleted.
    --attach-filesystem PROPERTY=VALUE[,PROPERTY=VALUE...]
    Attaches filesystems to the instances. The specified filesystems must already exist. Possible property names: device-name This value can be used to reference the device for mounting, resizing, and so on, from within the instance. filesystem-name The filesystem to attach to the instance. filesystem-id An ID of the filesystem to attach to the instance.
    --attach-local-disk PROPERTY=VALUE[,PROPERTY=VALUE...]
    Attaches local disks to the instances. Possible property names: size The size of the local disk in bytes. You can also use M and T suffixes to specify MiB or TiB respectively.
    --network-settings PROPERTY=VALUE[,PROPERTY=VALUE...]
    Network settings for the instance. Possible property names: type Type of a network for virtual machine instance. Values: standard, software-accelerated
    --network-interface PROPERTY=VALUE[,PROPERTY=VALUE...]
    Adds a network interface to the instance. Possible property names: subnet-name Specifies the subnet that the interface will be part of. subnet-id Specifies the ID of the subnet that the interface will be part of. address Assigns the given internal address to the instance that is created. If no address is specified, some unassigned address from the subnet is used. ipv4-address Assigns the given internal IPv4 address to the instance that is created. If 'auto' used as value, some unassigned address from the subnet is used. nat-ip-version Specifies IP version for One-to-One NAT. Can be 'ipv4'. This flag can be applied to network interfaces with ipv4 address. nat-address Specifies public IP address for One-to-One NAT. This flag can be applied to network interfaces with ipv4 address. security-group-ids Security groups for the network interface, security-group-ids=[id1,id2],security-group-ids=id3 dns-record-spec DNS records in format {name=[,ttl=][,dns-zone-id=][,ptr={true
    --memory byteSize
    Specifies how much memory instance should have.
    --cores int
    Specifies how many CPU cores instance should have.
    --core-fraction int
    If provided, specifies baseline performance for a core in percent.
    --gpus int
    Specifies how many GPUs instance should have.
    --platform string
    Specifies platform for the instance.
    --hostname string
    Creates instance with specified hostname.
    --preemptible Creates preemptible instance.
    --placement-group-id string
    Placement group to create the instance in.
    --placement-group-name string
    Placement group to create the instance in.
    --host-group-id string
    Host group to create the instance in.
    --host-group-name string
    Host group to create the instance in.
    --host-id string
    Host to create the instance in.
    --service-account-id string
    Service account, which token can be obtained inside VM from metadata service.
    --service-account-name string
    Service account, which token can be obtained inside VM from metadata service.
    --image-folder-id string
    The folder ID against which all image and image family references will be resolved.
    --async Display information about the operation in progress, without waiting for the operation to complete.

    Global Flags

    Flag Description
    --profile string
    Set the custom configuration file.
    --debug Debug logging.
    --debug-grpc Debug gRPC logging. Very verbose, used for debugging connection problems.
    --no-user-output Disable printing user intended output to stderr.
    --retry int
    Enable gRPC retries. By default, retries are enabled with maximum 5 attempts. Pass 0 to disable retries. Pass any negative value for infinite retries. Even infinite retries are capped with 2 minutes timeout.
    --cloud-id string
    Set the ID of the cloud to use.
    --folder-id string
    Set the ID of the folder to use.
    --folder-name string
    Set the name of the folder to use (will be resolved to id).
    --token string
    Set the OAuth token to use.
    --format string
    Set the output format: text (default), yaml, json, json-rest.
    -h,--help Display help for the command.

    Was the article helpful?

    Language / Region
    © 2022 Yandex.Cloud LLC