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
| Flag | Description |
|---|---|
--count int | Number of VMs to create. If multiple specified, VMs will be created atomically with naming convention name-<number> (default: 1) |
--custom-image string | Custom VM Image. List available options with crusoe compute images list --custom-images-only |
--disk stringArray | Disk 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 string | Output format. Supported formats: pretty, json (default: "pretty") |
-h, --help | Help for create |
--ib-partition-id string | IB Partition if deploying with Infiniband |
--image string | VM Image. List available options with crusoe compute images list |
--json | Output in json format. Shorthand for --format json |
--keyfile string | Path 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 string | Project ID. Optional if Project Name is set in CRUSOE_DEFAULT_PROJECT env variable or the config file |
--project-name string | Project Name. Optional if set in CRUSOE_DEFAULT_PROJECT env variable or the config file |
--public-ip-type string | Public IP type. Allowed values: static, dynamic (default: "dynamic") |
--shutdown-script string | Path to shutdown script file. Must be a bash script smaller than 64 KB |
--startup-script string | Path 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 string | VPC 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