mirror of
https://github.com/CloudNebulaProject/vm-manager.git
synced 2026-04-10 21:30:41 +00:00
Unified VM management consolidating QEMU-KVM (Linux) and Propolis/bhyve (illumos) backends behind an async Hypervisor trait, with a vmctl CLI for direct use and a library API for orchestrators. - Core library: types, async Hypervisor trait, miette diagnostic errors - QEMU backend: direct process management, raw QMP client, QCOW2 overlays - Propolis backend: zone-based VMM with REST API control - Shared infra: cloud-init NoCloud ISO generation, image download/cache, SSH helpers with retry - vmctl CLI: create, start, stop, destroy, list, status, console, ssh, suspend, resume, image pull/list/inspect - nebula-vm zone brand: lifecycle scripts and platform/config XML for illumos zone integration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
29 lines
631 B
Bash
29 lines
631 B
Bash
#!/bin/ksh
|
|
#
|
|
# nebula-vm brand: uninstall script
|
|
#
|
|
# Called by zoneadm(8) during zone uninstallation.
|
|
# Arguments: %z = zone name, %R = zone root
|
|
#
|
|
|
|
ZONENAME="$1"
|
|
ZONEROOT="$2"
|
|
|
|
if [[ -z "$ZONENAME" || -z "$ZONEROOT" ]]; then
|
|
echo "Usage: uninstall.ksh <zone-name> <zone-root>" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "nebula-vm: uninstalling zone '${ZONENAME}'"
|
|
|
|
# Remove the zone root contents
|
|
if [[ -d "${ZONEROOT}/root" ]]; then
|
|
rm -rf "${ZONEROOT}/root"
|
|
echo "nebula-vm: zone root removed"
|
|
fi
|
|
|
|
# Remove the zone path itself if empty
|
|
rmdir "${ZONEROOT}" 2>/dev/null || true
|
|
|
|
echo "nebula-vm: zone '${ZONENAME}' uninstalled"
|
|
exit 0
|