--preserve-data dysfunctional

Bug #1058407 reported by Christoph Egger
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
virtinst (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

% virt-clone --preserve-data -o master -n node001 -f disk-node001.qcow2
ERROR cannot stat file '/var/lib/libvirt/images/disk-node001.qcow2': No such file or directory

% qemu-img create -f qcow2 -b disk-master.qcow2 disk-node001.qcow2
[...]

% virt-clone --preserve-data -o master -n node001 -f disk-node001.qcow2
ERROR Clone onto existing storage volume is not supported: '/var/lib/libvirt/images/disk-node001.qcow2'

Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise

Note: I never expected the first to work, but I think the second virt-clone should

description: updated
Revision history for this message
Christoph Egger (christoph-egger) wrote :

fwiw in CloneManager.py around 477 disabling the exception for the --preserve-data case and it works as expected

Revision history for this message
MikeyB (supermathie) wrote :

Specifically, add the following check:

                    if not self.preserve_dest_disks:
                        raise RuntimeError(
                            _("Clone onto existing storage volume is not "
                              "currently supported: '%s'") % clone_disk.path)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in virtinst (Ubuntu):
status: New → Confirmed
Revision history for this message
Michael Speer (knomenet) wrote :

I ran into the same problem. I found that calling virt-clone with --preserve-data before calling qemu-img works.

virt-clone succeeds since there is not yet a file there, and then you can put the storage into place after the fact.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.