Linux command
virsh-undefine 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Undefine domain
virsh undefine [domain]
Undefine and remove storage
virsh undefine [domain] --remove-all-storage
Undefine NVRAM domain
virsh undefine [domain] --nvram
说明
virsh undefine removes a persistent domain definition from libvirt. If the domain is running it becomes transient (running but no longer persistent); otherwise it is removed entirely. By default disk images are preserved; use --remove-all-storage to delete associated managed volumes as well. For domains using UEFI/NVRAM, the NVRAM file is removed by default; pass --keep-nvram to preserve it.
参数
- --remove-all-storage
- Delete associated volumes.
- --nvram
- Remove NVRAM file.
- --keep-nvram
- Preserve NVRAM file.
- --snapshots-metadata
- Remove all snapshot metadata associated with the domain.
- --managed-save
- Remove any managed save image for the domain.
- --storage _volumes_
- Comma-separated list of volume target names or source paths to remove.
- --checkpoints-metadata
- Remove all checkpoint metadata for the domain.
FAQ
What is the virsh-undefine command used for?
virsh undefine removes a persistent domain definition from libvirt. If the domain is running it becomes transient (running but no longer persistent); otherwise it is removed entirely. By default disk images are preserved; use --remove-all-storage to delete associated managed volumes as well. For domains using UEFI/NVRAM, the NVRAM file is removed by default; pass --keep-nvram to preserve it.
How do I run a basic virsh-undefine example?
Run `virsh undefine [domain]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --remove-all-storage do in virsh-undefine?
Delete associated volumes.