Bug 869607

Summary: virt-manger: cannot clone a machine when a disk is on LVM
Product: [Fedora] Fedora Reporter: Martin Krizek <mkrizek>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: berrange, clalancette, crobinso, hbrock, itamar, jforbes, jyang, laine, libvirt-maint, pschindl, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-06 15:14:37 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Martin Krizek 2012-10-24 08:04:46 EDT
Description of problem:

Cloning a machine results in:

Error creating virtual machine clone 'f17-clean-32-clone': cannot create path '/dev/vg_data/f17-clean-32-clone': File exists

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 96, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/clone.py", line 829, in _async_clone
    CloneManager.start_duplicate(self.clone_design, meter)
  File "/usr/lib/python2.7/site-packages/virtinst/CloneManager.py", line 640, in start_duplicate
    _do_duplicate(design, meter)
  File "/usr/lib/python2.7/site-packages/virtinst/CloneManager.py", line 665, in _do_duplicate
  File "/usr/lib/python2.7/site-packages/virtinst/VirtualDisk.py", line 1429, in setup_dev
    return self.setup(meter)
  File "/usr/lib/python2.7/site-packages/virtinst/VirtualDisk.py", line 1439, in setup
  File "/usr/lib/python2.7/site-packages/virtinst/VirtualDisk.py", line 1284, in _do_create_storage
  File "/usr/lib/python2.7/site-packages/virtinst/Storage.py", line 1211, in install
    vol = self.pool.createXMLFrom(xml, self.input_vol, 0)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 2274, in createXMLFrom
    if ret is None:raise libvirtError('virStorageVolCreateXMLFrom() failed', pool=self)
libvirtError: cannot create path '/dev/vg_data/f17-clean-32-clone': File exists

$ ls /dev/vg_data/f17-clean-32-clone
ls: cannot access /dev/vg_data/f17-clean-32-clone: No such file or directory

This happens on each vm I have that has virtual disk on LVM.

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

How reproducible:
Comment 1 Petr Schindler 2012-11-01 09:45:40 EDT
It also happened to me. I got the same traceback in the same situation.

Comment 2 Cole Robinson 2012-11-26 17:01:35 EST
Fixed in upstream libvirt by:

commit 70f0bbe8e046dae1b811378f735872d3e61f4609
Author:     Ján Tomko <jtomko@redhat.com>
AuthorDate: 2012-11-25 02:59:33 +0100
Commit:     Michal Privoznik <mprivozn@redhat.com>
CommitDate: 2012-11-26 14:01:29 +0100

    storage: fix logical volume cloning
Comment 3 Fedora Update System 2012-12-09 19:45:24 EST
libvirt- has been submitted as an update for Fedora 18.