我要评分
获取效率
正确性
完整性
易理解

"cannot undefine domain with nvram" Displayed During VM Deletion

Symptom

When virsh undefine vm2 is executed, the following information is displayed:

error: Requested operation is not valid: cannot undefine domain with nvram

Key Process and Cause Analysis

The nvram file is used during the VM startup, the nvram processing policy needs to be specified when destroying the VM.

Conclusion and Solution

Add the --nvram parameter to the command so that the corresponding NVRAM file is deleted when the VM is destroyed. Run the following command to delete the VM:

virsh undefine vm2 --nvram