new-vm --replace stops on a hand-deleted system disk and leaves the domain defined #79

Open
opened 2026-10-06 03:09:39 +01:00 by vnprc-agent · 0 comments

new-vm --replace removes the old machine with virsh undefine --storage vda, which stops with storage volume is not managed by libvirt when the disk image at that path has been deleted by hand. The domain is still defined, so a plain provision-vm refuses too, and the operator is stuck between two refusals until they virsh undefine the domain themselves and virsh pool-refresh default so libvirt forgets the stale volume.

A hand-deleted image is a normal thing to find after an operator cleaned up a disk by path, which is the first thing they try when the disk is the thing they want gone.

Proposal: when the volume --storage names no longer exists on disk, --replace undefines the domain without --storage and refreshes the pool, then proceeds; a volume that exists keeps the current path. Both branches keep the existing refusals for a data disk at vda.

Found during the public install walk while resetting the laptop between runs.

`new-vm --replace` removes the old machine with `virsh undefine --storage vda`, which stops with `storage volume is not managed by libvirt` when the disk image at that path has been deleted by hand. The domain is still defined, so a plain `provision-vm` refuses too, and the operator is stuck between two refusals until they `virsh undefine` the domain themselves and `virsh pool-refresh default` so libvirt forgets the stale volume. A hand-deleted image is a normal thing to find after an operator cleaned up a disk by path, which is the first thing they try when the disk is the thing they want gone. Proposal: when the volume `--storage` names no longer exists on disk, `--replace` undefines the domain without `--storage` and refreshes the pool, then proceeds; a volume that exists keeps the current path. Both branches keep the existing refusals for a data disk at `vda`. Found during the public install walk while resetting the laptop between runs.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
allod/nexus#79
No description provided.