Bug 1270696
| Summary: | Failed to start new guest after cloned it from original guest | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | zhoujunqin <juzhou> |
| Component: | virt-manager | Assignee: | Pavel Hrdina <phrdina> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 7.2 | CC: | bcholler, bugzilla, felipe.alfaro, hmatsumo, ivillegas, jscalia, jyrki.tikka, mxie, mzhan, philwyett, phrdina, qzhao, tzheng, va, xiaodwan |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | virt-manager-1.3.2-1.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-11-04 01:59:12 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1288337 | ||
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 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>
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions *** Bug 1339482 has been marked as a duplicate of this bug. *** 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. 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. My personal workaround: upgrade to virt-manager-* as of FC24 :-) 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. 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) 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 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 *** Bug 1448791 has been marked as a duplicate of this bug. *** |
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.