Commit b40fcc0
committed
guestfs: fix destroy task to handle missing storage volumes gracefully
The destroy task was failing with "Storage volume not found" errors when
trying to undefine VMs. This happened because the 'force: true' flag
attempted to delete storage volumes that may not exist.
Fixed by:
1. Replacing 'force: true' with specific flags (nvram, snapshots-metadata,
checkpoints-metadata) that don't try to delete storage volumes
2. Adding 'ignore_errors: true' to handle any remaining failures gracefully
3. Adding a separate cleanup task that explicitly attempts to delete
storage volumes with proper error handling using shell commands
This ensures the destroy process completes successfully even when storage
volumes are missing or already deleted.
Generated-by: Claude AI
Signed-off-by: Luis Chamberlain <[email protected]>1 parent 878d325 commit b40fcc0
1 file changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
36 | 47 | | |
37 | 48 | | |
38 | 49 | | |
| |||
0 commit comments