Exporting and importing VMs
Move VM archives between hosts with anka export and anka import
Use anka export and anka import to archive a VM and move it to another host or user without a registry.
Export
- Only available for Enterprise or Enterprise Plus licenses.
- Exporting a VM is performing a unique copy like
anka clone -cwould do if it has no tags. - If you export a tagged VM in a chain (a VM that was cloned from another, or a tag on top of another VM tag), it will only export the VM layers that relate to that tag. You have to export and import all tags in the order they were created. This adds a fair bit of complexity though as each VM Tag is its own separate layer. When exporting, you’ll need to ensure the target is active on the host. To make it active, you can
anka pull --tag 1 templateA(--localmay speed this up if it was already pulled). Once active, exporting it requires--tag <val>.
This feature does not work if chunk_size is in use for the VM templates/tags.> anka export --help
usage: export [options] vmid file
Export a VM as an archive
arguments:
vmid VM to export
file Path to archive file
options:
-t,--tag <val> Export local VM tag
-c,--copy Include base tags into the archive
Import
> anka import --help
usage: import [options] [file]
Import VM from an archive
arguments:
file Archive with an exported VM
options:
--fetch-only Import tag without checkout
You can import a VM from a URL usingcurl -s VM.tar | anka importorssh [email protected] dd if="VM.tar" | anka import
Related
- Anka Build Cloud Registry for team-wide template storage
- OCI Registries (CLI only; not Build Cloud)