Playing a dsoxlab lab means repeating the same steps in the same order: start, work, check, then start over or clean up. This page opens the "Playing a lab" module. It lays the commands out in the order you type them, says when each one is useful and points to the lesson that covers it in detail. It is written for anyone who has already played the demonstration lab and chosen a catalogue. You can also come back to it to find, at a glance, the command to type.
What you will learn
- Name the order of a lab's commands, from start to cleanup.
- Know which lesson of the module covers each step in detail.
- Stop a lab's machines without destroying them, with
infra stopandinfra start. - Tell
status, which talks about the lab, frominfra status, which talks about the machines. - Recognise the three pairs that get mixed up:
runandstart,checkandsubmit,resetandclean. - Name
login,pushandlogout, the three sending commands, detailed in the lesson Send your results.
In what order do you type a lab's commands?
A lab is played in five steps: prepare the machine, start, work, check, then
undo. Each step has its commands, and the table below lists them in order. The
last column says which lesson covers the step in detail: this page only places
it. On a shell lab, provision and destroy are of no use, since there is no
machine to bring up or take down.
| Step | Command | What it does | Where to learn it |
|---|---|---|---|
| Prepare | dsoxlab catalog add <id or URL>, dsoxlab doctor, dsoxlab use <section>, dsoxlab list-labs, dsoxlab show <id>, dsoxlab next | Install a catalogue, check the machine, set a context, pick a lab | Catalogues and Finding a lab |
| Start | dsoxlab start <id>, or dsoxlab provision then dsoxlab run <id> | Prepare the environment and open the session | Starting a lab |
| Work | dsoxlab challenge, course, guide, ssh, hint | Read the mission, the course, enter a machine, pay for a hint | Working in the lab |
| Check | dsoxlab check <id> or dsoxlab submit <id>, dsoxlab status | Run the tests, record the attempt, read the lab's state | Getting your work checked |
| Undo | dsoxlab reset <id>, dsoxlab clean <id>, dsoxlab destroy, dsoxlab infra stop --all | Start from zero, delete what the lab created, take the machines down, or only stop them | Starting over or cleaning up |
As soon as a lab is active, its identifier becomes optional: dsoxlab check knows which lab you are in. Since identifiers are long, the lesson
Installing dsoxlab locally also explains how
to enable shell completion.
What does a lab's loop look like?
The loop is always the same: read, produce a state, let check measure it,
fix if a test stays red. You have already been through it in the first lab,
and the diagram below recalls it. Follow the arrow that goes back from check
to "Produce": a red test closes nothing, you fix and run again, as many times as
needed. The dotted line is the hint, optional, and it costs points.
The tests read the state you produced, not the commands you typed: any path to the right state is valid. That is the rule that makes the loop fair, and it holds for every lab on the site.
Which three pairs of commands get mixed up?
Three pairs look alike and do not do the same thing: run and start,
check and submit, reset and clean. Reading them side by side avoids the
costliest mistake, typing the most destructive one thinking you typed the other.
| Pair | First command | Second command |
|---|---|---|
| Start | run prepares the environment and opens the session, without ever bringing the machines up | start plays the whole sequence (context, prerequisites, infrastructure, run) announcing each step |
| Check | check records the attempt and leaves the session open | submit records it the same way, returns a mock exam's verdict, then closes the session |
| Undo | reset puts the lab back to its initial state and erases the hints taken | clean deletes what the lab created, without touching the hints |
A fourth confusion comes from the name. dsoxlab status says where the lab
stands, through a stable state (not_started, ready, in_progress,
validated, degraded). dsoxlab infra status says which machines answer
over SSH. The first never talks about the machines, the second never talks
about the lab. The same line separates dsoxlab infra start, which turns
stopped machines back on, from dsoxlab start <lab>, which plays a lab.
Which commands prepare the catalogue?
Six commands come before any lab. dsoxlab catalog add installs a catalogue by
its name or by its repository URL. dsoxlab doctor says what that catalogue
requires and what is missing on the machine. dsoxlab use sets the active
section, dsoxlab list-labs and dsoxlab show describe the labs, and
dsoxlab next suggests the first lab with no result. This page does not detail
them: the lesson Installing and managing your dsoxlab lab
catalogues covers catalog, the lesson Finding
your next lab covers use, list-labs, show
and next, and the lesson Installing dsoxlab
locally covers doctor.
Keep one point in mind before going on: progress lives in the catalogue
itself, in a .dsoxlab.db file at its root. Removing a catalogue with
catalog remove, or reinstalling it with catalog add --force, therefore
removes its history with it.
How do you stop the machines without destroying them?
To free your machine's memory without losing a lab's machines, type
dsoxlab infra stop --all, then dsoxlab infra start --all to bring them
back.
If your dsoxlab does not know these commands, it is too old: update it with
uv tool upgrade dsoxlab.
Three commands act on the catalogue's machines without deleting any. The table says what each one does and what it changes for your machine.
| Command | What it does | Effect on your machine |
|---|---|---|
dsoxlab infra stop | Shuts down each machine's system cleanly and waits until it is off, 120 seconds by default (--timeout changes that delay) | Frees the memory. The disks stay |
dsoxlab infra pause | Freezes the machines | Frees the processor, but not the memory, which stays in use |
dsoxlab infra start | Restarts the stopped machines and resumes the frozen ones | Stopped machines take their memory back, frozen machines their processor |
These commands do not guess which machines to target: you must always name
them. --host web targets one, and you repeat the option to target several
(short name, or full name such as web.lab). --all targets every machine in
the catalogue. With neither, the command is refused, because shutting down the
whole fleet has to be your choice. Only the machines that the catalogue's
meta.yml declares are touched, never another machine on the hypervisor, the
software that runs virtual machines. Typing the same command twice changes
nothing more: a machine that is already stopped, frozen or restarted is left as
it is.
The example below stops the whole catalogue, checks that no machine answers any more, then brings them back.
dsoxlab infra stop --all # frees the memory, keeps the disksdsoxlab infra status # reports each machine that is not running, with its statedsoxlab infra start --all # restarts the stopped machinesIf a machine is still running when the delay ends, infra stop reports it and
exits with code 1. Add --force then: it cuts the machine's power, without
deleting anything. Finally, these three commands only work with the kvm and
incus providers, the ones that run the machines on your computer. With
outscale, which has no local hypervisor, they are refused with code 2.
infra start turns the machines back on, but opens no lab. To pick a lab
back up after a shutdown, first type dsoxlab infra start --all, check with
dsoxlab infra status that the machines answer, then type dsoxlab start <lab>, which prepares the lab and opens the session. As long as a machine is
stopped or frozen, dsoxlab check and dsoxlab ssh fail because it does not
answer, not because your work is wrong: restart it before drawing a conclusion.
How do you follow your progress with progress and scores?
dsoxlab progress shows progress by block: labs completed, average score,
challenges and capstones. On a long course, it is the command that says what is
left to prove. dsoxlab scores lists the full history of recorded marks, failed
attempts included, and --top sets the number of lines. A Verdict column
appears on catalogues that declare at least one mock exam.
dsoxlab progressdsoxlab scores --top 10In the Verdict column, a mock exam shows reçu (75%) or recalé (75%) (passed or
failed, as the French-language CLI prints them), and an ordinary lab ·. The
percentage in parentheses is the mock exam's pass mark, not the mark obtained.
progress and scores accept --json, like list-labs, show, next,
check, status, doctor, validate-structure and support: the document
returned carries a schema field, and verdicts are read in stable tokens, never
in a translated label.
How do you send your evidence to your account?
Three commands carry the sending of results from the terminal, and nothing
leaves until you type one of them: check and submit never send anything. The
lesson Send your results details each of
them, with and without an account, and says what leaves and what never does.
dsoxlab login # opens the browser, then writes the local sessiondsoxlab login --no-browser # prints the URL to open elsewhere, and waits for the return URLdsoxlab push --dry-run # says what would leave, and stops theredsoxlab push # sends the current catalogue's attemptsdsoxlab logout # forgets this portal's local sessionSending is voluntary from end to end. Three conditions must coincide: the
catalogue declares a learning.sync block in its meta.yml, you have run
dsoxlab login, and you type dsoxlab push. push merges with what the
account already holds, without overwriting anything.
The manual route still exists: dsoxlab export writes a JSON file that you
import in your browser, a step described in the lesson Send your
results. It stays useful when the machine
that plays the labs cannot reach the portal, as Progress and
data explains.
Which options apply to every command?
Three options go before the command: --verbose or -v, repeatable, --debug,
equivalent to -vv, and --version. Whatever the verbosity, the full log is
written to ~/.local/state/dsoxlab/dsoxlab.log, never to standard output:
there is no need to replay a command to know what it did, and --json stays
readable by a program even in verbose mode.
dsoxlab -vv provisiondsoxlab --versiondsoxlab fullhelp # the platform's full guide, in the terminaldsoxlab <command> --help # a command's optionsCheck your version with dsoxlab --version, and keep the tool up to date
(uv tool upgrade dsoxlab): an old version will not reproduce everything the
Start, Work, Check and Start over lessons show.
The rest of the CLI, validate-structure, new, support and completion,
serves the catalogue author and diagnostics. Creating a catalogue is the subject
of the lesson Creating a course and its challenges from A to
Z, and the exit codes are in Files,
variables and exit codes.
Troubleshooting
None of these cases is a breakdown: the command typed assumed another one,
or the chosen scope contains nothing. The
message says so every time, and start avoids the first case by chaining
provision itself.
| Symptom | Cause | Solution |
|---|---|---|
run exits with 2 on a vm lab and names provision | The machines do not exist yet | dsoxlab provision, or dsoxlab start <id> which chains it |
provision exits with 1 without starting, for lack of a key | No private key in the catalogue's ssh/: it is never committed | dsoxlab instructor bootstrap, once per clone (trainer infrastructure) |
next exits with 1 and suggests nothing | The active scope contains no lab: wrong section or level, or empty catalogue | dsoxlab use --reset to get the whole catalogue back, then dsoxlab list-labs |
Key points
- A lab is played in five steps: prepare, start, work, check, undo.
startchains context, prerequisites, infrastructure andrun, announcing each step;runalone never provisions.checkrecords an attempt and leaves the session open;submitdoes the same then closes the session.resetputs the lab back to zero and erases the hints taken;cleandeletes what the lab created, without touching the hints.statustalks about the lab,infra statustalks about the machines.infra stop --allfrees the memory and keeps the disks;destroydeletes the machines and their disks.- The tests read the state produced, never the commands typed.
pushsends the evidence to the account, and nothing leaves without the three conditions:learning.syncdeclared,loginrun,pushtyped.- The full log is always in
~/.local/state/dsoxlab/dsoxlab.log.
Knowledge check
Check that you have the essentials of this guide. The questions only cover what has just been explained here.
Knowledge check
Check what you have learned with this interactive quiz
How it works
- The timer starts when you click Start
- Multiple choice, true/false and short answer questions
- You can move between questions
- Detailed results are shown at the end
Starts the quiz and the timer
Review
(0/0)Result saved on this device. It will be sent to your account at the next sync. Sync now
Score by domain
A domain groups several guides and gets several questions, so its score is more reliable than a per-topic score, which often rests on a single question.
Summary
Strengths
No topic passed at 80% on at least two questions yet.
Weak areas
No topic below the pass mark.
Recommended next
Hints before you try again?
Continue the course: Starting a dsoxlab lab with dsoxlab start
A new full quiz with random questions
Work again only on the questions you missed