io7m | single-page | multi-page
3. Command-Line Interface
Previous
3. Command-Line Interface
Up
3.2. help
Next
3.1

# Overview

- 3.1. Overview
  - 3.1.1. Usage
  - 3.1.2. Verbosity
  - 3.1.3. @ Syntax
  - 3.1.4. Exit Code
  - 3.1.5. EBNF

3.1.1

## Usage

1
The waxmill package provides a command-line interface and API for creating, configuring, and running bhyve virtual machines. The base waxmill command is broken into a number of subcommands which are documented over the following sections.
2

### 3.1.1.2 Command-Line Overview

    INFO com.io7m.waxmill.cmdline.Main: Usage: waxmill [options] [command] [command options]

      Options:
        --verbose
          Set the minimum logging verbosity level.
          Default: info
          Possible Values: [trace, debug, info, warn, error]

      Use the "help" command to examine specific commands:

        $ waxmill help help.

      Command-line arguments can be placed one per line into a file, and the file
      can be referenced using the @ symbol:

        $ echo help > file.txt
        $ echo help >> file.txt
        $ waxmill @file.txt

      Commands:
        help                              Show detailed help messages for commands.
        schema                            Export schemas.
        version                           Show the application version.
        vm-add-ahci-disk                  Add an AHCI disk to a virtual machine.
        vm-add-ahci-optical               Add an AHCI optical drive to a virtual machine.
        vm-add-e1000-network-device       Add an e1000 network device to a virtual machine.
        vm-add-framebuffer-device         Add a framebuffer device to a virtual machine.
        vm-add-lpc-device                 Add an LPC device to a virtual machine.
        vm-add-passthru-device            Add a PCI passthru device to a virtual machine.
        vm-add-virtio-disk                Add a virtio disk to a virtual machine.
        vm-add-virtio-network-device      Add a virtio network device to a virtual machine.
        vm-console                        Connect to the console of a virtual machine
        vm-define                         Define a new virtual machine.
        vm-delete                         Delete a virtual machine.
        vm-delete-boot-configurations     Delete boot configurations from a virtual machine.
        vm-delete-devices                 Delete devices from virtual machines.
        vm-export                         Export virtual machine descriptions.
        vm-import                         Import virtual machine descriptions.
        vm-kill                           Kill a virtual machine.
        vm-list                           List the available virtual machines.
        vm-list-with-name                 List the virtual machines with the given name.
        vm-realize                        Realize a virtual machine.
        vm-run                            Run a virtual machine.
        vm-set                            Set virtual machine configuration flags.
        vm-update-boot-configurations     Add/replace boot configurations in a virtual machine.

      Documentation:
        https://www.io7m.com/software/waxmill/documentation/

3.1.2

## Verbosity

1
All subcommands accept a --verbose parameter that may be set to one of trace, debug, info, warn, or error. This parameter sets the lower bound for the severity of messages that will be logged. For example, at debug verbosity, only messages of severity debug and above will be logged. Setting the verbosity to trace level effectively causes everything to be logged, and will produce large volumes of debugging output.
2

### 3.1.2.2 Log Levels

Name | Description
--- | ---
trace | All messages greater than or equal to trace level (highest)
debug | All messages greater than or equal to debug level
info | All messages greater than or equal to info level
warn | All messages greater than or equal to warn level
error | All messages greater than or equal to error level

3.1.3

## @ Syntax

1
The waxmill command-line tool uses jcommander to parse command-line arguments, and therefore supports placing command-line arguments into a file, one argument per line, and then referencing that file with @. For example:
2

### 3.1.3.2 @ Syntax

    $ waxmill vm-list
    # ID                                     Name
    538a90e4-d50d-4511-8643-ae418279bac4     com.io7m.example

    $ waxmill vm-define --name com.io7m.example2

    $ waxmill vm-list
    # ID                                     Name
    800a2dad-3367-4a98-879a-0fac219f55f4     com.io7m.example2
    538a90e4-d50d-4511-8643-ae418279bac4     com.io7m.example

    $ (cat <<EOF
    vm-define
    --name
    com.io7m.example3
    EOF
    ) > args.txt

    $ waxmill @args.txt

    $ waxmill vm-list
    # ID                                     Name
    800a2dad-3367-4a98-879a-0fac219f55f4     com.io7m.example2
    538a90e4-d50d-4511-8643-ae418279bac4     com.io7m.example
    6730354e-bcba-4636-ab07-ad853c375f7d     com.io7m.example3

3.1.4

## Exit Code

1
All subcommands, unless otherwise specified, yield an exit code of 0 on success, and a non-zero exit code on failure.
3.1.5

## EBNF

1
The specification gives grammar definitions in ISO/IEC 14977:1996 Extended Backus-Naur form.
3. Command-Line Interface
Previous
3. Command-Line Interface
Up
3.2. help
Next
io7m | single-page | multi-page