You are viewing the arm version of our documentation.

Modifying your VM Template

Modify your VM Template using the Anka Virtualization CLI


  1. You’ve installed the Anka Virtualization package
  2. You’ve created your first VM Template

The rest of this Getting Started guide focuses heavily on the Anka Virtualization CLI (Command-Line Interface). These will be performed from within your macOS Terminal. For all available CLI commands, flags, and options, see the Command Reference.
> anka modify --help
usage: modify vmid <command>

   Modify a VM parameters

  name               Set new template name for the VM
  cpu                Set number of vcpu cores and frequency
  ram                Set RAM size and parameters
  network            Modify network card settings
  disk               Modify hard drive settings
  display            Configure displays

Common Examples

Changing your VM’s network configuration with network-card

Depending on your network topology, there are instances where you might need to use a bridge mode and assign your VM a unique IP address instead of the default shared IP of the host:

> anka modify 12.0-beta network --help
usage: network [options]

   Modify network card settings

  -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"
  --direct-mac       expose --mac externally
  --no-direct-mac    do not expose --mac externally (default)
  -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
❯ anka --machine-readable describe 12.0-beta | jq '.body.network_cards'
    "mode": "shared",
    "controller": "virtio-net"

❯ anka modify 12.0-beta network --mode bridge

❯ anka --machine-readable describe 12.0-beta | jq '.body.network_cards'
    "mode": "bridge",
    "controller": "virtio-net"

What’s next?