Files
ubicloud/spec/routes/api/cli/golden-files/help -r vm.txt
Jeremy Evans cbaba385b2 Have cli vm create command check public key format and provide specific error message
Also, show examples in vm create usage that indicate how to
properly provide the public key using command substitution.
2025-04-26 05:34:41 +09:00

113 lines
3.2 KiB
Plaintext

Manage virtual machines
Usage:
ubi vm command [...]
ubi vm (location/vm-name | vm-id) [post-options] post-command [...]
Commands:
list List virtual machines
Post Commands:
create Create a virtual machine
destroy Destroy a virtual machine
restart Restart a virtual machine
scp Copy files to or from virtual machine using `scp`
sftp Copy files to or from virtual machine using `sftp`
show Show details for a virtual machine
ssh Connect to a virtual machine using `ssh`
Post Options:
-4, --ip4 use IPv4 address
-6, --ip6 use IPv6 address
-u, --user user override username
List virtual machines
Usage:
ubi vm list [options]
Options:
-f, --fields=fields show specific fields (comma separated)
-l, --location=location only show virtual machines in given location
-N, --no-headers do not show headers
Allowed Option Values:
Fields: location name id ip4 ip6
Create a virtual machine
Usage:
ubi vm location/vm-name create [options] public_key
Examples:
ubi vm eu-central-h1/my-vm-name create "$(cat ~/.ssh/id_ed25519.pub)"
ubi vm eu-central-h1/my-vm-name create "$(cat ~/.ssh/authorized_keys)"
Options:
-6, --ipv6-only do not enable IPv4
-b, --boot-image=image_name boot image
-p, --private-subnet-id=id place VM into specific private subnet
-s, --size=size server size
-S, --storage-size=size storage size
-u, --unix-user=username username (default: ubi)
Allowed Option Values:
Boot Image: ubuntu-noble ubuntu-jammy debian-12 almalinux-9
Size: standard-2 standard-4 standard-8 standard-16 standard-30 standard-60
burstable-1 burstable-2
Storage Size: 10 20 40 80 160 320 600 640 1200 2400
Destroy a virtual machine
Usage:
ubi vm (location/vm-name | vm-id) destroy [options]
Options:
-f, --force do not require confirmation
Restart a virtual machine
Usage:
ubi vm (location/vm-name | vm-id) restart
Copy files to or from virtual machine using `scp`
Usage:
ubi vm (location/vm-name | vm-id) [options] scp [scp-options] (local-path :remote-path | :remote-path local-path)
Copy files to or from virtual machine using `sftp`
Usage:
ubi vm (location/vm-name | vm-id) [options] sftp [sftp-options]
Show details for a virtual machine
Usage:
ubi vm (location/vm-name | vm-id) show [options]
Options:
-f, --fields=fields show specific fields (comma separated)
-r, --rule-fields=fields show specific firewall rule fields (comma separated)
-w, --firewall-fields=fields show specific firewall fields (comma separated)
Allowed Option Values:
Fields: id name state location size unix-user storage-size-gib ip6
ip4-enabled ip4 private-ipv4 private-ipv6 subnet firewalls
Firewall Rule Fields: id cidr port-range
Firewall Fields: id name description location path firewall-rules
Connect to a virtual machine using `ssh`
Usage:
ubi vm (location/vm-name | vm-id) [options] ssh [ssh-options --] [remote-cmd [remote-cmd-arg ...]]