# Gap Analysis ## Current Gaps ### Publishers Not Applied During Install Publishers are stored and listed but not yet passed to `zonecfg`/`zoneadm` during zone creation. Future: configure IPS publishers inside the zone after install via `zlogin` or `sysding`. ### No Template Create/Edit via CLI Templates must be edited as KDL files directly. Could add `zmgr template create` / `zmgr template edit` commands. ### No Pool Create/Edit via CLI Same as templates — pools are managed by editing files. Could add CLI commands. ### No ZFS Dataset Management The original VM scripts create ZFS volumes (`zfs create -V`). zmgr doesn't manage ZFS datasets. For zone brands, `zoneadm install` handles the zonepath ZFS dataset automatically. ### No Cloud-Init / Sysding Integration The VM scripts generate cloud-init configs (user-data, meta-data, network-config). Zones don't use cloud-init but could benefit from sysding config generation for first-boot setup (hostname, SSH keys, networking). ### No VNIC Naming Customization VNICs are always ``. Could support custom VNIC naming patterns per net. ### Import Matching is Best-Effort Import matches zones to templates by brand and IPs to pools by network containment. Zones with unusual configs may get poor matches. Manual editing of the resulting KDL files may be needed. ### No IPv6 Support IPAM only handles IPv4 pools. Could extend to dual-stack. ### No Automatic Rollback on Create Failure On partial failure, zmgr prints cleanup guidance but does not automatically undo. Could add `--rollback-on-failure` flag. ### No Colored Output Could add colored state indicators (green=running, red=halted) using `owo-colors`. Should respect `NO_COLOR` env var. ## Resolved - ~~No Dry-Run Mode~~ — `--dry-run` / `-n` flag on create and destroy - ~~Single network per zone~~ — Templates define multiple `net` blocks - ~~No public/hoster IP support~~ — Pools support explicit address lists - ~~No destructive operation confirmation~~ — Destroy requires typing zone name (or `--yes`) - ~~No progress output~~ — Create/destroy show numbered step-by-step progress - ~~No partial failure guidance~~ — Prints cleanup commands on failure - ~~No config validation~~ — `zmgr validate` checks syntax, integrity, pool sanity - ~~No machine-readable output~~ — `--json` flag on all list/show/status commands - ~~No shell completions~~ — `zmgr completions bash|zsh|fish` - ~~No version flag~~ — `zmgr --version` - ~~No boot/halt commands~~ — `zmgr boot` and `zmgr halt` - ~~Publisher naming confusion~~ — Remove accepts both publisher name and filename stem - ~~Hardcoded column widths~~ — Tables auto-size based on content - ~~Import empty created date~~ — Uses current date, matches template net names ## Future Considerations - **Zone ordering**: Dependencies between zones (e.g., start DNS zone before app zones) - **Snapshots**: ZFS snapshot management for zone rollback - **Migration**: Move zones between hosts - **Monitoring**: Health checks, resource usage - **Drift detection**: Dedicated command to compare registry vs system state