Bug 1598281

Summary: Can NOT convert an existing guest to the native qemu-argv configuration format
Product: Red Hat Enterprise Linux 7 Reporter: Lili Zhu <lizhu>
Component: libvirtAssignee: Daniel Berrangé <berrange>
Status: CLOSED ERRATA QA Contact: Lili Zhu <lizhu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.6CC: berrange, dyuan, fjin, jdenemar, junli, lhuang, xuzhang
Target Milestone: rcKeywords: Automation, Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-4.5.0-2.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 09:57:31 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:

Description Lili Zhu 2018-07-05 02:30:08 UTC
Description of problem:
Can NOT convert an existing guest to the native qemu-argv configuration format

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. List the existing vms
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 1     avocado-vt-vm1                 running

2. Conver avocado-vt-vm1 to native qemu-argv configuration format
# virsh domxml-to-native qemu-argv  --domain avocado-vt-vm1
error: Unable to bind to UNIX socket path '/var/lib/libvirt/qemu/domain--1-avocado-vt-vm1/monitor.sock': No such file or directory


Expected results:
Conversion should be successful.

Additional info:
When I tried this virsh cmd on libvirt-4.4.0-2.el7.x86_64

# virsh domxml-to-native qemu-argv  --domain avocado-vt-vm1
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -name guest=avocado-vt-vm1,debug-threads=on -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-avocado-vt-vm1/master-key.aes .....

The conversion succeed.

Comment 3 Lili Zhu 2018-07-05 02:33:19 UTC
The bug is found on libvirt-4.5.0-1.el7.x86_64

Comment 4 Daniel Berrangé 2018-07-05 07:24:15 UTC
We need this fix from upstream

commit 7ac08cc929dc512e8682fbfcc5d33518058f20e4
Author: Daniel P. Berrangé <berrange>
Date:   Thu Jun 28 12:49:12 2018 +0100

    qemu: don't use chardev FD passing with standalone args
    
    When using domxml-to-native, we must generate CLI args that can be used
    in a standalone scenario. This means no FD passing can be used. To
    achieve this we must clear the QEMU_CAPS_CHARDEV_FD_PASS capability bit.
    
    Reviewed-by: John Ferlan <jferlan>
    Signed-off-by: Daniel P. Berrangé <berrange>

Comment 7 Lili Zhu 2018-07-23 04:58:58 UTC
Verify this bug with:
libvirt-4.5.0-3.el7.x86_64

Steps to verify:
1. List the existing vms
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 22    win16                          running


2. Conver avocado-vt-vm1 to native qemu-argv configuration format
# virsh domxml-to-native qemu-argv  --domain win16
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=spice /usr/libexec/qemu-kvm -name guest=win16,debug-threads=on -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-win16/master-key.aes -machine pc-i440fx-rhel7.6.0,.....

Comment 8 Lili Zhu 2018-07-26 10:48:14 UTC
 # ps aux |grep qemu
qemu     25896  112  0.8 2717260 132536 ?      Sl   18:35   0:12 /usr/libexec/qemu-kvm -name guest=win16
....
-chardev socket,id=charmonitor,fd=29,server,nowait -mon chardev=charmonitor,id=monitor
....

As the guest can be started successfully, and did not change the other functions of the guest.

Mark the bug as verified.

Comment 10 errata-xmlrpc 2018-10-30 09:57:31 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://access.redhat.com/errata/RHSA-2018:3113