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 1294617 - Migration fails with -dname option when guest agent is specified
Summary: Migration fails with -dname option when guest agent is specified
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-29 10:06 UTC by Dan Zheng
Modified: 2016-11-03 18:50 UTC (History)
7 users (show)

Fixed In Version: libvirt-1.3.1-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:50:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

Description Dan Zheng 2015-12-29 10:06:16 UTC
Description of problem:
Migration fails with -dname option when guest agent is specified in guest XML.
The migrated guest XML on target machine is not updated to use new guest name specified by -dname.

Version-Release number of selected component (if applicable):
libvirt-1.2.17-13.el7_2.2.x86_64
qemu-kvm-rhev-2.3.0-31.el7.x86_64
kernel-3.10.0-320.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Start a guest.
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 30    avocado-vt-vm1                 running

2. Check the dumpxml of the guest.
   <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-avocado-vt-vm1/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>

3. Check the file.
# ll /var/lib/libvirt/qemu/channel/target/domain-avocado-vt-vm1/
total 0
srwxrwxr-x. 1 qemu qemu 0 Dec 29 16:59 org.qemu.guest_agent.0

4. Do migration
# virsh migrate --live --domain avocado-vt-vm1 --desturi qemu+ssh://10.66.4.167/system --dname not_exist_domain
root.4.167's password:
error: internal error: process exited while connecting to monitor: 2015-12-29T08:59:07.318646Z qemu-kvm: -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-avocado-vt-vm1/org.qemu.guest_agent.0,server,nowait: Failed to bind socket to /var/lib/libvirt/qemu/channel/target/domain-avocado-vt-vm1/org.qemu.guest_agent.0: No such file or directory

5. Check on the target machine (10.66.4.167/), and no guest exists.

Actual result:
See step 4.
The migration fails.


Expected result:
The migration should succeed and the guest named 'not_exist_domain' should be running on target machine.

Additional information:
Debug information on target machine.
# cat /var/log/libvirt/qemu/not_exist_domain.log
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -name not_exist_domain -S -machine pc-i440fx-rhel7.2.0,accel=kvm,usb=off -cpu SandyBridge -m 1024 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid 5d7c2231-5f46-4b94-bbd8-e46f245e1402 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-not_exist_domain/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x5.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x5.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x5.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4 -drive file=/usr/share/avocado/data/avocado-vt/images/jeos-19-64.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=23,id=hostnet0,vhost=on,vhostfd=24 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:52:53:54,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-avocado-vt-vm1/org.qemu.guest_agent.0,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -device usb-tablet,id=input0 -vnc 127.0.0.1:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -incoming tcp:[::]:49152 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -msg timestamp=on

*** This is wrong parameter in the command line.
-chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-avocado-vt-vm1/org.qemu.guest_agent.0

Comment 2 Fangge Jin 2015-12-30 02:02:30 UTC
I tried with the following xml, migration can succeed:
...
    <channel type='unix'>
      <source mode='bind' path='**/var/lib/libvirt/qemu/kernel.agent**'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
...

# virsh start kernel

# virsh migrate kernel qemu+ssh://10.66.4.113/system --live --dname new

On the target host:
# virsh list
 Id    Name                           State
----------------------------------------------------
 12    new                            running

The qemu command line is:
-chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/kernel.agent,server,nowait

Comment 3 Pavel Hrdina 2016-02-29 11:21:46 UTC
This bug is fixed by BZ 1278068, but don't mark it as duplicate in order to explicitly test the migration to make sure it's working.

Comment 5 zhe peng 2016-04-13 05:48:08 UTC
Verify with build:
libvirt-1.3.3-1.el7.x86_64
qemu-kvm-rhev-2.5.0-4.el7.x86_64

Step:
1. start guest, check xml:
<channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-18-test/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
2. Do migration:
# virsh migrate --live test qemu+ssh://$target_ip/system --dname test_name

3. migration can worked well.
4. check file on target machine
# ll /var/lib/libvirt/qemu/channel/target/domain-4-test_name/org.qemu.guest_agent.0 
srwxrwxr-x. 1 qemu qemu 0 Apr 13 13:34 /var/lib/libvirt/qemu/channel/target/domain-4-test_name/org.qemu.guest_agent.0

worked as expect.Move to verified.

Comment 7 errata-xmlrpc 2016-11-03 18:50:13 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/RHSA-2016-2577.html


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