OVS-SIM(1)
π OVS-SIM(1) π
okay bestie, welcome to OVS-SIM(1) from Open vSwitch β the manual page for the simulator environment. This is your group-chat cheat sheet, but make no mistake: every flag, command, path, and caveat is staying right here. π
β¨ NAME β¨
ovs-sim β Open vSwitch simulator environment. Thatβs the whole vibe: a sandboxed little playground for Open vSwitch. π¦
π¦ SYNOPSIS π¦
ovs-sim [option]... [script]...
πΈ DESCRIPTION πΈ
okay so ovs-sim gives you a convenient environment for running one or more Open vSwitch instances and related software in a sandboxed simulation environment. literally the main character energy for testing OVS stuff without dragging your whole system into it. π
To use ovs-sim, first build Open vSwitch, then invoke it directly from the build directory, e.g.:
git clone https://github.com/openvswitch/ovs.git
cd ovs
./configure
make
utilities/ovs-sim
When invoked in the most ordinary way as shown above, ovs-sim does the following:
- Creates a directory
sandboxas a subdirectory of the current directory (first destroying such a directory if it already exists) and makes it the current directory. - Installs all of the Open vSwitch manpages into a
mansubdirectory ofsandboxand adjusts theMANPATHenvironment variable so thatmanand other manpage viewers can find them. - Creates a simulated Open vSwitch named
mainand sets it up as the default target for OVS commands, as if the followingovs-simcommands had been run:
sim_add main
as main
See COMMANDS, below, for an explanation. iykyk π
- Runs any scripts specified on the command line (see OPTIONS, below). The scripts can use arbitrary Bash syntax, plus the additional commands described under COMMANDS, below.
- If no scripts were specified, or if
-ior--interactivewas specified, invokes an interactive Bash subshell. The user can use arbitrary Bash commands, plus the additional commands described under COMMANDS, below. periodt. π
ovs-sim and the sandbox environment that it creates does not require superuser or other special privileges. Generally, it should not be run with such privileges.
π¨ bestie, this is a βplease donβt run me as rootβ situation: no superuser or other special privileges are required, and generally it should not be run with such privileges. fr fr.
π OPTIONS π
scriptβ runsscript, which should be a Bash script, within a subshell after initializing. If multiplescriptarguments are given, then they are run in the order given. If anyscriptexits with a nonzero exit code, thenovs-simexits immediately with the same exit code. π«Ά-ior--interactiveβ by default, if anyscriptis specified,ovs-simexits as soon as the scripts finish executing. With this option, or if no scripts are specified,ovs-siminstead starts an interactive Bash session. π
π COMMANDS π
Scripts and interactive usage may use the following commands implemented by ovs-sim. They are implemented as Bash shell functions exported to subshells. lowkey iconic. β¨
π§ Basic Commands π§
These are the basic commands for working with sandboxed Open vSwitch instances.
sim_add sandboxβ starts a new simulated Open vSwitch instance named sandbox. Files related to the instance, such as logs, databases, sockets, and pidfiles, are created in a subdirectory also named sandbox. Afterward, theascommand (see below) can be used to run Open vSwitch utilities in the context of the new sandbox.
The new sandbox starts out without any bridges. Use ovs-vsctl in the context of the new sandbox to create a bridge, e.g.:
sim_add hv0 # Create sandbox hv0.
as hv0 # Set hv0 as default sandbox.
ovs-vsctl add-br br0 # Add bridge br0 inside hv0.
The Open vSwitch instances that sim_add creates enable dummy devices. This means that bridges and interfaces can be created with type dummy to indicate that they should be totally simulated, without any reference to system entities. In fact, ovs-sim also configures Open vSwitch so that the default system type of bridges and interfaces are replaced by dummy devices. Other types of devices, however, retain their usual functions, which means that, e.g., vxlan tunnels still act as tunnels (refer to the documentation). π
as sandboxβ sets sandbox as the default simulation target for Open vSwitch commands (e.g.ovs-vsctl,ovs-ofctl,ovs-appctl).
This command updates the beginning of the shell prompt to indicate the new default target. cute prompt glow-up, honestly. π
as sandbox command arg...β runs the given command with sandbox as the simulation target, e.g.as hv0 ovs-vsctl add-br br0runsovs-vsctl add-br br0within sandboxhv0. The default target is unchanged. no cap. π
π Interconnection Network Commands π
When multiple sandboxed Open vSwitch instances exist, one will inevitably want to connect them together. These commands allow for that. Conceptually, an interconnection network is a switch that ovs-sim makes it easy to plug into other switches in other sandboxed Open vSwitch instances. Interconnection networks are implemented as bridges in the main switch that ovs-sim creates by default, so to use interconnection networks please avoid working with main directly. β
net_add networkβ creates a new interconnection network named network. π¦net_attach network bridgeβ adds a new port to bridge in the default sandbox (as set withas) and plugs it into interconnection network network, which must already have been created by a previous invocation ofnet_add. The default sandbox must not bemain. π
π Author π
The Open vSwitch Development Community
π Copyright π
2016-2024, The Open vSwitch Development Community
okay thatβs the whole page, bestie β this is OVS-SIM(1) from Open vSwitch 4.0, dated Jan 01, 1980. go build something cute and sandboxed ππ
π¦ where this page comes from
- nixpkgs unstable: openvswitch 4.0.0
- nixpkgs unstable: openvswitch-dpdk 4.0.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms