You are viewing the arm version of our documentation.
Modifying your VM Template
Modify your VM Template using the Anka Virtualization CLI
Prerequisites
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
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
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.1-jenkins 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"
--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"
}
]