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   
Whiteboard:
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
    dst_dev.setup_dev(meter=meter)
  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
    self._do_create_storage(progresscb)
  File "/usr/lib/python2.7/site-packages/virtinst/VirtualDisk.py", line 1284, in _do_create_storage
    self._set_vol_object(self.vol_install.install(meter=progresscb),
  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

However:
$ 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):
libvirt-0.10.2-3.fc18.x86_64
virt-manager-0.9.4-1.fc18.1.noarch

How reproducible:
Always
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.

libvirt-0.10.2.1-2.fc18.x86_64
virt-manager-0.9.4-3.fc18.noarch
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-0.10.2.2-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/libvirt-0.10.2.2-1.fc18