Bug 1369373 - VMs cloned with 'virt-clone' can't be started normally
Summary: VMs cloned with 'virt-clone' can't be started normally
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-23 08:54 UTC by Wee Sritippho
Modified: 2016-09-08 21:02 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-08 21:02:29 UTC


Attachments (Terms of Use)
/var/log/libvirt/qemu/clonedvm.log (3.28 KB, text/plain)
2016-08-23 08:54 UTC, Wee Sritippho
no flags Details

Description Wee Sritippho 2016-08-23 08:54:44 UTC
Created attachment 1193273 [details]
/var/log/libvirt/qemu/clonedvm.log

Description of problem:
VMs cloned with 'virt-clone' can't be started normally - have to edit their XML first.

Version-Release number of selected component (if applicable):
libvirt-1.2.17-13.el7_2.5.x86_64
virt-manager-common-1.2.1-8.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. Shutdown the original VM
2. As root, type "virt-clone --original originalvm --name clonedvm --file /var/lib/libvirt/images/clonedvm.qcow2" [1]
3. As root, type "virsh start clonedvm" [2]

Actual results:

[1]

Allocating 'clonedvm.qcow2'                                |  40 GB     00:02

Clone 'clonedvm' created successfully.

[2]

error: Failed to start domain clonedvm
error: internal error: process exited while connecting to monitor: 2016-08-23T09:59:15.623814Z qemu-kvm: -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-originalvm/org.qemu.guest_agent.0,server,nowait: Failed to bind socket: No such file or directory
2016-08-23T09:59:15.624015Z qemu-kvm: -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-originalvm/org.qemu.guest_agent.0,server,nowait: chardev: opening backend "socket" failed

Expected results:

[2]

Domain clonedvm started


Additional info:
In element "domain => devices => channel[unix]" of the cloned VM's XML:

    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-originalvm/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>

Attribute "path" of element "source" still uses the same value as the old VM. After changing the value to:

      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-clonedvm/org.qemu.guest_agent.0'/>

The cloned VM started normally.

Comment 1 Cole Robinson 2016-09-08 21:02:29 UTC
Thanks for the report, but this was already fixed in virt-manager 1.3.0:

commit 3a33f3414f473d0396305fa405ce2940076bfc68
Author: Pavel Hrdina <phrdina>
Date:   Mon Nov 2 13:20:15 2015 +0100

    virt-clone: remove socket path for unix channel


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