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 957077 - Convert guest domain XML config to a native guest configuration format occur an unknown error.
Summary: Convert guest domain XML config to a native guest configuration format occur ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-26 10:13 UTC by zzhong@redhat.com
Modified: 2014-06-18 00:49 UTC (History)
7 users (show)

Fixed In Version: libvirt-1.0.5-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 09:39:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description zzhong@redhat.com 2013-04-26 10:13:58 UTC
Description of problem:

 Convert guest domain XML config to a native guest configuration format occur an unknown error.


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

 libvirt-1.0.4-1.1.el7.x86_64
 qemu-kvm-1.4.0-2.1.el7.x86_64
 kernel-3.8.0-0.43.el7.x86_64


How reproducible:
100%



Steps to Reproduce:

1: config qemu.conf to support tls
  1.1 uncomment the following settings in qemu.conf
    spice_listen = "0.0.0.0"
    spice_tls = 1
    spice_tls_x509_cert_dir = "/etc/pki/libvirt-spice"
  1.2 erform the following script, to generate the cert files for ssl , and then copy *.pem file info /etc/pkil/libvirt-spice directory
#!/bin/bash

SERVER_KEY=server-key.pem

# creating a key for our ca
if [ ! -e ca-key.pem ]; then
    openssl genrsa -des3 -out ca-key.pem 1024
fi
# creating a ca
if [ ! -e ca-cert.pem ]; then
    openssl req -new -x509 -days 1095 -key ca-key.pem -out ca-cert.pem  -subj "/C=IL/L=Raanana/O=Red Hat/CN=my CA"
fi
# create server key
if [ ! -e $SERVER_KEY ]; then
    openssl genrsa -out $SERVER_KEY 1024
fi
# create a certificate signing request (csr)
if [ ! -e server-key.csr ]; then
    openssl req -new -key $SERVER_KEY -out server-key.csr -subj "/C=IL/L=Raanana/O=Red Hat/CN=my server"
fi
# signing our server certificate with this ca
if [ ! -e server-cert.pem ]; then
    openssl x509 -req -days 1095 -in server-key.csr -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 -out server-cert.pem
fi

# now create a key that doesn't require a passphrase
openssl rsa -in $SERVER_KEY -out $SERVER_KEY.insecure
mv $SERVER_KEY $SERVER_KEY.secure
mv $SERVER_KEY.insecure $SERVER_KEY

# show the results (no other effect)
openssl rsa -noout -text -in $SERVER_KEY
openssl rsa -noout -text -in ca-key.pem
openssl req -noout -text -in server-key.csr
openssl x509 -noout -text -in server-cert.pem
openssl x509 -noout -text -in ca-cert.pem

# copy *.pem file to /etc/pki/libvirt-spice
if [[ -d "/etc/pki/libvirt-spice" ]] 
then
    cp ./*.pem /etc/pki/libvirt-spice
else
    mkdir /etc/pki/libvirt-spice
        cp ./*.pem /etc/pki/libvirt-spice
fi

# echo --host-subject
echo "your --host-subject is" \" `openssl x509 -noout -text -in server-cert.pem | grep Subject: | cut -f 10- -d " "` \"
2:
echo '<?xml version="1.0"?>
<domain type="kvm">
  <name>tls-only</name>
  <memory>32768</memory>
  <os>
    <type arch="x86_64" machine="pc">hvm</type>
  </os>
  <devices>
    <graphics type="spice" tlsPort="5800" passwd="123" >
      <listen type="address" address="::" />
    </graphics>
    <video>
      <model type="qxl" vram="32768" heads="1"/>
    </video>
  </devices>
</domain>' | virsh domxml-to-native qemu-argv /dev/stdin
  
Actual results:
    error: An error occurred, but the cause is unknown

Expected results:
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=spice /usr/libexec/qemu-kvm -name tls-only -S -M pc -enable-kvm -m 32 -smp 1,sockets=1,cores=1,threads=1 -uuid 74377671-f095-aa5b-031b-2c5037b81977 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/tls-only.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -no-acpi -device piix3-usb-uhci,id=usb -spice tls-port=5800,addr=::,x509-dir=/etc/pki/libvirt-spice,seamless-migration=on -vga qxl -global qxl-vga.vram_size=33554432 -device virtio-balloon-pci,id=balloon0

Additional info:

Comment 2 Ján Tomko 2013-04-26 11:57:59 UTC
Upstream patch proposed:
https://www.redhat.com/archives/libvir-list/2013-April/msg01910.html

Comment 3 Ján Tomko 2013-04-30 08:49:16 UTC
Fixed upstream by:
commit 11fc1beab6e018a88182f80056d35217c150b3de
Author:     Ján Tomko <jtomko>
AuthorDate: 2013-04-29 19:54:07 +0200
Commit:     Ján Tomko <jtomko>
CommitDate: 2013-04-30 10:23:44 +0200

    qemu: assign addresses when converting xml to native
    
    This adds addresses to domxml-to-native output and chooses
    the correct virtio devices for ccw and s390 machines.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=957077

Comment 4 zzhong@redhat.com 2013-05-08 01:00:48 UTC
verify with build:
libvirt-1.0.5-1.el7.x86_64
qemu-kvm-1.4.0-4.el7.x86_64
3.8.0-0.43.el7.x86_64

step is same with the description.

[root@zzhong test20130425]#echo '
<domain type="kvm">
<name>tls-only</name>
<memory>32768</memory>
<os>
<type arch="x86_64" machine="pc">hvm</type>
</os>
<devices>
<graphics type="spice" tlsPort="5800" passwd="123" >
<listen type="address" address="::" />
</graphics>
<video>
<model type="qxl" vram="32768" heads="1"/>
</video>
</devices>
</domain>' | virsh domxml-to-native qemu-argv /dev/stdin
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=spice /usr/libexec/qemu-kvm -name tls-only -S -machine pc,accel=kvm,usb=off -m 32 -smp 1,sockets=1,cores=1,threads=1 -uuid 30c6c8cb-f6d2-4aea-9f0c-05deccd6c45f -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/tls-only.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -no-acpi -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -spice tls-port=5800,addr=::,x509-dir=/etc/pki/libvirt-spice,seamless-migration=on -vga qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=33554432 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3

not occur an unknown error.verification passed.

Comment 6 Ludek Smid 2014-06-13 09:39:42 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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