Bug 799721

Summary: RFE: Offer to clean up disk volumes if guest install fails
Product: [Community] Virtualization Tools Reporter: Jonathan DePrizio <jondeprizio>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: antoniok.spb, berrange, crobinso, hbrock, jforbes, jondeprizio, rbalakri, tross, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-06 15:11:43 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Jonathan DePrizio 2012-03-04 11:36:51 EST
Description of problem:
When creating a guest, if guest creation fails for some reason, but fails AFTER creating the volume for the VM, the volume is not cleaned up (and no dialogue is presented asking the user whether he wants to clean up).  The consequence is that you will have an orphaned volume, used by no one.

Version-Release number of selected component (if applicable):
Virtual Machine Manager 0.9.1

How reproducible:
Every time

Steps to Reproduce:
1. In the Virtual Manage Manager, begin creating a new VM
2. Select some option that will cause it to fail.  E.g, use "local install media" -> "use CDRom or DVD" but don't put anything in the drive
3. Click through to create the volume, etc... until you reach the end of the wizard
4. The wizard will fail and the VM will not be created. Close the wizard.
Actual results:
The VM is not created.  The volume for the VM is created and left orphaned.

Expected results:
When closing the wizard, the user should be prompted that the volume was created, and asked whether or not it should be deleted.

Additional info:
Comment 1 Cole Robinson 2015-09-06 15:11:43 EDT
Upstream will delete the 'default' created volumes, the ones without any prompting from the user. We could extend it in the future to also offer to delete manually created volumes, but it's a bit more work so defering that for now

commit 60d6161efc90a7728df98e73452e95388e7fe369
Author: Cole Robinson <crobinso@redhat.com>
Date:   Sun Sep 6 14:42:55 2015 -0400

    create: Clean up default storage if VM fails (bz #799721)