Reads one node's disk back into a new .ndz image.
omf save <node> [options]
save takes one node, not a topology. It is the only omf command that
does.
| Option | Default | Meaning |
|---|---|---|
-n, --node NODE |
— | the node to save from (or give it positionally) |
-r, --resize SIZE |
-1 |
resize before saving; -1 shrinks to minimum so the image is small |
--regrow SIZE |
0 |
re-grow the node's partition after saving; 0 = full disk |
--no-regrow |
— | leave the node's partition shrunk |
-o, --timeout SECS |
900 |
image transfer timeout |
-b, --boot-timeout SECS |
inventory | PXE come-online timeout |
-d / -v / --debug |
— | as for every command |
1. Genericise the node first. On the node:
/root/prepare.sh
This strips what must not be cloned: the machine ID, SSH host keys, DHCP
leases, logs, hostname and the generated network config. Skip it and the
image is subtly broken — most visibly, every node booted from it shares a
machine-id and sshd dies a few minutes after boot.
2. Then save, from the console:
omf save -n node1-1.grid.cosmos-lab.org
Use the full FQDN with -n.
3. The result is named for you. omf save has no output-name flag — it
always writes <user>-<fqdn>-<epoch>.ndz into the image store. Rename it
afterwards if it is meant to be a reference image.
save shrinks the partition to minimum before reading it, so the .ndz is as
small as possible. Current versions then re-grow the node's partition
automatically — --regrow defaults to 0, meaning full disk.
So the node you saved from is left usable. That was not always true, and
older documentation still warns that a node is left with a near-full shrunk
partition after a save. If you are on a version without --regrow, or you pass
--no-regrow, that warning still applies and you can recover live:
printf 'Yes\n' | parted ---pretend-input-tty /dev/sda resizepart 1 100%
partprobe /dev/sda
resize2fs /dev/sda1
The image itself still contains a shrunk partition, though — which is why
loading it needs -r 0:
omf load -t <node> -i <your>.ndz -r 0
omf save writes the .ndz mode 0600. Frisbee checks readability as the
requesting user, so nobody but you can load it, and the error says the image
was "not found or not readable".
0644. chmod it, then touch it to0600.chmod run as root on the consoleRun the whole save cycle as your own uid rather than as root, and the
result is yours to rename and chmod.
A save freezes whatever is installed. Two things are worth doing first, and
both are deliberate operator steps rather than something prepare.sh does:
cosmos-* package, not just one, and read the versionscosmos-ifname bakes an old NIC-naming, DNSuhd4.9 image whose UHD silently became 4.10 has a false name).Author(s): COSMOS team · Last verified: 2026-09-11 — options from omf save --help on a live console; note that --regrow/--no-regrow are present in this version and change the long-standing "node left shrunk" behaviour · Tags: omf, user-guide, reference, imaging