Bug 1342043 - Freshly installed disk of a VM is removed after installation if the first attempt to install fails
Summary: Freshly installed disk of a VM is removed after installation if the first att...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-02 10:30 UTC by Peter Krempa
Modified: 2016-06-16 23:50 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-06-16 23:50:22 UTC
Embargoed:


Attachments (Terms of Use)
virt-manager debug log (32.00 KB, text/plain)
2016-06-02 10:30 UTC, Peter Krempa
no flags Details

Description Peter Krempa 2016-06-02 10:30:57 UTC
Created attachment 1164024 [details]
virt-manager debug log

Description of problem:
A second attempt to install a VM after a failed installation results into deletion of the VM image file.


Version-Release number of selected component (if applicable):
virt-manager 1.3.2

How reproducible:
100%

Steps to Reproduce:
1. stop virtlogd
2. start installing a new (Linux) VM in virt-manager
3. select "customize before installation"
4. click "begin installation"

At this point the installation fails since libvirtd is refusing to start a VM withouth virtlogd running.

5. start virtlogd
6. click "begin installation" again
7. finish the installation of the OS and reboot

Actual results:
After the reboot the VM can't be started with following message:
2016-06-02 08:58:10.665+0000: 58443: error : virSecurityDACSetOwnershipInternal:343 : unable to set user and group to '0:0' on '/var/lib/libvirt/images/fedora23.qcow2': No such file or directory
2016-06-02 08:58:10.712+0000: 58161: error : virStorageFileGetMetadataRecurse:3114 : Cannot access storage file '/var/lib/libvirt/images/fedora23.qcow2' (as uid:0, gid:0): No such file or directory

The vm image file is removed.

Expected results:
VM disk image is not removed.

Additional info:

Comment 1 Cole Robinson 2016-06-16 23:50:22 UTC
Thanks for the report, fixed upstream now:

commit 5cd1b57852f5b9f96780b7ad54f992ce7b3cdaca
Author: Cole Robinson <crobinso>
Date:   Thu Jun 16 19:47:49 2016 -0400

    create: customize: Fix inadvertent disk removal on install fail
    
    If the first install attempt fails, then the second attempt succeeds,
    we were still removing the disk images we created as though the
    install never succeeded. We need to clear out the cached failed_guest
    value via the customize dialog callback
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1342043


Note You need to log in before you can comment on or make changes to this bug.