Commands · reference
vmlab validate
vmlab validate checks the lab file in the current directory against the schema, the semantic rules of the product contract, the local template store and the guest OS profiles, and changes nothing. Every side-effecting verb runs the same check first, so this is the way to see what up would refuse before it refuses it.
| Option | Meaning |
|---|---|
| -h, --help | Print help. |
What it checks
The verb finds the lab root by walking up from the current directory to a vmlab.wcl, the way git finds a repository. It then parses and schema-checks the file and runs the semantic validation, which resolves each VM's template through the store the way up will, so a version pin resolves the same way and a half-installed store entry reads as absent. Container hardware is resolved against the host architecture and the profile set. Every provision script the lab names is compiled by the wscript host, so a syntax error in a script is reported here rather than at the moment up reaches it. A registry template that has not been pulled yet is not an error; it is a deferred download.
On success the verb prints one line, `ok: lab "<name>" — N vm(s), N container(s), N segment(s)`. On failure it prints every issue as a report with the offending text underlined in the source, and prints nothing else.
Nothing here probes a running machine. In particular whether a dev machine's agent can serve the workspace syncer is checked when the syncer starts, deliberately not at validate, because it depends on a live agent handshake.
Examples
)))
Exit status
Exit status is 0 when the lab file is valid. Any issue, a missing lab file, or a profile set that cannot be loaded exits 1 (failed). A usage error exits 2.