$ cubic create --help
Create a VM instance
This command only creates the VM instance. Use cubic start <instance> to power
it on and cubic ssh <instance> to connect to it.
Examples:
Create a VM instance with 8 vCPUs, 10G of RAM, 200G of storage:
$ cubic create example1 --cpus 8 --memory 10G --disk 200G -i debian:trixie
Create a VM instance and forward the instance's HTTP port to the host port 8000:
$ cubic create example2 --port 8000:80 -i ubuntu
Create a VM instance and forward the instance's DNS port to the host port 5353:
$ cubic create example3 --port 5353:53/udp -i ubuntu
Create a VM instance with multiple port forwarding rules:
$ cubic create example4 -p 8000:80/tcp -p 5353:53/udp -i ubuntu:latest
Create a VM instance and install Vim:
$ cubic create example5 -e "sudo apt install -y vim" -i ubuntu
Create a VM instance without network access:
$ cubic create example6 --isolate -i ubuntu
Create a VM instance from a template (command line arguments override the template):
$ cubic create example7 --template ./my-template.toml
Create a VM instance with network access from a template that isolates it:
$ cubic create example8 --template ./my-template.toml --no-isolate
Every distribution has the tags latest and stable. The tag latest is the
newest release and the tag stable is the newest long term release. A plain
name is a shortcut for stable, so --image ubuntu gives you the last LTS.
Usage: cubic create [OPTIONS] <INSTANCE>
Arguments:
<INSTANCE>
Name of the virtual machine instance
Options:
-t, --template <TEMPLATE>
Template file with default values (e.g. --template ./my-template.toml)
-i, --image <IMAGE>
VM image name (e.g. 'debian:trixie', 'debian:latest' or 'debian')
-u, --user <USER>
Username of the guest account (default: your user name on the host)
-c, --cpus <CPUS>
Number of vCPUs for the VM instance (default: derived from host resources)
-m, --memory <MEMORY>
Memory amount of the VM instance (default: derived from host resources)
-d, --disk <DISK>
Disk size of the VM instance (default: 100G)
-p, --port <PORT>
Forward ports from guest to host (e.g. -p 8000:80 or -p 9000:90/tcp)
-e, --execute <EXECUTE>
Execute a command once on the first boot (repeatable, e.g. -e "sudo apt install ...")
--isolate
Isolate the VM instance from network
--no-isolate
Connect the VM instance to the network, even if the template isolates it
-v, --verbose
Increase logging output
-q, --quiet
Reduce logging output
-h, --help
Print help (see a summary with '-h')