Files
ilnmors-homelab/docs/services/vmm/libvirt/undefine.md
2026-03-15 04:41:02 +09:00

419 B

Undefine VM

Undefine VM is critical to whole systme.

process

# Shutdown VM
systemctl --user stop "$VM_NAME".service
## virsh stop|destroy "$VM_NAME"

# Undefien VM
virsh undefine "$VM_NAME" --nvram # All vms use uefi, so the option, `--nvram` is needed to remove nvram file

# Delete VM files
sudo rm -r /var/lib/libvirt/images/"$VM_NAME".qcow2
sudo rm -r /var/lib/libvirt/seeds/"$VM_NAME"_seed.iso