Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1357188 - KVM: unable to define a domain do to a path error in virsh
Summary: KVM: unable to define a domain do to a path error in virsh
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: qemu
Version: 24
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Fedora Virtualization Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-16 07:22 UTC by Todd
Modified: 2016-07-17 05:29 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-16 21:50:08 UTC


Attachments (Terms of Use)
How To set up Watchguard Dimension VM (deleted)
2016-07-16 21:24 UTC, Todd
no flags Details

Description Todd 2016-07-16 07:22:20 UTC
Dear Red Hat,

Would one of our intrepid heroes please fix this for me?

# rpm -qa qemu-kvm
qemu-kvm-2.6.0-4.fc24.x86_64

I am unable to define a domain (xml) do to a path error in virsh with out a workaround:

# virsh define watchguard-dimension.xml
error: Failed to define domain from watchguard-dimension.xml
error: Cannot check QEMU binary /usr/libexec/qemu-kvm: No such file or directory

Workaround:

# which qemu-kvm
/bin/qemu-kvm
# ln -s /bin/qemu-kvm /usr/libexec/qemu-kvm
# virsh define watchguard-dimension.xml
Domain KVM-Watchguard defined from watchguard-dimension.xml


Many thanks,
-T

Comment 1 Richard W.M. Jones 2016-07-16 08:32:04 UTC
Edit the XML and change the <emulator> element to point to
the real location of the qemu binary.

Comment 2 Todd 2016-07-16 08:34:28 UTC
I beg your pardon, but this is too a bug.  When the paths are not right after dnf is applied, then the RPM need to be fixed to point to the right path.  This need to work "out of the box"

Comment 3 Richard W.M. Jones 2016-07-16 10:38:16 UTC
Where did you get the XML from?  Please also attach the XML.

Comment 4 Todd 2016-07-16 21:24:30 UTC
Created attachment 1180595 [details]
How To set up Watchguard Dimension VM

This is my how to file on setting up a Watchgaurd "Dimension" VM.  The XML file is inside.  The XML file was originally tested and configured under Scientific Linux 7.2

Comment 5 Richard W.M. Jones 2016-07-16 21:50:08 UTC
In the same way that the <source file=...> paths depend on the
host, so does the <emulator> element.  I suggest removing this
as I think libvirt will find the right emulator, and if not you'll
need to modify the instructions to tell the end user to set the
right path.

This is not a bug, please do not reopen it.

Comment 6 Todd 2016-07-17 05:29:02 UTC
(In reply to Richard W.M. Jones from comment #5)
> In the same way that the <source file=...> paths depend on the
> host, so does the <emulator> element.  I suggest removing this
> as I think libvirt will find the right emulator, and if not you'll
> need to modify the instructions to tell the end user to set the
> right path.
> 
> This is not a bug, please do not reopen it.

My goodness gracious.  There it is.
<emulator>/usr/libexec/qemu-kvm</emulator>

I had presumed that the XML file was "suppose" to describe the VM's hardware.  Apparently it also describe the path to qemu-kvm.

I commented it out on one of my other VM's and it makes no difference.

So I added this to my directions:
<!--
EL7:
    <emulator>/usr/libexec/qemu-kvm</emulator>
FC24:
    <emulator>/bin/qemu-kvm</emulator>
Or just leave blank
-->


Question:  is 
     <emulator>/usr/libexec/qemu-kvm</emulator>
on purpose of serve a purpose?  It does not make sense to me that a system would have two separate qemu-kvm's.

Or should this be written up as an enhancement?  Drop the line line
on "virsh define domain" or have "virsh define" correct the path?  

Thank you for assisting with this.
-T


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