Bug 844845

Summary: qemu: domxml-from-native: 'missing index/unit/bus parameter in drive'
Product: [Community] Virtualization Tools Reporter: weizhang <weizhan>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED WONTFIX QA Contact: Lili Zhu <lizhu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: cra, crobinso, cwei, dyuan, mars, mzhan, therbert, yalzhang
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-28 15:55:10 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:
Attachments:
Description Flags
qemu-attach log none

Description weizhang 2012-08-01 02:35:45 UTC
Created attachment 601634 [details]
qemu-attach log

Description of problem:
qemu-attach command report error when I try to attach a qemu-kvm process to libvirt

Version-Release number of selected component (if applicable):
kernel-2.6.32-289.el6.x86_64
libvirt-0.9.13-3.el6.x86_64
qemu-kvm-0.12.1.2-2.299.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. start a guest with qemu command
# /usr/libexec/qemu-kvm -M rhel6.3.0 -enable-kvm -m 251 -smp 1,sockets=1,cores=1,threads=1 -name guest3 -uuid c544c118-a526-439a-9166-ac3f1f75c489 -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/guest3.monitor,server,nowait -rtc base=utc -no-shutdown -drive file=/var/lib/libvirt/migrate/guest3,if=none,id=drive-virtio-disk0,format=raw -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 &

# QEMUPID=$!

# virsh qemu-attach $QEMUPID

  
Actual results:
report error
error: internal error missing index/unit/bus parameter in drive 'file=/var/lib/libvirt/migrate/guest3,if=none,id=drive-virtio-disk0,format=raw'

Expected results:
should succeed

Additional info:

Comment 2 Cole Robinson 2016-04-21 22:09:01 UTC
Libvirt wants the unit/bus values so it can generate a disk target= value. But the parser should be smart enough to just generate a target value based on the disk order. If we implement target generation in generic code (which would be helpful for all API users, https://bugzilla.redhat.com/show_bug.cgi?id=1326526 ) then we probably can implement this easily

Comment 3 Cole Robinson 2016-04-21 22:09:12 UTC
*** Bug 1038944 has been marked as a duplicate of this bug. ***

Comment 4 Cole Robinson 2016-04-21 22:09:18 UTC
*** Bug 1205925 has been marked as a duplicate of this bug. ***

Comment 5 Cole Robinson 2019-06-28 15:55:10 UTC
Upstream we have entirely dropped 'virsh domxml-from-native' qemu-argv support.

commit 5cc402a9b4c4e5422775b2b60f8272c16c0ed62f
Author: Peter Krempa <pkrempa>
Date:   Fri Jun 14 14:56:35 2019 +0200

    qemu: driver: Remove support for native->XML conversion

A bit more discussion/details here: https://www.redhat.com/archives/libvir-list/2019-April/msg00605.html

So this bug is no longer valid as of the next release libvirt 5.0.0

Comment 6 Cole Robinson 2019-06-28 15:56:56 UTC
That should say: this bug is no longer valid as of the next release libvirt 5.5.0