Created attachment 1006541 [details] File shows commands to reproduce the problem virtman version 1.1.0 virsh version 1.2.9.0 $ qemu --version QEMU emulator version 2.1.3 (qemu-2.1.3-3.fc21) $ virsh domxml-to-native qemu-argv fed_21_1.xml > try.txt $ virsh domxml-from-native qemu-argv try.txt > try.xml internal error: missing index/unit/bus parameter in drive 'file=/var/lib/libvirt/images/fedora21_2.qcow2,if=none,id=drive-virtio-disk0,format=qcow2
When attempting to convert xml to native qemu and back, domxml-from-native reports the following error in trying to convert the native format generated by domxml-to-native back to xml: internal error: missing index/unit/bus parameter in drive 'file=/var/lib/libvirt/images/fedora21_2.qcow2,if=none,id=drive-virtio-disk0,format=qcow2 To reproduce, issue the following commands: Generate xml for guest created by virt-manager. # virsh dumpxml fed_21_1 > /tmp/1.xml $ virsh domxml-to-native qemu-argv /tmp/1.xml > try.txt $ virsh domxml-from-native qemu-argv try.txt > try.xml internal error: missing index/unit/bus parameter in drive 'file=/var/lib/libvirt/images/fedora21_2.qcow2,if=none,id=drive-virtio-disk0,format=qcow2 Versions of utilities are shown in detail below: ----------------- Host is fed_21. $ uname -a Linux Fedora21 3.18.9-200.fc21.x86_64 #1 SMP Mon Mar 9 15:10:50 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux virt-manager version 1.1.0 $ virsh --version virsh version 1.2.9.0 $ virsh --version=long Virsh command line tool of libvirt 1.2.9.2 See web site at http://libvirt.org/ Compiled with support for: Hypervisors: QEMU/KVM LXC UML Xen LibXL OpenVZ VMWare PHYP VirtualBox ESX Hyper-V Test Networking: Remote Network Bridging Interface netcf Nwfilter VirtualPort Storage: Dir Disk Filesystem SCSI Multipath iSCSI LVM RBD Gluster Miscellaneous: Daemon Nodedev SELinux Secrets Debug DTrace Readline Modular virsh -c qemu:///system version --daemon Compiled against library: libvirt 1.2.9 Using library: libvirt 1.2.9 Using API: QEMU 1.2.9 Running hypervisor: QEMU 2.1.3 Running against daemon: 1.2.9 $ qemu --version QEMU emulator version 2.1.3 (qemu-2.1.3-3.fc21) Guest is running Fedora 21. It was reated by virt-manager and is fully functioning. xml was created by virsh dumpxml.
Created attachment 1006778 [details] xml from virsh dumpxml command. This is the xml from the virsh dumpxml command.
Created attachment 1006780 [details] native qemu-argv format generated by domxml-to-native command is attached. This attachment has the native format qemu command generated by dimxml-to-native virsh command.
Just of of curiosity, do you have any use case for this or did you just wanted to try it? The domxml-from-native command is very limited in what it can do and it doesn't even understand a lot of advanced things libvirt itself puts into a QEMU command line. The main usage of this command is if you previously used QEMU directly and want to switch over to using libvirt. Then the command could help you create an XML which would start QEMU with the same devices you used when running QEMU directly. If it is able to understand the QEMU command line, of course.
That is a good question and my use case is similar. I am trying to test vhost-cuse in DPDK/OVS data plane. I have the host side done and I am now trying to add the vHost device to the guest. I have two examples, one with a sample qemu command line and the other one with edits for the domain xml. I had trouble getting the qemu command to work so I then tried to see if I could edit the additional device info into the xml, but the format was different then my example as documented in OVS perhaps because of a version change in libvirt. Next I googled to see what the recommended way to get the additional device information into the domain xml. Googling, I encountered the following documentation, https://libvirt.org/drvqemu.html#xmlimport which suggested converting the domain to qemu-argv. That is why I tried doing it this way. Before I tried my device and netdev changes to the qemu-argv, I wanted to make sure that the qemu-argv created from the unmolested guest roman xml would work and I ran into the error documented here. (In reply to Jiri Denemark from comment #4) > Just of of curiosity, do you have any use case for this or did you just > wanted to try it? > > The domxml-from-native command is very limited in what it can do and it > doesn't even understand a lot of advanced things libvirt itself puts into a > QEMU command line. The main usage of this command is if you previously used > QEMU directly and want to switch over to using libvirt. Then the command > could help you create an XML which would start QEMU with the same devices > you used when running QEMU directly. If it is able to understand the QEMU > command line, of course.
This message is a reminder that Fedora 21 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 21. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '21'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 21 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Still relevant with libvirt-daemon-1.2.18.1-2.fc23.x86_64
*** This bug has been marked as a duplicate of bug 844845 ***