Command-line Reference

Anka CLI Reference
One of the most common problems when getting started is the usage of sudo for anka commands. Anka will run for all users on a machine, but they will have isolated environments. If you create an Anka VM Template/Tag as UserA, sudo/root will not be able to see or use them. Also, the Anka Build Cloud Controller will start VMs as root, so be sure to clean up any VM Templates and Tags you have under UserA or else the disk space will become a problem. It’s suggested to just run all anka commands as root.
> sudo anka  --help
Usage: anka [OPTIONS] COMMAND [ARGS]...

Options:
  --machine-readable              Output a machine readable format (JSON)
  --log-level [debug|info|error]
  --debug
  -l, --login TEXT                Specify the vm policy user (if configured)
  --help                          Display usage information

Commands:
  attach    Attach USB device(s) to a running VM
  clone     Clone a suspended or stopped VM
  config    Manage the CLI configuration
  cp        Copy files in and out of the VM and host
  create    Creates a VM
  delete    Delete a VM(s)
  describe  Show a VM's configuration
  detach    Detach USB device(s) from a VM
  license   Control Licensing
  list      List the current user's VM Template library
  modify    Modify a VM's configuration
  mount     Mounts a host directory into the VM
  reboot    Restart a running VM(s)
  registry  Configure and control the Anka Cloud Registry
  run       Run a command inside of a VM (will start VM...
  show      Show a VM's runtime properties
  start     Start or resume a stopped or suspended VM
  stop      Shut down a VM(s)
  suspend   Suspend a running VM(s)
  unmount   Unmount the mounted host directory
  usb       Manage USB devices
  version   Output the Anka version
  view      Open VM in Anka Viewer

Attach

> sudo anka attach --help
Usage: anka attach [OPTIONS] VMID [DEVID]...

  Attach USB device(s) to a running VM

Options:
  --help  Display usage information

Clone

> sudo anka clone --help
Usage: anka clone [OPTIONS] VM_ID [NEW_VM_NAME]...

  Clone a suspended or stopped VM

Options:
  -c, --copy  Create an independent copy (disables caching and consumes more disk space)
  --help      Display usage information

Config

> sudo anka config --help
Usage: anka config [OPTIONS] [PARAM]...

  Manage the CLI configuration

Options:
  -l, --list                     List parameter(s)
  -r, --reset                    Reset parameter(s) back to default
  -s, --sorted / -S, --unsorted  Sort the output in alphabetical order
  --help                         Display usage information

Cp

> sudo anka cp --help
Usage: anka cp [OPTIONS] [SRC]... DST

  Copy files in and out of the VM and host

Options:
  -R      Copy the SRC and its entire subtree to the DST (required for folders)
  -L      All symbolic links within your SRC directory are followed
  -H      Symbolic links in the command are followed
  -P      Do not follow symbolic links (enabled by default)
  -f      Overwrite if DST already exists
  -n      Skips if object already exists at DST
  -p      Preserve the SRC object attributes
  -a      Alias for -pPR
  --help  Display usage information
❯ time anka cp ~/VirtualBox\ VMs/cloud-client-side-ha-1/cloud-client-side-ha-1.vdi 10.15.6:/Users/anka/
anka --debug cp  10.15.6:/Users/anka/  0.86s user 20.60s system 4% cpu 8:53.85 total

Compare the ~9 minutes it takes for anka cp to how much it takes to transfer the same file with scp:

❯ time scp -P 10000 -v ~/VirtualBox\ VMs/cloud-client-side-ha-1/cloud-client-side-ha-1.vdi anka@192.168.0.110:/Users/anka/
scp -P 10000 -v  anka@192.168.0.110:/Users/anka/  110.61s user 60.88s system 22% cpu 12:46.30 total

Create

> sudo anka create --help
Usage: anka create [OPTIONS] VMNAME

  Creates a VM

Options:
  -m, --ram-size TEXT      Set the RAM size (including 'G' or 'M' on the end)
  -c, --cpu-count INTEGER  Set the number of vcpu cores
  -d, --disk-size TEXT     Set the disk size when creating a new disk (including 'G' or 'M' on the end)
  -a, --app PATH           Path to the macOS installer .app
  -p, --pkg PATH           Include additional packages to be installed
  -P, --profile PATH       Include a configuration profile(s) to install alongside the macOS installation (not
                           available for macOS >= 11.x/Big Sur)
  --help                   Display usage information
Be aware of the user you’re executing Anka CLI commands as. If you create VMs as root, they won’t be available to other users on the system and vice versa.
  • We recommend naming your initial VM after the version of macOS.
  • The VM creation should take around 40 minutes.
  • If you leave out --ram-size and --cpu-count, Anka will choose for you based on your total CPU and RAM. It will try to halve the total CPU and RAM values, but has a min of 2CPU/4GB and a max of 8CPU/8GB.
  • By default anka create creates a VM Template with the username anka and password admin. Environment variable are available to change these: ANKA_DEFAULT_USER and ANKA_DEFAULT_PASSWD (be sure to use sudo -E when issuing the create command).
  • SIP is DISABLED by default inside of Anka 2 VMs. This can be re-enabled with anka modify {vmNameOrUUID} set custom-variable sys.csr-active-config 0.
Suspending VMs can sometimes produce a VM which is frozen on start. Usually this is because the hardware & cpu type you created the VM and suspended it on is different from the one you’re trying to start it on. Be sure to suspend your VMs on the same hardware that will be running VMs. You can use ANKA_CREATE_SUSPEND=0 anka create . . . to produce a stopped VM.
  • Anka Develop license (default): While you can create as many VMs as you wish, the free Anka Develop license only allows you to run one VM at a time and will only function on laptops (Macbook, Macbook Pro, and Macbook Air). It only supports a stopped VM state.

  • Anka Build license: When determining how many vcpus and ram your VM needs, you can divide the number of VMs you plan on running simultaneously within a host by the total virtual cores (vcpus) it has. So, if I have 12vCPUs on my 6core Mac Mini, and I want to allow 2 running VMs at once and not cripple the host machine, I will set the VM Template/Tag to have 6vcpus (12 / 2). However, with RAM, you’ll need to allow ~2GB of memory for the Anka Software and host ((totalRAM / 2)-1). Build licenses support suspended and stopped VM states.

sudo anka create --ram-size 8G --cpu-count 4 --disk-size 80G \
--app /Applications/Install\ macOS\ Catalina.app 10.15.6

Delete

> sudo anka delete --help
Usage: anka delete [OPTIONS] [VMID]...

  Delete a VM(s)

Options:
  -t, --tag TEXT  Specify tag to remove
  --yes           Avoid asking of confirmation
  -a, --all       Delete all vms in library
  --help          Display usage information

Describe

> sudo anka describe --help
Usage: anka describe [OPTIONS] VM_ID

  Show a VM's configuration

Options:
  --help  Display usage information

Detach

> sudo anka detach --help
Usage: anka detach [OPTIONS] VMID [DEVID]...

  Detach USB device(s) from a VM

Options:
  -a, --all  Detach all devices from the vm
  --help     Display usage information

License

> sudo anka license --help
Usage: anka license [OPTIONS] COMMAND [ARGS]...

  Control Licensing

Options:
  --help  Display usage information

Commands:
  accept-eula  Accept EULA (requires root privileges)
  activate     Activate license key (requires root...
  remove       Remove the current license (requires root...
  show         Show license information
  validate     Validate the current license

license accept-eula

> sudo anka license accept-eula --help
Usage: anka license accept-eula [OPTIONS]

  Accept EULA (requires root privileges)

Options:
  --help  Display usage information

license activate

> sudo anka license activate --help
Usage: anka license activate [OPTIONS] KEY

  Activate license key (requires root privileges)

Options:
  -f, --force  Silently override the current license
  --cid TEXT   Submit the CustomerID
  --help       Display usage information

license remove

> sudo anka license remove --help
Usage: anka license remove [OPTIONS]

  Remove the current license (requires root privileges)

Options:
  --help  Display usage information

license show

> sudo anka license show --help
Usage: anka license show [OPTIONS]

  Show license information

Options:
  -k, --key TEXT  Get key information
  --help          Display usage information

license validate

> sudo anka license validate --help
Usage: anka license validate [OPTIONS]

  Validate the current license

Options:
  --help  Display usage information

List

> sudo anka list --help
Usage: anka list [OPTIONS] [VMID]...

  List the current user's VM Template library

Options:
  -r, --running     Show only running vms
  -s, --stopped     Show only stopped vms
  -f, --field TEXT  Change the fields displayed for the VM. Supported fields: name, version, uuid, creation_date,
                    status, stop_date, description, policy, cpu_cores, cpu_frequency, cpu_htt, ram, display.
  --help            Display usage information

Modify

> sudo anka modify --help
Usage: anka modify [OPTIONS] VM_ID COMMAND [ARGS]...

  Modify a VM's configuration

Options:
  --help  Display usage information

Commands:
  add
  delete
  set
  show

modify {vmNameOrUUID} add

> sudo anka modify 12.3.1 add --help
Usage: anka modify add [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Display usage information

Commands:
  hard-drive
  network-card
  optical-drive
  port-forwarding
  usb-device

modify {vmNameOrUUID} add hard-drive

> sudo anka modify 12.3.1 add hard-drive --help
Usage: anka modify add hard-drive [OPTIONS] ARGUMENT

Options:
  -f, --file  Path to an external image or device
  -s, --size  The size (default: 80G)
  --help      Display usage information

modify {vmNameOrUUID} add network-card

> sudo anka modify 12.3.1 add network-card --help
Usage: anka modify add network-card [OPTIONS]

Options:
  -t, --type [shared|host|bridge|disconnected]
                                  [default: shared]
  -b, --bridge TEXT               Host interface name to bridge with (Wi-Fi not supported)
  -m, --mac TEXT                  Assign to a fixed MAC address
  -c, --controller [anet|virtio-net]
                                  Specify controller
  --help                          Display usage information

modify {vmNameOrUUID} add optical-drive

> sudo anka modify 12.3.1 add optical-drive --help
Usage: anka modify add optical-drive [OPTIONS] ISO

Options:
  -f, --file  Path to an external image or device (required)
  --help      Display usage information

modify {vmNameOrUUID} add port-forwarding

> sudo anka modify 12.3.1 add port-forwarding --help
Usage: anka modify add port-forwarding [OPTIONS] RULE_NAME

Options:
  -p, --host-port INTEGER   The host port to listen on
  -g, --guest-port INTEGER  The port inside of the VM that the host-port connects to  [required]
  -l, --host-ip TEXT        The IP to bind the host port with (defaults to 0.0.0.0)
  --guest-ip TEXT           The IP to bind to inside of the VM
  --help                    Display usage information
❯ sudo anka modify 10.15.4 add port-forwarding --guest-port 22 ssh

❯ sudo anka describe 10.15.4

. . .

port_forwarding_rules

+------------+--------------+-------------+------------+-----------+-------------+
|   net_card |   guest_port | rule_name   | protocol   |   host_ip |   host_port |
+============+==============+=============+============+===========+=============+
|          0 |           22 | ssh         | tcp        |         0 |           0 |
+------------+--------------+-------------+------------+-----------+-------------+

❯ sudo anka start 10.15.4
. . . 
port_forwarding

+--------------+-------------+------------+--------+-----------+
|   guest_port |   host_port | protocol   | name   | host_ip   |
+==============+=============+============+========+===========+
|           22 |       10000 | tcp        | ssh    | 0.0.0.0   |
+--------------+-------------+------------+--------+-----------+

❯ ssh anka@localhost -p 10000
Password:
Last login: Mon Apr  6 12:45:50 2020
Mac-mini:~ anka

modify {vmNameOrUUID} add usb-device

> sudo anka modify 12.3.1 add usb-device --help
Usage: anka modify add usb-device [OPTIONS] [DEVICE]...

Options:
  -f, --force  Skip device validation
  --help       Display usage information

modify {vmNameOrUUID} delete

> sudo anka modify 12.3.1 delete --help
Usage: anka modify delete [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Display usage information

Commands:
  custom-variable
  hard-drive
  network-card
  optical-drive
  policy
  port-forwarding
  usb-device

modify {vmNameOrUUID} delete custom-variable

> sudo anka modify 12.3.1 delete custom-variable --help
Usage: anka modify delete custom-variable [OPTIONS] KEY

Options:
  --help  Display usage information

modify {vmNameOrUUID} delete hard-drive

> sudo anka modify 12.3.1 delete hard-drive --help
Usage: anka modify delete hard-drive [OPTIONS] [INDEX]...

Options:
  --help  Display usage information

modify {vmNameOrUUID} delete network-card

> sudo anka modify 12.3.1 delete network-card --help
Usage: anka modify delete network-card [OPTIONS] [INDEX]...

Options:
  --help  Display usage information

modify {vmNameOrUUID} delete optical-drive

> sudo anka modify 12.3.1 delete optical-drive --help
Usage: anka modify delete optical-drive [OPTIONS] [INDEX]...

Options:
  --help  Display usage information

modify {vmNameOrUUID} delete policy

> sudo anka modify 12.3.1 delete policy --help
Usage: anka modify delete policy [OPTIONS]

Options:
  --help  Display usage information

modify {vmNameOrUUID} delete port-forwarding

> sudo anka modify 12.3.1 delete port-forwarding --help
Usage: anka modify delete port-forwarding [OPTIONS] RULE_NAME

Options:
  --help  Display usage information

modify {vmNameOrUUID} delete usb-device

> sudo anka modify 12.3.1 delete usb-device --help
Usage: anka modify delete usb-device [OPTIONS] [DEVICE]...

Options:
  --help  Display usage information

modify {vmNameOrUUID} set

> sudo anka modify 12.3.1 set --help
Usage: anka modify set [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Display usage information

Commands:
  cpu              Set number of vcpu cores and frequency
  custom-variable  Set custom nvram & smb variables (Example: .
  description      Set description of the VM
  display          Configure displays
  hard-drive       Modify hard drive settings
  name             Set new template name for the VM
  network-card     Modify network card settings
  policy           Enable VM access management
  ram              Set RAM size and parameters

modify {vmNameOrUUID} set cpu

> sudo anka modify 12.3.1 set cpu --help
Usage: anka modify set cpu [OPTIONS] [NCPU]...

  Set number of vcpu cores and frequency

Options:
  -c, --cores INTEGER      Set the number of cores
  -h, --htt / --no-htt     Enable/disable hyper-threading
  -f, --frequency INTEGER  Set the base vcpu frequency (Hz)
  --help                   Display usage information

modify {vmNameOrUUID} set custom-variable

> sudo anka modify 12.3.1 set custom-variable --help
Usage: anka modify set custom-variable [OPTIONS] KEY VALUE

  Set custom nvram & smb variables (Example: . . . set custom-variable hw.serial "<SERIAL>"

Options:
  --help  Display usage information

You can set the following custom variables:

  • boot-args - NVRAM boot arguments
  • hw.uuid - Hardware UUID
  • hw.serial - Serial Number
  • hw.manufacturer - SMBIOS parameter
  • hw.product - SMBIOS parameter
  • hw.family - SMBIOS parameter
  • hw.board - SMBIOS parameter
sudo anka modify {vmNameOrUUID} set custom-variable hw.uuid "GUID"
sudo anka modify {vmNameOrUUID} set custom-variable hw.serial 'MySerial'

modify {vmNameOrUUID} set description

> sudo anka modify 12.3.1 set description --help
Usage: anka modify set description [OPTIONS] TEXT

  Set description of the VM

Options:
  --help  Display usage information

modify {vmNameOrUUID} set display

> sudo anka modify 12.3.1 set display --help
Usage: anka modify set display [OPTIONS]

  Configure displays

Options:
  -n, --count INTEGER         Configure number of displays (2 max)
  --headless                  same as --count 0
  -p, --password              Prompt for VNC password
  -v, --vnc TEXT              Configure VNC
  --no-vnc                    Disable VNC access to the VM
  -d, --dpi INTEGER           Set DPI (default is 72)
  -r, --resolution TEXT       Set resolution, e.g. 1024x768 or 'default' to reset to default
  -f, --fps INTEGER           Set refresh rate (30fps by default)
  -c, --controller [fbuf|pg]  Set video controller
  --host-gpu-location TEXT    Specify location of the host GPU to use, or 'any'
  --host-gpu-name TEXT        Specify name of the host GPU to use, or 'any'
  --features INTEGER          Specify extended features flags as a bit mask
  --help                      Display usage information
The PG video controller is only available on VM macOS versions Big Sur or newer.
All resolution changing features require enabling PG OR fbuf with “Legacy Component” addons installed manually.

modify {vmNameOrUUID} set hard-drive

> sudo anka modify 12.3.1 set hard-drive --help
Usage: anka modify set hard-drive [OPTIONS] [INDEX]...

  Modify hard drive settings

Options:
  -c, --controller [ablk|virtio-blk|sata]
                                  Set controller
  -s, --size TEXT                 Set disk size
  -e, --enc [aes-128|aes-192|aes-256|none]
                                  Set OTFE algorithm
  --help                          Display usage information

Differences between controllers:

  • ablk (sata)
  • virtio-blk

These devices require no drivers in guest/VM to work. With virtio-blk, it uses slightly less CPU during IO (a feature of macOS virtio driver) so we are creating BigSur VMs with it by default. Unfortunately in Monterey, Apple decided to introduce APFS Volume locking on top of virtio-blk (this is how their Virtualization.framework work with disks) and we are unable to continue use virtio-blk since some cryptography, which we don’t emulate, is expected by Monterey kernel. Therefore, Monterey VMs are created with ablk.

It’s currently impossible to downsize a VM’s hard-drive. We suggest creating your initial VM Template with a smaller amount of available disk and then increase in subsequent Tags.
Post-modify, you need to tell disk utility to modify the VM’s disk to consume the new free space: anka run --no-volume {vmNameOrUUID} sudo diskutil apfs resizeContainer disk1 0

modify {vmNameOrUUID} set name

> sudo anka modify 12.3.1 set name --help
Usage: anka modify set name [OPTIONS] NAME

  Set new template name for the VM

Options:
  --help  Display usage information

modify {vmNameOrUUID} set network-card

> sudo anka modify 12.3.1 set network-card --help
Usage: anka modify set network-card [OPTIONS] [INDEX]...

  Modify network card settings

Options:
  -t, --type [shared|host|bridge|disconnected]
  -b, --bridge TEXT               host interface name to bridge with
  -m, --mac TEXT                  specify fixed MAC address
  -n, --no-mac                    deassign fixed MAC address
  --direct-mac / --no-direct-mac  expose --mac externally
  -v, --vlan INTEGER              assign VLAN ID
  -c, --controller [anet|virtio-net]
                                  set controller
  --local / --no-local            enable (default)/disable inter-VM and VM-host communication
  --help                          Display usage information
--vlan is useful if using a VLAN and bridged mode.
[INDEX] is deprecated and is always 0 since Anka doesn’t support more than 1 NIC per VM.
[bridged] For Bonjour to work between host and guest, you’ll need to run sudo defaults write /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements -bool NO (this can impact performance negatively)
❯ anka describe 11.0.1
. . .
network_cards

+------------+--------+--------+-----------+
|   pci_slot | type   | mode   |    pci_id |
+============+========+========+===========+
|         28 | anet   | shared | 538975646 |
+------------+--------+--------+-----------+
. . .

❯ anka modify 11.0.1 set network-card --type bridge --bridge en7

❯ anka describe 11.0.1
. . .
network_cards

+------------+--------+--------+-----------+
|   pci_slot | type   | mode   |    pci_id |
+============+========+========+===========+
|         28 | anet   | bridge | 538975646 |
+------------+--------+--------+-----------+
. . .

modify {vmNameOrUUID} set policy

> sudo anka modify 12.3.1 set policy --help
Usage: anka modify set policy [OPTIONS] [FILE]...

  Enable VM access management

Options:
  --help  Display usage information

modify {vmNameOrUUID} set ram

> sudo anka modify 12.3.1 set ram --help
Usage: anka modify set ram [OPTIONS] [SIZE]...

  Set RAM size and parameters

Options:
  --prefetch / --no-prefetch  Enable/disable prefetch logic
  --help                      Display usage information

modify {vmNameOrUUID} show

> sudo anka modify 12.3.1 show --help
Usage: anka modify show [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Display usage information

Commands:
  custom-variables  Display custom nvmram & smb variables

modify {vmNameOrUUID} show custom-variables

> sudo anka modify 12.3.1 show custom-variables --help
Usage: anka modify show custom-variables [OPTIONS]

  Display custom nvmram & smb variables

Options:
  --help  Display usage information

Mount

> sudo anka mount --help
Usage: anka mount [OPTIONS] VMID [DIR]...

  Mounts a host directory into the VM

Options:
  --help  Display usage information
Anka’s mounting features only work after installing FUSE manually inside of the VM. We recommend against this feature due to concerns outside of our control and instead recommend anka cp.

Reboot

> sudo anka reboot --help
Usage: anka reboot [OPTIONS] [VMID]...

  Restart a running VM(s)

Options:
  -a, --all  Reboot all running vms
  --help     Display usage information

Registry

> sudo anka registry --help
Usage: anka registry [OPTIONS] COMMAND [ARGS]...

  Configure and control the Anka Cloud Registry

Options:
  -r, --remote TEXT           Set the registry name (instead of 'default')
  -a, --registry-path TEXT    Set the registry URL (instead of 'default')
  -c, -i, --cert, --pem PATH  Path to your node certificate (if certificate authentication is enabled)
  -k, --key PATH              Path to your node certificate key if the client/node certificate doesn't contain one
  --cacert, --root-cert PATH  Path to a CA Root certificate
  --insecure                  Skip TLS verification
  --help                      Display usage information

Commands:
  add                  Add a registry
  check-download-size  Return the size of the template and tag
  delete               Remove the registry from your configuration
  describe             Show a VM template description and tags
  list                 List VMs in registry
  list-repos           List registries you have configured
  pull                 Pull the specified VM template (and latest...
  push                 Push a VM template (and tag) to the Cloud...
  set                  Set default registry

registry add

> sudo anka registry add --help
Usage: anka registry add [OPTIONS] REG_NAME REG_URL

  Add a registry

Options:
  --help  Display usage information

registry check-download-size

> sudo anka registry check-download-size --help
Usage: anka registry check-download-size [OPTIONS] VM_ID

  Return the size of the template and tag

Options:
  -t, --tag TEXT
  -v, --version INTEGER
  --help                 Display usage information

registry delete

> sudo anka registry delete --help
Usage: anka registry delete [OPTIONS] [REMOTE]...

  Remove the registry from your configuration

Options:
  -a, --all  Forget all registries
  --help     Display usage information

registry describe

> sudo anka registry describe --help
Usage: anka registry describe [OPTIONS] VM_ID

  Show a VM template description and tags

Options:
  -t, --tag TEXT
  -v, --version INTEGER
  --help                 Display usage information

registry list

> sudo anka registry list --help
Usage: anka registry list [OPTIONS] [VMID]...

  List VMs in registry

Options:
  --help  Display usage information

registry list-repos

> sudo anka registry list-repos --help
Usage: anka registry list-repos [OPTIONS]

  List registries you have configured

Options:
  -d, --default  show only the default registry
  --help         Display usage information

registry pull

> sudo anka registry pull --help
Usage: anka registry pull [OPTIONS] VM_ID

  Pull the specified VM template (and latest tag) from the registry

Options:
  -t, --tag TEXT
  -v, --version INTEGER
  -l, --local            Avoid pulling the tag from the registry, only checkout
  -s, --shrink           Remove all other local tags to optimize disk usage
  --help                 Display usage information

registry push

> sudo anka registry push --help
Usage: anka registry push [OPTIONS] VM_ID [TAGNAME]...

  Push a VM template (and tag) to the Cloud Registry

Options:
  -t, --tag TEXT          Set the tag name to push
  -d, --description TEXT  Set the description of the tag
  -v, --remote-vm TEXT    The name of a registry template you want to push the local template (and tag) onto
  -l, --local             Assign a tag to your local template and avoid pushing to the Registry
  -f, --force             Ignore whether there is a local tag created already
  --help                  Display usage information

registry set

> sudo anka registry set --help
Usage: anka registry set [OPTIONS] REG_NAME

  Set default registry

Options:
  --help  Display usage information

Run

> sudo anka run --help
Usage: anka run [OPTIONS] VM_NAME COMMAND [ARGS]...

  Run a command inside of a VM (will start VM if suspended or stopped)

Options:
  -w, --workdir PATH   Working directory inside the VM
  -v, --volume PATH    Mount a host directory into VM
  -n, --no-volume      Use this flag to prevent implicit mounting of current folder(see --volume option and the
                       implicit_mount config paramerer).
  -E, --env            Inherit environment variables ('--env' is the deprecated form)
  -e TEXT              Provide an environment variable in overriding mode
  -f, --env-file PATH  Provide environment variables from file
  -N, --wait-network   Delay execution until guest network interface is fully up
  -T, --wait-time      Delay execution until guest time syncs
  --help               Display usage information

Anka run will source user “rc” files in a specific order:

The source sequence is:

  1. /etc/profile
  2. .bash_profile
  3. .bash_login
  4. .profile
Anka run will wait for all the stdout/err and ports to be closed before actually ending the command. This can make things seem like they are stuck while executing scripts that background processes.

Show

> sudo anka show --help
Usage: anka show [OPTIONS] VM_ID [PROPERTY]...

  Show a VM's runtime properties

Options:
  -t, --tag TEXT  Specify VM tag, current by default
  --help          Display usage information

Start

> sudo anka start --help
Usage: anka start [OPTIONS] VM_ID

  Start or resume a stopped or suspended VM

Options:
  -u, --update-addons, --update  Run the guest addons update procedure (previous version of the addons should already
                                 be installed)
  -f, --force                    Start VM with minimum checks
  -v, --view                     Open VM in an Anka Viewer window
  -d, --usb TEXT                 Attach a USB device (deprecated, use attach command)
  --help                         Display usage information

Stop

> sudo anka stop --help
Usage: anka stop [OPTIONS] [VMID]...

  Shut down a VM(s)

Options:
  -f, --force  Forcefully stop the VM
  -a, --all    Shutdown all running vms
  --help       Display usage information

Suspend

> sudo anka suspend --help
Usage: anka suspend [OPTIONS] [VMID]...

  Suspend a running VM(s)

Options:
  -a, --all  Suspend all running vms
  --help     Display usage information

Unmount

> sudo anka unmount --help
Usage: anka unmount [OPTIONS] VMID [DIR]...

  Unmount the mounted host directory

Options:
  -a, --all  Unmount all mounted directories
  --help     Display usage information

Usb

> sudo anka usb --help
Usage: anka usb [OPTIONS] COMMAND [ARGS]...

  Manage USB devices

Options:
  --help  Display usage information

Commands:
  claim    Make a device(s) available for attaching to a...
  list     List available usb devices
  release  Release a device(s) back to host

usb claim

> sudo anka usb claim --help
Usage: anka usb claim [OPTIONS] [DEVID]...

  Make a device(s) available for attaching to a vm

Options:
  -n, --claim-name TEXT  Set the claim name / alternative name (can be reused and assigned to multiple devices for
                         grouping
  --help                 Display usage information

usb list

> sudo anka usb list --help
Usage: anka usb list [OPTIONS] [DEVID]...

  List available usb devices

Options:
  --help  Display usage information

usb release

> sudo anka usb release --help
Usage: anka usb release [OPTIONS] [DEVID]...

  Release a device(s) back to host

Options:
  -a, --all  Release all devices
  --help     Display usage information

Version

> sudo anka version --help
Usage: anka version [OPTIONS]

  Output the Anka version

Options:
  --help  Display usage information

View

> sudo anka view --help
Usage: anka view [OPTIONS] VM_ID

  Open VM in Anka Viewer

Options:
  -d, --display INTEGER  Specify the displays to view
  --screenshot           Make png screenshot
  --click                Send HDI events
  --click-rec            Record HID events
  --help                 Display usage information