Commands Reference
Complete reference for all ServoBox commands.
Overview
ServoBox provides a simple command-line interface for managing RT VMs:
Commands
init
Create and configure a new RT VM (without starting it).
Usage:
Options:
| Option | Description | Default |
|---|---|---|
--name NAME |
VM domain name | servobox-vm |
--vcpus N |
Number of virtual CPUs | 4 |
--mem MiB |
Memory size in MiB | 8192 |
--disk GB |
Disk size in GB | 40 |
--bridge NAME |
Use host bridge instead of NAT | (NAT) |
--host-nic DEV |
Add direct NIC (macvtap), max 2, repeatable | none |
--choose-nic |
Interactively select host NICs (max 2) | no prompt |
--image PATH |
Use local base image | (download) |
--ip CIDR |
Static IP for NAT NIC | 192.168.122.100/24 |
--ssh-pubkey PATH |
Use specific SSH public key | (auto-detect) |
--ssh-key PATH |
Use specific SSH private key for connection | (auto-detect) |
Examples:
# Default configuration
servobox init
# Custom specifications
servobox init --vcpus 6 --mem 16384 --disk 80
# Named VM for specific project
servobox init --name franka-dev --vcpus 4
# Use local base image
servobox init --image ./base.qcow2
# Bridge networking
servobox init --bridge br0
# Add direct NIC for robot (single device)
servobox init --host-nic eth0
# Dual robot setup
servobox init --host-nic eth0 --host-nic eth1
# Interactive NIC selection
servobox init --choose-nic
# Custom static IP
servobox init --ip 192.168.122.50/24
# Use specific SSH key
servobox init --ssh-pubkey ~/.ssh/my-key.pub
What it does:
- Downloads or locates base RT image
- Creates VM storage directory
- Creates VM disk from base image
- Generates cloud-init seed ISO
- Defines libvirt domain with RT configuration
- Applies CPU pinning and IRQ affinity
start
Start a VM and apply RT configuration.
Usage:
Examples:
What it does:
- Starts the libvirt domain
- Applies CPU pinning to isolated cores
- Configures IRQ affinity
- Waits for VM to boot
stop
Gracefully shutdown a VM.
Usage:
Examples:
Note: This performs a graceful shutdown (ACPI). For force power-off, use virsh destroy <name>.
status
Show VM status and configuration information.
Usage:
Examples:
Output includes:
- VM state (running, shut off, etc.)
- vCPU count and pinning
- Memory allocation
- Network interfaces and IP addresses
- Disk paths
ip
Print the VM's IPv4 address.
Usage:
Examples:
ssh
SSH into the VM as user servobox-usr.
Usage:
Examples:
Note: Uses your local SSH keys (automatically added via cloud-init).
network-setup
Interactive wizard to configure network interfaces after VM creation.
Usage:
Examples:
# Configure network for default VM
servobox network-setup
# Configure named VM
servobox network-setup --name franka-dev
What it does:
- Checks if VM exists and stops it if running
- Launches interactive wizard to select host NICs (up to 2)
- Reconfigures VM network interfaces
- Injects persistent netplan configuration
- Redefines VM with new network setup
Use cases:
- Add direct NICs after initial VM creation
- Change network configuration for new devices
- Set up dual robot communication
- Switch NICs when hardware changes
destroy
Power off and remove the VM and all associated storage.
Usage:
Examples:
⚠️ Warning: This permanently deletes the VM disk! There is no undo.
What it does:
- Powers off the VM (if running)
- Undefines the libvirt domain
- Deletes VM storage directory (
/var/lib/libvirt/images/servobox/<name>/)
test
Run cyclictest to measure RT latency.
Usage:
Options:
| Option | Description | Default |
|---|---|---|
--duration SEC |
Test duration in seconds | 60 |
--stress-ng |
Enable host stress testing | disabled |
Examples:
# Basic test (60 seconds)
servobox test
# Quick test
servobox test --duration 30
# Stress test (recommended for validation)
servobox test --duration 60 --stress-ng
# Named VM
servobox test --name franka-dev --duration 120
Interpreting output: Use servobox rt-verify and the Troubleshooting guide.
rt-verify
Verify RT configuration (CPU pinning, IRQ affinity, XML settings, governors, guest kernel params).
Usage:
Notes: Requires the VM to be running.
pkg-install
Install packages or package configurations into the VM.
Usage:
servobox pkg-install <package|config.conf> [--name NAME] [--verbose|-v] [--list|-l] [--force] [--custom PATH]
Options:
| Option | Description |
|---|---|
--list, -l |
List available packages and configs |
--verbose, -v |
Show detailed installation output |
--force |
Reinstall even if already installed |
--custom PATH |
Path to custom recipe directory OR config file |
Examples:
# List available packages
servobox pkg-install --list
# Install a package
servobox pkg-install libfranka-gen1
# Install from config file
servobox pkg-install --custom ./my-suite.conf
# Use custom recipe directory
servobox pkg-install --custom ~/my-recipes my-package
# Force reinstall with verbose
servobox pkg-install libfranka-gen1 --force --verbose
# Named VM
servobox pkg-install libfranka-gen1 --name franka-dev
See Package Management for details.
pkg-installed
Show packages already installed in the VM.
Usage:
run
Execute a package's run script in the VM, or run an arbitrary command.
Usages:
# Run a recipe's run.sh
servobox run <recipe-name> [--name NAME]
# Run an arbitrary command in the VM
servobox run "<command>" [--name NAME]
Examples:
# Run polymetis server
servobox run polymetis
# Run with specific VM
servobox run polymetis --name franka-dev
# Run arbitrary command
servobox run "sudo pkill -9 run_server" --name franka-dev
What it does (recipe mode):
- Ensures the VM is running
- Executes the recipe's
run.shinside the VM - Keeps terminal open for monitoring
Recipes with run.sh include: polymetis, deoxys-control, libfranka-gen1, serl-franka-controllers, franka-ros, libfranka-fr3.
help
Show help message.
Usage:
Check VM Status
Clean Up
See Also
- Package Management - Installing software packages
- Network Configuration - VM networking setup
- Troubleshooting - Common issues