dicer instance resize
Changes a running instance’s vCPUs or memory without restarting it, and its definition with them, so it keeps them when it next starts.
An instance grows only as far as the --max-vcpus and --max-memory it was
started with, and its memory shrinks no further than it was started with.
vCPUs change on Cloud Hypervisor on x86_64 only. The guest’s kernel must
support memory and CPU hotplug: virtio-mem, and CONFIG_HOTPLUG_CPU. To
give memory back, it needs memory_hotplug.online_policy=auto-movable,
which the default kernel arguments include: keep it if you set
--kernel-args.
Memory is resized in steps of 2MiB. On Firecracker, resize waits for the guest to take or give up the memory; Cloud Hypervisor cannot tell.
Usage
$ dicer instance resize NAME [flags]
Examples
$ dicer resize web --memory 4GiB
$ dicer resize web --vcpus 4 --memory 2GiB
Flags
| Flag | Description |
|---|---|
-m, --memory string | Memory, e.g. 512MiB or 2GiB. |
--vcpus int | Number of virtual CPUs. |
Global flags
| Flag | Description |
|---|---|
-D, --debug | Trace every call to the daemon on stderr (or set $DICER_DEBUG). |
-r, --remote string | Daemon to talk to: a remote’s name, or an address (unix:///PATH or HOST:PORT) (default $DICER_REMOTE, then the current remote, then local). |
--request-timeout duration | Give up on a single call to the daemon after this long, e.g. 30s (0: never; streams such as logs -f and exec are not bounded). |