minimega command and control¶
Overview¶
Command and control with minimega
- First class feature in minimega via the
ccAPI - Works on Windows, Linux, FreeBSD guests
- TCP or virtio-serial connection
- Scales
- File I/O
- Process control
- TCP tunnelling (including reverse tunnels)
- Guest filesystem mounts (including NTFS with read/write)
- Cluster-wide STDIO redirection (including into other VMs)
Overview¶

Experimentation¶
An experiment is (from the perspective of the operator)
-
minimega
- Topology definition
- Endpoint descriptions
- Services (OSPF, BGP, ...)
- Data capture
-
cc
- Endpoint behavior (process control, ...)
- Endpoint data capture (file i/o, ...)
- Backchannel communication
- Connecting non-IT ephemera
Feature walkthrough¶
Commands, File I/O¶
The cc API provides a complete file and process control framework
- Send and receive files
- Execute/background commands
- Filter on any field
- Read/group responses
- Track/kill processes
Commands, File I/O¶
process.mm
# send and receive files - including wildcards and directories
cc send foo
cc send my_whole_directory/*
# 'exec' waits for a process to complete before moving on to the next command
cc exec touch /root/tumbleweed
# 'background' forks the process and immediately moves on to the next command
cc background sleep 300
cc background touch /root/impatience
shell sleep 5
# A backgrounded process can be tracked and killed
cc process list foo
cc process killall sleep
# `prefix` allows for grouping like commands
cc prefix foo
cc exec hostname
shell sleep 5
cc response foo
# filter groups allows for sending commands to one or more hosts based on any field
cc prefix foo
cc filter name=foo
cc exec hostname
shell sleep 5
cc response foo
TCP tunnels¶
Support for forward and reverse TCP tunnels (ie ssh -L and ssh -R style tunnels).
tunnels.mm
# create a TCP tunnel into a VM, even though it has no network!
cc tunnel foo 4444 127.0.0.1 9000
cc background nc -p 9000 -l -e /bin/sh
Remote mountpoints¶
Support for guest filesystem mounts - including read/write support with windows guests.
mounts.mm
# mount guest filesystems *anywhere* on your cluster
# This supports r/w, even with windows/ntfs
shell mkdir /tmp/mount
cc mount bar /tmp/mount
Standard I/O Redirection¶
Support for standard I/O redirection anywhere, including inside other guests.
plumber.mm
# create a root shell on the windows vm, and connect stdin and stdout to a host and a linux container
cc filter name=bar
cc background stdout=out_pipe stdin=in_pipe cmd.exe
Summary¶
The cc API provides a first class command and control layer for minimega experiments.
