Resize a Space
Change a local VM's CPU, memory or disk while keeping its files.
Spaces.resize boots a stopped local VM from its own disk after changing its shape. The disk can grow; its files stay in place.
Resize#
Methods of Spaces.
Spaces.resize#
Gives a local VM Space another shape: cpus vCPUs, memory_mb MiB
of memory, a disk grown to disk_gb GiB (each None keeps it). It
shuts down and boots again from its own disk (a stopped one boots),
so its files stay and its memory and processes do not. Returns once
it is ready again.
async def resize(self, space: str, cpus: Optional[int], memory_mb: Optional[int], disk_gb: Optional[int]) -> SpaceResizeReport| Parameter | Type | Default |
|---|---|---|
space | String | required |
cpus | Option<u32> | required |
memory_mb | Option<u64> | required |
disk_gb | Option<u32> | required |
Returns SpaceResizeReport · Async · Raises CuaError
SpaceResizeReport record#
What Spaces.resize did: the shape the Space has now.
Returned by Spaces.resize.
| Field | Type | Default | Description |
|---|---|---|---|
space | String | The Space. | |
cpus | Option<u32> | vCPUs (when changed). | |
memory_mb / memoryMb | Option<u64> | Memory in MiB (when changed). | |
disk_gb / diskGb | Option<u32> | Disk in GiB (when grown). | |
message | String | What happened, for people. |