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.
> anka --help
usage: anka [options] <command>
Anka command line tool
options:
-j,--machine-readable Output a machine readable format (JSON)
--version Output the Anka version
commands:
list List local VM library
config Manage the CLI configuration
show Show a VM's properties
modify Modify a VM parameters
view Open VM display
run Run a command inside of a VM
create Creates a VM Template
start Start or resume a VM
stop Shut down a VM(s)
clone Clone a VM
push Push a VM to the registry
pull Pull a VM template from the registry
reboot Reboot a running VM(s)
delete Delete a VM(s) and tags
registry Configure and control template registries
cp Copy files in/out of the Anka VM and host
license Manage licenses
List
> anka list --help
usage: list [options] [vm...]
List local VM library
arguments:
vm Particulat VM(s) to list, all by default
options:
-a,--all Show all the VMs including cached ones
-f,--field <val> Specify the fields displayed for the VM
❯ anka list
+----------------------+--------------------------------------+---------------------+---------+
| name | uuid | creation_date | status |
+----------------------+--------------------------------------+---------------------+---------+
| 12.2.0-arm (vanilla) | a6f24306-2af7-45ed-9d70-3a3c1ee7f03a | Jan 6 12:34:52 2022 | stopped |
+----------------------+--------------------------------------+---------------------+---------+
| test_vm1 | 565e47ce-a9f9-4ac8-81bc-645d48473de1 | Jan 6 12:34:52 2022 | stopped |
+----------------------+--------------------------------------+---------------------+---------+
❯ anka --machine-readable list | jq
{
"status": "OK",
"body": [
{
"name": "12.2.0-arm",
"uuid": "a6f24306-2af7-45ed-9d70-3a3c1ee7f03a",
"creation_date": "2022-01-06T12:34:52Z",
"version": "vanilla",
"status": "stopped"
},
{
"name": "test_vm1",
"uuid": "565e47ce-a9f9-4ac8-81bc-645d48473de1",
"creation_date": "2022-01-06T12:34:52Z",
"status": "stopped"
}
]
}
❯ anka --machine-readable list --field name --field version | jq
{
"status": "OK",
"body": [
{
"name": "12.2.0-arm",
"version": "vanilla"
},
{
"name": "test_vm1"
}
]
}
Config
> anka config --help
usage: config [options] [param...]
Manage the CLI configuration
arguments:
param Parameter name
options:
-l,--list List parameter(s)
-r,--reset Reset parameter(s) back to default
❯ anka config
+-----------------------------+-----------------------------------------------------------------------------------+
| addons_disk_tool | /Library/Application Support/Veertu/Anka/guestaddons/create_update_disk.sh |
+-----------------------------+-----------------------------------------------------------------------------------+
| addons_identifier | ANKA_ADDONS_IDENTIFIER |
+-----------------------------+-----------------------------------------------------------------------------------+
| addons_image | /Library/Application Support/Veertu/Anka/guestaddons/anka-addons-mac |
+-----------------------------+-----------------------------------------------------------------------------------+
| addons_pkg | com.veertu.anka.guestaddons.pkg |
+-----------------------------+-----------------------------------------------------------------------------------+
| addons_postupdate | /Library/Application Support/Veertu/Anka/guestaddons/postupdate.sh |
+-----------------------------+-----------------------------------------------------------------------------------+
| adresses_per_byte | 250 |
+-----------------------------+-----------------------------------------------------------------------------------+
| allow_nonunique_names | False |
+-----------------------------+-----------------------------------------------------------------------------------+
| anka_executable | /Library/Application Support/Veertu/Anka/bin/headless.app/Contents/MacOS/headless |
+-----------------------------+-----------------------------------------------------------------------------------+
| anka_image_maker_executable | /Library/Application Support/Veertu/Anka/bin/anka_image |
+-----------------------------+-----------------------------------------------------------------------------------+
| anka_viewer | /Applications/Anka.app |
+-----------------------------+-----------------------------------------------------------------------------------+
| ankacp_executable | /Library/Application Support/Veertu/Anka/bin/ankacp |
+-----------------------------+-----------------------------------------------------------------------------------+
| ankactl_executable | /Library/Application Support/Veertu/Anka/bin/ankactl |
+-----------------------------+-----------------------------------------------------------------------------------+
| ankanet_sock | /var/run/ankanetd |
+-----------------------------+-----------------------------------------------------------------------------------+
| block_nocache | 1 |
+-----------------------------+-----------------------------------------------------------------------------------+
| bridge_name | |
+-----------------------------+-----------------------------------------------------------------------------------+
| ca_bundle | /Users/m1mini/.anka/ca-bundle.crt |
+-----------------------------+-----------------------------------------------------------------------------------+
| chunk_size | 0 |
+-----------------------------+-----------------------------------------------------------------------------------+
| config_path | /Library/Application Support/Veertu/Anka:~/.anka/settings.ini |
+-----------------------------+-----------------------------------------------------------------------------------+
| default_disk | 137438953472 |
+-----------------------------+-----------------------------------------------------------------------------------+
| default_format | 1 |
+-----------------------------+-----------------------------------------------------------------------------------+
| default_nvcpu | 4 |
+-----------------------------+-----------------------------------------------------------------------------------+
| default_passwd | admin |
+-----------------------------+-----------------------------------------------------------------------------------+
| default_ram | 4294967296 |
+-----------------------------+-----------------------------------------------------------------------------------+
| default_user | anka |
+-----------------------------+-----------------------------------------------------------------------------------+
| delete_logs | 1 |
+-----------------------------+-----------------------------------------------------------------------------------+
| exit_delay | 5 |
+-----------------------------+-----------------------------------------------------------------------------------+
| fvutil_executable | /Library/Application Support/Veertu/Anka/bin/fvutil |
+-----------------------------+-----------------------------------------------------------------------------------+
| img_lib_dir | /Users/m1mini/Library/Application Support/Veertu/Anka/img_lib |
+-----------------------------+-----------------------------------------------------------------------------------+
| io_threads | 0 |
+-----------------------------+-----------------------------------------------------------------------------------+
| log_dir | /Users/m1mini/Library/Logs/Anka/ |
+-----------------------------+-----------------------------------------------------------------------------------+
| log_file | anka.log |
+-----------------------------+-----------------------------------------------------------------------------------+
| mac_random_bytes | 2 |
+-----------------------------+-----------------------------------------------------------------------------------+
| max_vms_allowed | 255 |
+-----------------------------+-----------------------------------------------------------------------------------+
| mitigations | 0 |
+-----------------------------+-----------------------------------------------------------------------------------+
| nice | 0 |
+-----------------------------+-----------------------------------------------------------------------------------+
| operations_timeout | 300 |
+-----------------------------+-----------------------------------------------------------------------------------+
| options_api_url | https://8ewgf8mtn4.execute-api.us-west-2.amazonaws.com/prod/key/info |
+-----------------------------+-----------------------------------------------------------------------------------+
| permanent_mac_prefix | 86,69,69 |
+-----------------------------+-----------------------------------------------------------------------------------+
| portfwd_base | 10000 |
+-----------------------------+-----------------------------------------------------------------------------------+
| process_type | Interactive |
+-----------------------------+-----------------------------------------------------------------------------------+
| product_root | /Library/Application Support/Veertu/Anka |
+-----------------------------+-----------------------------------------------------------------------------------+
| propagate_license | 0 |
+-----------------------------+-----------------------------------------------------------------------------------+
| propagate_name | 0 |
+-----------------------------+-----------------------------------------------------------------------------------+
| pull_checkout | 1 |
+-----------------------------+-----------------------------------------------------------------------------------+
| puller_threads | 4 |
+-----------------------------+-----------------------------------------------------------------------------------+
| qncpu | 0 |
+-----------------------------+-----------------------------------------------------------------------------------+
| quantum | 0 |
+-----------------------------+-----------------------------------------------------------------------------------+
| qvcpu | 0 |
+-----------------------------+-----------------------------------------------------------------------------------+
| registry_remotes_file_path | /Users/m1mini/.anka/remote |
+-----------------------------+-----------------------------------------------------------------------------------+
| state_lib_dir | /Users/m1mini/Library/Application Support/Veertu/Anka/img_lib |
+-----------------------------+-----------------------------------------------------------------------------------+
| table_fmt | grid |
+-----------------------------+-----------------------------------------------------------------------------------+
| time_sync | 1 |
+-----------------------------+-----------------------------------------------------------------------------------+
| trim_disk | 1 |
+-----------------------------+-----------------------------------------------------------------------------------+
| uhost_executable | /Library/Application Support/Veertu/Anka/bin/uhost |
+-----------------------------+-----------------------------------------------------------------------------------+
| vlaunch_sock | /var/run/vlaunchd |
+-----------------------------+-----------------------------------------------------------------------------------+
| vlaunch_sock_gui | ~/.anka/vlaunchd |
+-----------------------------+-----------------------------------------------------------------------------------+
| vm_lib_dir | /Users/m1mini/Library/Application Support/Veertu/Anka/vm_lib |
+-----------------------------+-----------------------------------------------------------------------------------+
| vm_lock_dir | /Users/m1mini/Library/Application Support/Veertu/Anka/vm_lib/.locks |
+-----------------------------+-----------------------------------------------------------------------------------+
| vnc_password | admin |
+-----------------------------+-----------------------------------------------------------------------------------+
❯ anka config puller_threads
4
❯ anka config puller_threads 10
❯ anka config puller_threads
10
Show
> anka show --help
usage: show [options] vmid <command>
Show a VM's properties
arguments:
vmid VM identifier or name
options:
-t,--tag <val> Specify VM tag, current by default
commands:
name VM name
uuid VM UUID
description VM description
tag Local VM tags
cpu vCPU parameters
ram RAM size and parameters
display Display information
disk Disk information
network Network information
port Port forwarding rules
label Show assigned VM labels
❯ anka show 12.2.0-arm
+---------+--------------------------------------+
| uuid | a6f24306-2af7-45ed-9d70-3a3c1ee7f03a |
+---------+--------------------------------------+
| name | 12.2.0-arm (vanilla) |
+---------+--------------------------------------+
| created | Jan 6 12:34:52 2022 |
+---------+--------------------------------------+
| vcpu | 4 ARM |
+---------+--------------------------------------+
| ram | 4G |
+---------+--------------------------------------+
| display | 1024x768 |
+---------+--------------------------------------+
| disk | 128GiB (17.72GiB on disk) |
+---------+--------------------------------------+
| addons | 3.0.0.135.13568747 |
+---------+--------------------------------------+
| network | shared |
+---------+--------------------------------------+
| status | stopped Jan 6 18:10:17 2022 |
+---------+--------------------------------------+
❯ anka --machine-readable show 12.2.0-arm | jq
{
"status": "OK",
"body": {
"uuid": "a6f24306-2af7-45ed-9d70-3a3c1ee7f03a",
"name": "12.2.0-arm",
"version": "vanilla",
"creation_date": "2022-01-06T12:34:52Z",
"cpu_cores": 4,
"cpu_frequency": 0,
"cpu_htt": false,
"arch": 2,
"ram": "4294967296",
"ram_size": 4294967296,
"frame_buffers": 1,
"hard_drive": 137438953472,
"encrypted": false,
"image_size": 19035295744,
"addons_version": "3.0.0.135.13568747",
"stop_date": "2022-01-06T18:10:17Z",
"status": "stopped"
}
}
❯ anka --machine-readable show 12.2.0-arm --tag v2 | jq
{
"status": "OK",
"body": {
"uuid": "a6f24306-2af7-45ed-9d70-3a3c1ee7f03a",
"name": "12.2.0-arm",
"version": "v2",
"creation_date": "2022-01-14T12:18:31Z",
"cpu_cores": 4,
"cpu_frequency": 0,
"cpu_htt": false,
"arch": 2,
"ram": "4294967296",
"ram_size": 4294967296,
"frame_buffers": 1,
"hard_drive": 137438953472,
"encrypted": false,
"image_size": 19528679424,
"addons_version": "3.0.0.135.13568747",
"stop_date": "2022-01-14T17:19:08Z",
"status": "stopped"
}
}
show {name/uuid} name
> anka show 12.4 name --help
show {name/uuid} uuid
> anka show 12.4 uuid --help
show {name/uuid} description
> anka show 12.4 description --help
show {name/uuid} tag
> anka show 12.4 tag --help
usage: tag [options]
Local VM tags
options:
--current Show the currently checked out tag
show {name/uuid} cpu
> anka show 12.4 cpu --help
show {name/uuid} ram
> anka show 12.4 ram --help
show {name/uuid} display
> anka show 12.4 display --help
show {name/uuid} disk
> anka show 12.4 disk --help
show {name/uuid} network
> anka show 12.4 network --help
show {name/uuid} port
> anka show 12.4 port --help
show {name/uuid} label
> anka show 12.4 label --help
usage: label [name]
Show assigned VM labels
arguments:
name Show particular label value
Modify
> anka modify --help
usage: modify vmid <command>
Modify a VM parameters
arguments:
vmid Virtual machine to modify
commands:
add Add new items to a VM configuration
delete Remove items from a VM configuration
name Set new name for the VM
cpu Set number of vcpu cores and frequency
ram Set RAM size and parameters
network Modify network card settings
port Add port forwarding rule
disk Modify hard drive settings
display Configure displays
label Assign labels to a VM in key/value form
modify {name/uuid} add
> anka modify 12.4 add --help
usage: add <command>
Add new items to a VM configuration
commands:
network Modify network card settings
disk Modify hard drive settings
port Add port forwarding rule
label Assign labels to a VM in key/value form
modify {name/uuid} add network
> anka modify 12.4 add network --help
usage: network-card,network [options]
Modify network card settings
options:
-t,--mode <val> network mode: shared/host/bridge/disconnected
-b,--bridge <val> host interface name to bridge with in the bridge mode, or "auto"
-m,--mac <val> specify fixed MAC address, or "auto"
-v,--vlan <val> assign VLAN ID, 0 to deassign
-c,--controller <val> set controller: anet, virtio-net
--local enable (default) inter-VM and VM-host communication
--no-local disable inter-VM and VM-host communication
modify {name/uuid} add disk
> anka modify 12.4 add disk --help
usage: hard-drive,disk [options]
Modify hard drive settings
options:
-c,--controller <val> set controller: ablk/virtio-blk
-s,--size <val> set disk size (supported suffixes: T|G|M|K)
-f,--file <val> assign external image or device
--ro mark the image as read-only for the VM
--rw mark the image as writable (default) for the VM
modify {name/uuid} add port
> anka modify 12.4 add port --help
usage: port-forwarding,port [options] name
Add port forwarding rule
arguments:
name Rule name
options:
-g,--guest-port <val> The port inside of the VM that the host-port connects to
-p,--host-port <val> The host port to listen on (assigns dynamically if not specified)
-l,--host-ip <val> The IP to bind the host port with (defaults to any)
-d,--delete Delete the rule
--set-name <val> Rename the rule
❯ anka modify 12.2.0-arm add port --guest-port 22 ssh
❯ anka show 12.2.0-arm network
+------------+------------+
| mode | shared |
+------------+------------+
| controller | virtio-net |
+------------+------------+
port_forwarding_rules:
+------+----------+------------+
| name | protocol | guest_port |
+------+----------+------------+
| ssh | tcp | 22 |
+------+----------+------------+
❯ anka start 12.2.0-arm
❯ anka show 12.2.0-arm network
+------------+-------------------+
| mode | shared |
+------------+-------------------+
| controller | virtio-net |
+------------+-------------------+
| mac | ce:73:f0:49:b1:3d |
+------------+-------------------+
port_forwarding_rules:
+------+----------+---------+------------+-----------+
| name | protocol | host_ip | guest_port | host_port |
+------+----------+---------+------------+-----------+
| ssh | tcp | 0.0.0.0 | 22 | 10000 |
+------+----------+---------+------------+-----------+
❯ ssh anka@localhost -p 10000
Password:
Last login: Fri Jan 14 17:46:28 2022
anka@12-1-0-arm ~ %
modify {name/uuid} add label
> anka modify 12.4 add label --help
usage: label [options] [name] [value]
Assign labels to a VM in key/value form
arguments:
name Label name
value Value of the label
options:
-d,--delete Delete the label(s)
--set-name Rename the label to the value
modify {name/uuid} delete
> anka modify 12.4 delete --help
usage: delete <command>
Remove items from a VM configuration
commands:
network Remove network card
disk Remove disk
port Remove port forwarding rule
label Remove labels
modify {name/uuid} delete network
> anka modify 12.4 delete network --help
modify {name/uuid} delete disk
> anka modify 12.4 delete disk --help
usage: hard-drive,disk index
Remove disk
arguments:
index Index of the disk to remove
modify {name/uuid} delete port
> anka modify 12.4 delete port --help
usage: port-forwarding,port [options] [rule...]
Remove port forwarding rule
arguments:
rule Name of the port forwarding rule
options:
-a,--all Remove all the port fowarding rules
modify {name/uuid} delete label
> anka modify 12.4 delete label --help
usage: label [options] [label...]
Remove labels
arguments:
label Labels to delete
options:
-a,--all Delete all the labels assigned
modify {name/uuid} name
> anka modify 12.4 name --help
usage: name name
Set new name for the VM
arguments:
name New name
modify {name/uuid} cpu
> anka modify 12.4 cpu --help
usage: cpu [options] [vcpu]
Set number of vcpu cores and frequency
arguments:
vcpu Number of vcpu cores
options:
-c,--cores <val> Number of vcpu cores
-f,--frequency <val> Set the base vcpu frequency (Hz)
modify {name/uuid} ram
> anka modify 12.4 ram --help
usage: ram [size]
Set RAM size and parameters
arguments:
size Size of RAM (supported suffixes: T|G|M|K)
modify {name/uuid} network
> anka modify 12.4 network --help
usage: network [options]
Modify network card settings
options:
-t,--mode <val> network mode: shared/host/bridge/disconnected
-b,--bridge <val> host interface name to bridge with in the bridge mode, or "auto"
-m,--mac <val> specify fixed MAC address, or "auto"
-v,--vlan <val> assign VLAN ID, 0 to deassign
-c,--controller <val> set controller: anet, virtio-net
--local enable (default) inter-VM and VM-host communication
--no-local disable inter-VM and VM-host communication
Type | Description |
---|---|
shared | The default network type operating as NAT + DHCP. Every VM after the start/resume gets an IP address assigned by the internal DHCP server in range 192.168.64.2 - 192.168.64.254 . Programs inside a VM can access external networks (outside the host) and the internet directly. Also, other VMs on the host are also accessible. |
host | Not currently supported. |
bridge | The Bridged type will cause the VM to show in the network as an individual device and receive a unique IP separate from the host.An ENV is available to set the interface name: When using the bridge, port-forwarding is not necessary as the VM will receive a unique IP that will be accessible directly to all other devices on the network. By default, DHCP will not see your VM’s MAC address. You’ll need to enable You cannot use bridged networking over Wifi. |
disconnected | The VM will have a disconnected network cable. |
❯ anka --machine-readable describe 12.2.0-arm | jq '.body.network_cards'
[
{
"type": "virtio-net",
"mode": "shared",
"port_forwarding_rules": [
{
"name": "ssh",
"protocol": "tcp",
"guest_port": 22
}
]
}
]
❯ anka modify 12.2.0-arm network --mode bridge
❯ anka --machine-readable describe 12.2.0-arm | jq '.body.network_cards'
[
{
"mode": "bridge",
"controller": "virtio-net"
}
]
modify {name/uuid} port
> anka modify 12.4 port --help
usage: port [options] name
Add port forwarding rule
arguments:
name Rule name
options:
-g,--guest-port <val> The port inside of the VM that the host-port connects to
-p,--host-port <val> The host port to listen on (assigns dynamically if not specified)
-l,--host-ip <val> The IP to bind the host port with (defaults to any)
-d,--delete Delete the rule
--set-name <val> Rename the rule
modify {name/uuid} disk
> anka modify 12.4 disk --help
usage: disk [options]
Modify hard drive settings
options:
-c,--controller <val> set controller: ablk/virtio-blk
-s,--size <val> set disk size (supported suffixes: T|G|M|K)
-f,--file <val> assign external image or device
--ro mark the image as read-only for the VM
--rw mark the image as writable (default) for the VM
In Anka 3.x, changing the internal disk size to consume the free space anka modify disk
adds is not possible. We are working on adding it, but for now we recommend creating/re-creating your VM templates with the necessary and generous amounts of space.
modify {name/uuid} display
> anka modify 12.4 display --help
usage: display [options]
Configure displays
options:
-n,--count <val> Configure number of displays (2 max)
--headless same as --count 0
-p,--password Prompt for VNC password, or get if from the ANKA_VNC_PASSWORD env
--vnc <val> Configure VNC: on/off/address
--no-vnc Disable VNC access to the VM
-d,--dpi <val> Set DPI (default is 72)
-r,--resolution <val> Set resolution, e.g. 1024x768 or 'default' to reset to default
-f,--fps <val> Set refresh rate (30fps by default)
-c,--controller <val> Set video controller: fbuf/pg
--host-gpu-location <val>
Specify location of the host GPU to use, or 'any'
--host-gpu-name <val> Specify name of the host GPU to use, or 'any'
--features <val> Specify extended features flags as a bit mask
modify {name/uuid} label
> anka modify 12.4 label --help
usage: label [options] [name] [value]
Assign labels to a VM in key/value form
arguments:
name Label name
value Value of the label
options:
-d,--delete Delete the label(s)
--set-name Rename the label to the value
View
> anka view --help
usage: view [options] vmid
Open VM display
arguments:
vmid VM to view
options:
-d,--display <val> Specify the display(s) to view
-s,--screenshot Take PNG screenshot
--click Send HDI events
--click-rec Record HID events
-o,--output <val> Specify output file for the view operations
Run
> anka run --help
usage: run [options] vmid
Run a command inside of a VM
arguments:
vmid VM name or identifier (will be started if needed)
options:
-D,-w,--workdir <val> Working directory inside the VM
-E Inherit the entire environment in non-overriding mode
-e <val> Provide an environment variable in overriding mode
-f,--env-file <val> Provide environment variables from file
-Q,--quiet Suppress the stdout from the command
-b,--background Run the command in background returning PID to wait with 'wait [PID...]' command
Note: anka run
will start a shell and source the default locations for macOS.
❯ anka show 12.2.0-arm | grep status
| status | stopped Oct 19 07:34:43 2021 |
❯ anka run 12.2.0-arm hostname
12-2-0-arm.local
❯ anka show 12.2.0-arm | grep status
| status | running since Oct 19 07:34:59 2021 |
❯ anka run 12.2.0-arm bash -c "env"
SHELL=/bin/zsh
TMPDIR=/var/folders/3f/1zss6fl15db6k9bhvcrw4wcr0000gn/T/
USER=anka
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.xZYuuCeCwR/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
PWD=/Users/anka
XPC_FLAGS=0x0
XPC_SERVICE_NAME=com.veertu.anka.addons.ankarun
SHLVL=1
HOME=/Users/anka
LOGNAME=root
_=/usr/bin/env
❯ TEST=123 anka run -e TEST 12.2.0-arm bash -c "env | grep TEST && echo \${TEST}"
TEST=123
123
Create
> anka create --help
usage: create [options] name
Creates a VM Template
arguments:
name VM name
options:
-m,--ram-size <val> Specify the VM RAM size (supported suffixes: T|G|M|K)
-c,--cpu-count <val> Specify the number of vCPU cores for the VM (3 or more is recommended)
-d,--disk-size <val> Specify the VM disk size (supported suffixes: T|G|M|K)
-a,--app <val> Path or URL (or 'latest' to dowload the latest version) to the macOS restore image
We recommend naming your initial VM after the version of macOS.
Remember that VM templates are created under a specific user and will not be available to other users.
By default, 2vCPUs is not enough and will cause instability inside of the VM. VCPUs are determined by taking the physical performance cores and multiplying by 2. This means you can set the CPU on creation for an M1 mini with 4 physical perf cores to
anka create --cpu-count 4
, and run two VMs per host (8vCPUs available).
❯ anka create -a latest 12.2.0-arm
Installing UniversalMac_12.1_21C52_Restore.ipsw...
######################################################################## 100.0%
00c44c30-174a-4266-8833-89d6975754bd
Start
> anka start --help
usage: start [options] vmid
Start or resume a VM
arguments:
vmid VM to start
options:
-f,--force Start VM with minimum checks
-q,--quiet Minimize output
-v,--view Open VM in an Anka window
-u,--update-addons Start in (auto)update mode
Stop
> anka stop --help
usage: stop [options] [vmid...]
Shut down a VM(s)
arguments:
vmid VMs to stop
options:
-a,--all Shutdown all running VMs
-f,--force Forcefully stop the VM(s)
Clone
> anka clone --help
usage: clone [options] vmid [name...]
Clone a VM
arguments:
vmid VM to clone
name New VM name(s)
options:
-c,--copy Create an independent copy
-t,--tag <val> Clone particular VM tag (should be available locally)
Push
> anka push --help
usage: push [options] vmid
Push a VM to the registry
arguments:
vmid VM to push
options:
-t,--tag <val> Set the tag name to push
-v,--remote-vm <val> Registry template to push the tag onto
-d,--description <val> Set textual description of the tag
-f,--force Forcefully push, regardless of a tag already existing
-l,--local Commit the template without pushing it to the Registry
-s,--shallow Include all the changes of an older tags
-q,--quiet Do not show progress
-r,--registry <val> Sets an alternate registry
Pull
> anka pull --help
usage: pull [options] vmid
Pull a VM template from the registry
arguments:
vmid VM to pull
options:
-t,--tag <val> Pull the particular tag (latest if not specfied)
-l,--local Checkout (make it current) local tag
--fetch-only Download tag without checkout
-s,--shrink Delete other local tags to optimize disk usage
--check-download-size Get the particular tag size (latest if not specfied)
-q,--quiet Do not show progress
-r,--registry <val> Sets an alternate registry
Reboot
> anka reboot --help
usage: reboot [options] [vmid...]
Reboot a running VM(s)
arguments:
vmid VMs to reboot
options:
-a,--all Reboot all running VMs
Delete
> anka delete --help
usage: delete [options] [vmid...]
Delete a VM(s) and tags
arguments:
vmid VM to delete
options:
-a,--all Delete all VMs in library
-t,--tag <val> Specify local tag to delete
--yes Do not expect user confirmation of the operation
--cache Delete temporary cache and ophran images
Registry
> anka registry --help
usage: registry [options] <command>
Configure and control template registries
options:
-r,--remote <val> Sets an alternate registry
--insecure Skip TLS verification
--cert <val> Path to a client certificate (if user authentication is configured)
--key <val> Path to prvate key if the client certificate doesn't contain one
--cacert <val> Use custom CA certificates location (default is /etc/ssl/certs)
commands:
list-repos List registries configured
add Add a registry
set Set default registry
remove Remove a registry from the configuration
list List templates in registry (see anka-push/pull commands)
show Show a template's properties
revert Delete a template or tag
registry list-repos
> anka registry list-repos --help
usage: list-repos [options] [name]
List registries configured
arguments:
name Show URL of the registry specified
options:
-d,--default Show the default registry name
registry add
> anka registry add --help
usage: add [options] name url
Add a registry
arguments:
name Registry name
url Registry URL
options:
-f,--force Do not perform a connectivity checks for the url
registry set
> anka registry set --help
usage: set [options] name [url]
Set default registry
arguments:
name Set default registry
url Registry URL if specified will be assigned to name
options:
-f,--force Do not perform a connectivity checks for the url
--cert <val> Path to a client certificate (if user authentication is configured)
--key <val> Path to a private key if the client certificate doesn't contain one
--cacert <val> Use custom CA certificates location (default is /etc/ssl/certs)
registry remove
> anka registry remove --help
usage: remove [options] [name...]
Remove a registry from the configuration
arguments:
name Registry name
options:
-a,--all Forget all registries
registry list
> anka registry list --help
registry show
> anka registry show --help
usage: show [options] vmid <command>
Show a template's properties
arguments:
vmid Template identifier or name
options:
-t,--tag <val> Specify template tag, latest by default
commands:
name Template name
uuid Template UUID
description Template description
tag Show template tags
cpu vCPU parameters
ram RAM size and parameters
display Display information
disk Disk information
network Network information
port Port forwarding rules
label Assigned template labels
registry show {name/uuid} name
> anka registry show 12.4 name --help
registry show {name/uuid} uuid
> anka registry show 12.4 uuid --help
registry show {name/uuid} description
> anka registry show 12.4 description --help
registry show {name/uuid} tag
> anka registry show 12.4 tag --help
usage: tag [options]
Show template tags
options:
--latest Show the latest tag name
registry show {name/uuid} cpu
> anka registry show 12.4 cpu --help
registry show {name/uuid} ram
> anka registry show 12.4 ram --help
registry show {name/uuid} display
> anka registry show 12.4 display --help
registry show {name/uuid} disk
> anka registry show 12.4 disk --help
registry show {name/uuid} network
> anka registry show 12.4 network --help
registry show {name/uuid} port
> anka registry show 12.4 port --help
registry show {name/uuid} label
> anka registry show 12.4 label --help
usage: label [label]
Assigned template labels
arguments:
label Show particular label value
registry revert
> anka registry revert --help
usage: revert [options] vmid
Delete a template or tag
arguments:
vmid Template identifier or name
options:
-t,--tag <val> Delete particular template tag or latest by default
-a,--all Delete entire template from registry
--yes Do not expect user confirmation of the operation
Cp
> anka cp --help
usage: cp [options]
Copy files in/out of the Anka VM and host
options:
-R copy the src and its entire subtree to the dst
-L all symbolic links are followed
-H symbolic links in the command are followed
-P do not follow a symbolic links (default)
-f remove and create the dst file on open failure
-n do not overwrite an existing file.
-p preserve the source file attributes
-a same as -pPR options
-v cause cp to be verbose, showing files as they are copied
❯ 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
License
> anka license --help
usage: license <command>
Manage licenses
commands:
show Show license information
activate Activate license key
validate Validate the current license
remove Remove the current license
accept-eula Accept EULA
license show
> anka license show --help
usage: show [options]
Show license information
options:
-k,--key <val> Get key information
license activate
> anka license activate --help
usage: activate [options] key
Activate license key
arguments:
key Activation key
options:
-f,--force Silently override the current license
--cid <val> Submit the CustomerID
license validate
> anka license validate --help
license remove
> anka license remove --help
license accept-eula
> anka license accept-eula --help