Skip to main content

crusoe compute vms create

Create a new VM. Call crusoe compute vms start on the created VM before accessing it.

Usage

crusoe compute vms create --name <name> --type <type> --location <location> [flags]

Flags

FlagDescription
--count intNumber of VMs to create. If multiple specified, VMs will be created atomically with naming convention name-<number> (default: 1)
--custom-image stringCustom VM Image. List available options with crusoe compute images list --custom-images-only
--disk stringArrayDisk to attach as name=<name>,mode=<mode> or id=<id>,mode=<mode>. Repeat for multiple disks. Mode must be read-only or read-write
-f, --format stringOutput format. Supported formats: pretty, json (default: "pretty")
-h, --helpHelp for create
--ib-partition-id stringIB Partition if deploying with Infiniband
--image stringVM Image. List available options with crusoe compute images list
--jsonOutput in json format. Shorthand for --format json
--keyfile stringPath to ssh public key file. Optional if set in CRUSOE_SSH_PUBLIC_KEY_FILE env variable or the config file
--location string[Required] Location. List available locations with crusoe locations list
--name string[Required] VM name. Alphanumeric characters, underscores and dashes are allowed
--project-id stringProject ID. Optional if Project Name is set in CRUSOE_DEFAULT_PROJECT env variable or the config file
--project-name stringProject Name. Optional if set in CRUSOE_DEFAULT_PROJECT env variable or the config file
--public-ip-type stringPublic IP type. Allowed values: static, dynamic (default: "dynamic")
--shutdown-script stringPath to shutdown script file. Must be a bash script smaller than 64 KB
--startup-script stringPath to startup script file. Must be a bash script smaller than 64 KB
--type string[Required] VM type. List available types with crusoe compute vms types
--vpc-subnet-id stringVPC Subnet ID. Subnet the VM will be created in

Examples

Create a basic VM:

crusoe compute vms create \
--name my-vm \
--type a100-80gb.1x \
--location us-northcentral1-a \
--image ubuntu20.04-nvidia-slurm:latest

Create a VM with an attached disk:

crusoe compute vms create \
--name my-vm \
--type a100-80gb.1x \
--location us-northcentral1-a \
--image ubuntu20.04-nvidia-slurm:latest \
--disk name=my-disk,mode=read-write