RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1270696 - Failed to start new guest after cloned it from original guest
Summary: Failed to start new guest after cloned it from original guest
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.2
Hardware: x86_64
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 1339482 1448791 (view as bug list)
Depends On:
Blocks: 1288337
TreeView+ depends on / blocked
 
Reported: 2015-10-12 07:49 UTC by zhoujunqin
Modified: 2020-09-21 07:38 UTC (History)
15 users (show)

Fixed In Version: virt-manager-1.3.2-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 01:59:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2758831 0 None None None 2016-11-09 18:16:20 UTC
Red Hat Product Errata RHBA-2016:2269 0 normal SHIPPED_LIVE virt-manager bug fix and enhancement update 2016-11-03 13:34:19 UTC

Description zhoujunqin 2015-10-12 07:49:27 UTC
Description of problem:
Failed to start new guest after cloned it from original guest

Version-Release number of selected component (if applicable):
libvirt-1.2.17-13.el7.x86_64
virt-manager-1.2.1-8.el7.noarch
virt-manager-common-1.2.1-8.el7.noarch
virt-install-1.2.1-8.el7.noarch
qemu-kvm-1.5.3-104.el7.x86_64
qemu-guest-agent-2.3.0-4.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare a health guest(Install this guest via virt-manger by default setting)
# virsh dumpxml rhel7.2-snap4
...
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-rhel7.2-snap4/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>
...

2. Use virt-clone to create a new guest:
# virt-clone  -o rhel7.2-snap4 --auto-clone
Allocating 'rhel7.2-snap4-clone1.qcow2'                                                                              | 6.0 GB  00:00:38    

Clone 'rhel7.2-snap4-clone1' created successfully.

3. Start new created guest 'rhel7.2-snap4-clone1'.

Actual results:
After step3, failed to start the cloned guest with following error:
# virsh start rhel7.2-snap4-clone1
error: Failed to start domain rhel7.2-snap4-clone1
error: internal error: process exited while connecting to monitor: 2015-10-12T06:31:30.171663Z qemu-kvm: -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-rhel7.2-snap4/org.qemu.guest_agent.0,server,nowait: Failed to bind socket: No such file or directory
2015-10-12T06:31:30.171739Z qemu-kvm: -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-rhel7.2-snap4/org.qemu.guest_agent.0,server,nowait: chardev: opening backend "socket" failed



Expected results:
The new cloned guest can start successfully.

Additional info:
1. check new guest 'rhel7.2-snap4-clone1' xml file:
# virsh dumpxml rhel7.2-snap4-clone1
...
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-rhel7.2-snap4/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>

Finding that this part also the same with original guest, i think the path should update to path='/var/lib/libvirt/qemu/channel/target/domain-rhel7.2-snap4-clone1/org.qemu.guest_agent.0' while cloning.

2. I found before(a guest installed on my old system) guest unix channel path directory is path='/var/lib/libvirt/qemu/channel/target/rhel7.2-0904.org.qemu.guest_agent.0'/>, now $domain folder is add after /var/lib/libvirt/qemu/channel/target/, or maybe it's a typo error.

Since above information can help you.

Comment 2 Pavel Hrdina 2015-10-12 13:06:57 UTC
Well, this is not clear whether it's a bug or not.  The only think to do is to remove the auto-generated channel source path and let libvirt generate a new one according to new domain name.

This is not a critical bug, so I'm moving it to rhel-7.3.  Workaround is to edit the xml manually and remove the path, libvirt will generate a new one.

Pavel

Comment 4 Pavel Hrdina 2015-11-02 16:41:28 UTC
Upstream commit:

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

    virt-clone: remove socket path for unix channel
    
    Libvirt automatically generates this path with a guest name used as
    directory.  The new conception is to have all sockets for one guest in
    it's own directory and in order to successfully clone a guest, we need
    to remove this path to regenerate it with new guest name.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1270696
    
    Signed-off-by: Pavel Hrdina <phrdina>

Comment 6 Mike McCune 2016-03-28 23:17:33 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 8 Pavel Hrdina 2016-05-25 10:14:56 UTC
*** Bug 1339482 has been marked as a duplicate of this bug. ***

Comment 9 XiaoyunHu 2016-06-20 02:55:02 UTC
I can reproduce this bug with package:
virt-manager-1.2.1-8.el7.noarch

Steps are the same as description above.

Then try to verify with new build:
virt-manager-1.3.2-1.el7.noarch

Steps:
1.Ensure xen server could be access
2.Run virt-manager. Add a new connect to xen host by clicking "File->Add Connection", select "Xen" in Hypervisor, check the "Connect to remote host" and input the hostname, then click "Connect".
3.Create a new guest by clicking the "Create a new virtual machine" icon and select "Local install media(ISO or CDROM)" then click forward and select rhel7.2.iso, then keep all the settings default until finish.
4.Enter into installation interface and click option "Install Red Hat Enterprise Linux 7.2".

Results:
After step4 , black screen doesn't occur and the guest can be installed successfully.

Comment 10 XiaoyunHu 2016-06-20 03:01:44 UTC
I'm so sorry to paste a wrong verification steps on comment9. The correct reproduce steps is as follows.

I can reproduce this bug with package:
virt-manager-1.2.1-8.el7.noarch

Steps are the same as description above.

Then try to verify with new build:
virt-manager-1.3.2-1.el7.noarch

Steps:
1. Prepare a health guest(Install this guest via virt-manger by default setting)
#virsh dumpxml rhel6.6-testclone
...
<channel type='unix'>
<source mode='bind'/>
<target type='virtio' name='org.qemu.guest_agent.0'/>
<address type='virtio-serial' controller='0' bus='0' port='2'/>
</channel>
...

2. Use virt-clone to create a new guest:
#virt-clone -o rhel6.6-testclone --auto-clone
Allocating 'rhel6.6-testclone-clone.qcow2' | 20 GB 01:18
Clone 'rhel6.6-testclone-clone' created successfully.

3. Start new created guest 'rhel6.6-testclone-clone'.

Result:
The new cloned guest starts successfully.

According to the result above in the latest version of virt-manager, move this bug from ON_QA to VERIFIED.

Comment 11 Felipe Alfaro Solana 2016-06-30 11:45:11 UTC
My personal workaround: upgrade to virt-manager-* as of FC24 :-)

Comment 12 Ivan Villegas 2016-07-22 16:51:59 UTC
My personal solution was:

1.- In graphical enviroment,  I remove  "Channel qemu-ga" component on "Show virtual hardware details"
2.- Then, i cloned the VM
3.-run the new VM and thats all!

Clone VM starts sucesfully.

You can do it, in command line with virsh.

Comment 13 VladimirZhe 2016-08-14 13:23:52 UTC
And if original vm started then vm's clone start without any problems...

My strange solution is to delete <channel>-section from clone's config:
1. virsh edit vm-clone
2. delete text from <channel type='unix'> to </channel>
3. virsh start vm-clone

It fixes the problem.

# rpm -q libvirt
libvirt-1.2.17-13.el7_2.5.x86_64
# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

Comment 14 Vipul Agarwal 2016-10-21 10:47:43 UTC
I reproduced the same problem using virt-clone

$ virt-install --os-type=linux --os-variant=rhel7 --network bridge:virbr0 --name vm01 --ram=1024 --vcpus=1 --disk path=/vm-images/rhel-guest-image-7.2-20160302.0.x86_64.qcow2 --graphics none --import
$ virt-clone --original vm01 --name vm02 --file /vm-images/vm02
Allocating 'vm02'                                                                             |  10 GB  00:00:05     

Clone 'vm02' created successfully
$ virsh start vm02
error: Failed to start domain vm02
error: internal error: process exited while connecting to monitor: 2016-10-21T14:31:43.057831Z qemu-kvm: -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-vm01/org.qemu.guest_agent.0,server,nowait: Failed to bind socket: No such file or directory
2016-10-21T14:31:43.057870Z qemu-kvm: -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-vm01/org.qemu.guest_agent.0,server,nowait: chardev: opening backend "socket" failed

As mentioned in the above notes, the fix is to edit the guest xml file and change the path.


$ cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.2 (Maipo)
$ uname -a
Linux kvm-host 3.10.0-327.36.2.el7.x86_64 #1 SMP Tue Sep 27 16:01:21 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
$ rpm -q libvirt
libvirt-1.2.17-13.el7_2.5.x86_64

Comment 16 errata-xmlrpc 2016-11-04 01:59:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2269.html

Comment 17 Pavel Hrdina 2017-05-09 09:54:47 UTC
*** Bug 1448791 has been marked as a duplicate of this bug. ***


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