Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 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
      • wait
      • get
    • Service manage
      • managed-elasticsearch
        • Overview
        • cluster
          • Overview
          • reschedule-maintenance
          • remove-labels
          • add-labels
          • update-config
          • update
          • stop
          • start
          • list-operations
          • list-logs
          • list-backups
          • backup
          • delete
          • restore
          • create
          • list
          • get
        • hosts
          • Overview
          • delete
          • add
          • list
        • backup
          • Overview
          • list
          • get
        • extension
          • Overview
          • update
          • delete
          • create
          • list
          • get
        • resource-preset
          • Overview
          • list
          • get
      • managed-kafka
        • Overview
        • connector-mirrormaker
          • Overview
          • update
          • create
        • connector-s3-sink
          • Overview
          • update
          • create
        • cluster
          • Overview
          • reschedule-maintenance
          • move
          • update
          • 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
        • connector
          • Overview
          • get
          • resume
          • pause
          • delete
          • list
      • load-balancer
        • Overview
        • target-group
          • Overview
          • list-operations
          • remove-targets
          • add-targets
          • delete
          • update
          • create
          • list
          • get
        • network-load-balancer
          • Overview
          • list-operations
          • remove-listener
          • add-listener
          • target-states
          • detach-target-group
          • attach-target-group
          • stop
          • start
          • delete
          • update
          • create
          • list
          • get
      • dataproc
        • Overview
        • cluster
          • Overview
          • list-operations
          • list-ui-links
          • list-hosts
          • stop
          • start
          • delete
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
        • subcluster
          • Overview
          • delete
          • update
          • create
          • list
          • get
        • job
          • Overview
          • cancel
          • create-hive
          • create-mapreduce
          • create-pyspark
          • create-spark
          • log
          • list
          • get
        • resource-preset
          • Overview
          • get
          • list
      • application-load-balancer
        • Overview
        • load-balancer
          • Overview
          • 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
          • create
          • list
          • get
          • logging
          • autoscale
          • target-states
        • target-group
          • Overview
          • remove-targets
          • add-targets
          • delete
          • update
          • create
          • list
          • get
        • backend-group
          • Overview
          • delete-stream-backend
          • update-stream-backend
          • add-stream-backend
          • delete-grpc-backend
          • update-grpc-backend
          • add-grpc-backend
          • delete-http-backend
          • update-http-backend
          • add-http-backend
          • delete
          • update
          • create
          • list
          • get
        • http-router
          • Overview
          • delete
          • update
          • create
          • list
          • get
        • virtual-host
          • Overview
          • insert-http-route
          • remove-http-route
          • prepend-http-route
          • append-http-route
          • delete
          • update
          • create
          • list
          • get
          • update-grpc-route
          • insert-grpc-route
          • remove-grpc-route
          • prepend-grpc-route
          • append-grpc-route
          • update-http-route
      • managed-mongodb
        • Overview
        • 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
          • start
          • move
          • list-operations
          • list-logs
          • list-backups
          • backup
          • delete
          • remove-labels
          • add-labels
          • update-config
          • update
          • reschedule-maintenance
          • restore
          • create
          • list
          • get
        • hosts
          • Overview
          • stepdown
          • restart
          • resetup
          • delete
          • add
          • list
        • database
          • Overview
          • list
          • get
          • delete
          • create
      • managed-mysql
        • 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
        • cluster
          • Overview
          • stop
          • start
          • move
          • list-operations
          • list-logs
          • list-backups
          • backup
          • delete
          • remove-labels
          • add-labels
          • update-config
          • update
          • reschedule-maintenance
          • start-failover
          • restore
          • create
          • list
          • get
        • hosts
          • Overview
          • add
          • list
          • delete
          • update
      • managed-sqlserver
        • Overview
        • host
          • Overview
          • update
          • 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
          • list
          • get
          • create
          • stop
          • start
          • list-operations
          • list-backups
          • backup
          • delete
          • remove-labels
          • add-labels
          • update-config
          • update
          • start-failover
          • restore
      • managed-redis
        • Overview
        • cluster
          • Overview
          • start
          • move
          • list-operations
          • list-logs
          • list-backups
          • backup
          • rebalance
          • delete
          • remove-labels
          • add-labels
          • update-config
          • update
          • reschedule-maintenance
          • start-failover
          • restore
          • create
          • list
          • get
          • stop
        • hosts
          • Overview
          • delete
          • update
          • 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
          • add-labels
          • update-config
          • update
          • reschedule-maintenance
          • start-failover
          • restore
          • create
          • list
          • get
          • stop
          • start
          • move
          • list-operations
          • list-logs
          • list-backups
          • backup
          • delete
          • remove-labels
      • 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
      • dns
        • Overview
        • zone
          • Overview
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • list-operations
          • remove-labels
          • add-labels
          • replace-records
          • delete-records
          • add-records
          • list-records
          • delete
          • update
          • create
          • list
          • get
        • bind-file
          • Overview
          • migrate-to-terraform
      • vpc
        • Overview
        • security-group
          • Overview
          • update-rule-meta
          • update-rules
          • move
          • list-operations
          • delete
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
        • 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
        • gateway
          • Overview
          • move
          • list-operations
          • delete
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
        • network
          • Overview
          • move
          • list-operations
          • list-route-tables
          • list-security-groups
          • list-subnets
          • delete
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
        • route-table
          • Overview
          • create
          • list
          • get
          • move
          • list-operations
          • delete
          • remove-labels
          • add-labels
          • update
      • cdn
        • Overview
        • resource
          • Overview
          • delete
          • get-provider-cname
          • update
          • create
          • list
          • get
        • origin
          • Overview
          • delete
          • update
          • create
          • list
          • get
        • origin-group
          • Overview
          • delete
          • update
          • create
          • list
          • get
        • provider
          • Overview
          • activate
          • list-activated
        • cache
          • Overview
          • prefetch
          • purge
      • 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
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • delete
          • list
          • get
        • database
          • Overview
          • list-access-bindings
          • remove-labels
          • add-labels
          • delete
          • start
          • stop
          • update
          • restore
          • backup
          • move
          • create
          • list
          • get
          • set-access-bindings
          • remove-access-binding
          • add-access-binding
      • managed-clickhouse
        • Overview
        • shards
          • Overview
          • delete
          • update-config
          • update
          • add
          • list
          • get
        • shard-groups
          • Overview
          • delete
          • update
          • create
          • list
          • get
        • database
          • Overview
          • delete
          • create
          • list
          • get
        • user
          • Overview
          • remove-quota
          • update-quota
          • add-quota
          • revoke-permission
          • grant-permission
          • delete
          • update
          • create
          • 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
        • cluster
          • Overview
          • 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
          • reschedule-maintenance
          • restore
          • create
          • list
          • get
        • hosts
          • Overview
          • add
          • list
          • update
          • delete
        • version
          • Overview
          • list
      • certificate-manager
        • Overview
        • certificate
          • Overview
          • get
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • list-operations
          • delete
          • update
          • request
          • create
          • list
          • content
      • lockbox
        • Overview
        • payload
          • Overview
          • get
        • secret
          • Overview
          • remove-access-binding
          • set-access-bindings
          • add-access-binding
          • list-access-bindings
          • list-operations
          • cancel-version-destruction
          • schedule-version-destruction
          • deactivate
          • activate
          • add-version
          • update
          • create
          • list-versions
          • list
          • get
          • delete
      • storage
        • Overview
        • bucket
          • Overview
          • delete-https
          • set-https
          • get-https
          • stats
          • delete
          • update
          • create
          • get
          • list
      • cloud-desktop
        • Overview
        • desktop
          • Overview
          • reset-password
          • delete
          • create
          • list-operations
          • get-rdp-file
          • list
          • get
        • group
          • Overview
          • delete
          • create
          • list-operations
          • list-desktops
          • list
          • get
          • remove-access-bindings
          • add-access-bindings
          • set-access-bindings
          • list-access-bindings
      • 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
          • list-instances
          • list-hosts
          • delete
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
        • disk-placement-group
          • Overview
          • list-operations
          • list-disks
          • delete
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
        • filesystem
          • Overview
          • get
          • remove-labels
          • add-labels
          • resize
          • update
          • delete
          • create
          • list-operations
          • list
        • snapshot
          • Overview
          • list-operations
          • delete
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
        • snapshot-schedule
          • Overview
          • list-snapshots
          • list-disks
          • list-operations
          • delete
          • remove-labels
          • add-labels
          • remove-disks
          • add-disks
          • update
          • enable
          • disable
          • create
          • list
          • get
        • zone
          • Overview
          • list
          • get
        • instance-group
          • Overview
          • 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
          • remove-labels
          • add-labels
          • remove-metadata
          • add-metadata
          • start
          • stop
        • disk
          • Overview
          • list-operations
          • move
          • delete
          • resize
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
        • disk-type
          • Overview
          • list
          • get
        • image
          • Overview
          • get-latest-from-family
          • list
          • get
          • list-operations
          • delete
          • remove-labels
          • add-labels
          • update
          • create
        • instance
          • Overview
          • 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
          • list
          • get
          • list-operations
        • connect-to-serial-port
      • managed-greenplum
        • Overview
        • cluster
          • Overview
          • stop
          • start
          • list-operations
          • list-logs
          • expand
          • list-backups
          • delete
          • restore
          • create
          • remove-labels
          • add-labels
          • list
          • update-config
          • update
          • get
        • resource-preset
          • Overview
          • get
            • Overview
            • segment
            • master
          • list
            • Overview
            • segment
            • master
        • hosts
          • Overview
          • list
            • Overview
            • segment
            • master
      • logging
        • Overview
        • group
          • Overview
          • get
          • list
          • list-operations
          • add-access-binding
          • remove-access-binding
          • set-access-bindings
          • list-access-bindings
          • list-resources
          • stats
          • delete
          • update
          • create
        • write
        • read
      • iam
        • Overview
        • 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
          • list-operations
          • delete
          • update
          • create
          • list
          • get
        • federation
          • Overview
          • update
          • create
          • list
          • get
          • list-operations
          • list-user-accounts
          • add-user-accounts
          • delete
        • access-key
          • Overview
          • delete
          • create
          • list
          • get
        • api-key
          • Overview
          • delete
          • create
          • list
          • get
        • key
          • Overview
          • delete
          • create
          • list
          • get
        • user-account
          • Overview
          • get
        • create-token
      • 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
          • remove-labels
          • add-labels
          • remove-metadata
          • add-metadata
          • update
          • create
          • list
          • get
          • list-nodes
          • list-operations
          • delete
          • remove-node-labels
          • add-node-labels
        • create-token
        • list-versions
      • container
        • Overview
        • node-group
          • Overview
          • list-nodes
          • list-operations
          • delete
          • remove-node-labels
          • add-node-labels
          • remove-labels
          • add-labels
          • remove-metadata
          • add-metadata
          • update
          • create
          • list
          • get
        • 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
          • list-vulnerabilities
          • list-scan-results
          • get-last-scan-result
          • get-scan-result
          • scan
          • delete
          • list
          • get
        • cluster
          • Overview
          • list
          • get
          • get-credentials
          • list-nodes
          • list-operations
          • list-node-groups
          • start
          • stop
          • delete
          • remove-labels
          • add-labels
          • update
          • create
        • 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
          • get
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • list
      • serverless
        • Overview
        • api-gateway
          • Overview
          • websocket
            • Overview
            • disconnect
            • send
            • get
          • 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
          • remove-scaling-policy
          • set-scaling-policy
          • list-scaling-policies
          • deny-unauthenticated-invoke
          • allow-unauthenticated-invoke
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • invoke
          • logs
          • list-operations
          • tag-history
          • delete
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
        • trigger
          • Overview
          • create
            • Overview
            • mail
            • yds
            • billing-budget
            • logging
            • cloud-logs
            • container-registry
            • object-storage
            • iot-broker
            • internet-of-things
            • message-queue
            • timer
          • update
          • list
          • get
          • list-operations
          • resume
          • pause
          • delete
          • remove-labels
          • add-labels
      • 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
            • mongo-source
            • mysql-target
            • mysql-source
            • postgres-target
            • postgres-source
            • mongo-target
            • clickhouse-target
            • clickhouse-source
          • list
          • delete
          • get
      • iot
        • Overview
        • mqtt
          • Overview
          • subscribe
          • publish
        • registry
          • Overview
          • certificate
            • Overview
            • delete
            • add
            • list
          • password
            • Overview
            • delete
            • add
            • list
          • list-device-topic-aliases
          • delete
          • remove-labels
          • add-labels
          • logs
          • update
          • create
          • list
          • get
        • broker
          • Overview
          • certificate
            • Overview
            • delete
            • add
            • list
          • password
            • Overview
            • delete
            • add
            • list
          • logs
          • delete
          • remove-labels
          • add-labels
          • update
          • create
          • list
          • get
        • device
          • Overview
          • certificate
            • Overview
            • delete
            • add
            • list
          • password
            • Overview
            • add
            • list
            • delete
          • add-topic-aliases
          • logs
          • update
          • create
          • list
          • get
          • delete
          • remove-topic-aliases
      • organization-manager
        • Overview
        • organization
          • Overview
          • leave
          • list-operations
          • remove-access-binding
          • set-access-bindings
          • add-access-binding
          • list-access-bindings
          • update
          • list
          • get
        • user
          • Overview
          • remove
          • list
        • group
          • Overview
          • remove-members
          • add-members
          • list-members
          • remove-access-binding
          • add-access-binding
          • set-access-bindings
          • list-access-bindings
          • list-operations
          • delete
          • update
          • create
          • list
          • get
        • federation
          • Overview
          • saml
            • Overview
            • certificate
              • Overview
              • list
              • get
              • create
              • update
              • delete
              • list-operations
            • create
            • list
            • get
            • 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. For example, to add two labels named 'foo' and 'bar', both with the value 'baz', use '--labels foo=baz,bar=baz'.
    --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-options PROPERTY=VALUE[,PROPERTY=VALUE...]
    Options set the access mode to instance's metadata.

    Possible property names:
    • aws-v1-http-endpoint: Enables access to AWS flavored metadata (IMDSv1). Values: enabled, disabled
    • aws-v1-http-token: Enables access to IAM credentials with AWS flavored metadata (IMDSv1). Values: enabled, disabled
    • gce-http-endpoint: Enables access to GCE flavored metadata. Values: enabled, disabled
    • gce-http-token: Enables access to IAM credentials with GCE flavored metadata. Values: enabled, disabled
    --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=<name>[,ttl=<ttl>][,dns-zone-id=<id>][,ptr={true|false}]}
    --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).
    --endpoint string
    Set the Cloud API endpoint (host:port).
    --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
    Yandex project
    © 2023 Yandex.Cloud LLC