azlin template import¶
Import a VM template from a file into local template storage.
Description¶
Import templates shared by team members or restored from backups.
Usage¶
Arguments¶
INPUT_FILE- Template file to import (YAML or JSON)
Options¶
| Option | Description |
|---|---|
--name TEXT | Override template name |
--overwrite | Overwrite existing template |
-h, --help | Show help message |
Examples¶
Import Template from File¶
Output:
Importing template from ~/downloads/prod-template.yaml...
Template: prod
VM Size: Standard_D8s_v3
Region: eastus
Description: Production servers
✓ Template imported: ~/.azlin/templates/prod.yaml
Import with Custom Name¶
Import and Overwrite Existing¶
Bulk Import¶
Common Workflows¶
Restore from Backup¶
# After system migration
cd ~/azlin-templates-backup
for template in *.yaml; do
azlin template import $template
done
# Verify
azlin template list
Team Distribution¶
# Clone team templates repo
git clone https://github.com/company/azlin-templates.git /tmp/templates
# Import all
cd /tmp/templates
for template in *.yaml; do
azlin template import $template --overwrite
done
Related Commands¶
azlin template export- Export templateazlin template create- Create templateazlin template list- List templates