Request an invite
Docs menu

osmates vm compact

Rewrite a stopped machine's disk image in fewer pieces, so snapshots and clones pause it for less time.

Usage
osmates vm compact <machine> [--json]

vm info says when a disk is in many pieces. The machine keeps its identity, snapshots and clones, which keep the old blocks until they are deleted. It needs room for the disk's data while it works, and takes minutes for a disk of tens of GB; Control-C cancels it and keeps the disk as it was. The copy takes the pieces the free space comes in: with less than 20 GiB left after it, the disk may stay fragmented, and the command says so before it starts.

Arguments

<machine>Required

The machine's name or identifier.

--json

Print machine-readable JSON.

JSON output

With --json, it prints an object with these fields.

JSON Schema: /schemas/0/cli/vm/compact.json

bytesWrittenintegerRequired

At least 0.

elapsedintegerRequired
extentsAfterintegerRequired
extentsBeforeintegerRequired

Exit statuses

Its exit status is one of these.

StatusMeaning
0The command did what it was asked.
1The command failed; with --json, standard error's last line is the error object.
64The command line is wrong, as ArgumentParser found before the command ran.
65What was given is wrong, found while the command ran; the same command fails until it changes.
75The same command can work later with nothing changed, as while an update finishes.
130Control-C cancelled what the command started.

Report a problem with this page