Skip to main content

lease

inctl vm lease

Lease a VM from a pool of VMs.

Synopsis

Lease a VM from a pool of VMs.

There are three ways to specify the VM to lease:

  1. Specify nothing and let the server choose a pool to lease from.
  2. Specify the pool name with --pool <pool-name>.
  3. Specify the runtime version with --runtime <runtime-version> and/or the IntrinsicOS version with --intrinsic-os <intrinsic-os-version>. If one of both are omitted, the server will backfill the missing with the latest version.

Example: inctl vm lease

or headless:

LEASEDVM=$(inctl vm lease --silent)

inctl vm lease [flags]

Options

  -a, --context-alias string    Instead of the VM name use an alias for the kubectl context (e.g., minikube). Implies --set-context.
-d, --duration string Desired duration of the lease. Optional. (default "30m")
-h, --help help for lease
--intrinsic-os string The IntinsicOS version to use for the pool's VMs. If not specified, the IntrinsicOS version at the time of execution will be set. The IntrinsicOS version should be in the form of 'YYYYMMDD.RCXX'.
-l, --pool string The pool to use. Optional.
--reservation-id string A UUID to check/create a reservation on lease failure. If empty, a new UUID will be generated if there are no ready VMs.
-r, --retry Retry a lease request until it succeeds. (default true)
--runtime string The intrinsic platform runtime version that the VM should run. Optional. If specified, a VM will be created with the specified runtime version. The runtime version should be in the form of 'intrinsic.platform.YYYYMMDD.RCXX'.
-c, --set-context Set the kubectl context using the VM identifier. (default true)
-s, --silent Suppress output and only print the vm identifier for leases.
-t, --timeout duration Abort the lease operation (most useful when combined with --retry) after the given duration. (default 20m0s)

Options inherited from parent commands

  -e, --email string     User email to be used for access control. Optional, will fall back to $USER@google.com if unset.
--org string The Intrinsic organization to use. You can set the environment variable
INTRINSIC_ORG=organization to set a default organization.
-o, --output string (optional) Output format. One of: (json, ndjson)
--print-trace Print the trace identifier when exiting.
-p, --project string The Google Cloud Project (GCP) project to use. You can set the environment variable
INTRINSIC_PROJECT=project_name to set a default project name.

SEE ALSO

  • inctl vm - Administer and work with virtual machines