Request an invite
Docs menu

osmates vm export

Write a shut-down machine's disk into a RAW or qcow2 file.

Usage
osmates vm export [<options>] <machine> <file>

osmatesd writes the disk from a clone, so the machine can start again at once. The file is made new; --replace writes over one that exists, which osmatesd empties only once it checked it: never a file in the OSMates library. RAW skips zeros on a volume that keeps holes; qcow2 is version 3 with 64 KiB clusters, which QEMU and the apps built on it read. A cancelled or failed export leaves no file it made, and a file it was replacing empty. Bring the disk back with osmates vm import <file>, or for Linux osmates vm create <name> --image <file>.

Arguments

<machine>Required

The machine, shut down.

<file>Required

The file to write.

--format <format>

The file's format.

One of raw, qcow2.

Default: raw

--disk <disk>

Which disk: 1 for the machine's own, 2 and on for the disks its import brought.

Default: 1

--replace

Write over the file if it exists.

--json

Print machine-readable JSON.

JSON output

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

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

diskintegerRequired
formatstringRequired

One of raw, qcow2.

machinestringRequired
virtualSizeintegerRequired

At least 0.

writtenintegerRequired

At least 0.

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