Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloubed hangs with error /usr/bin/kvm: No such file or directory #1

Closed
rezib opened this issue Aug 6, 2013 · 2 comments
Closed

Cloubed hangs with error /usr/bin/kvm: No such file or directory #1

rezib opened this issue Aug 6, 2013 · 2 comments
Assignees
Labels
Milestone

Comments

@rezib
Copy link
Owner

rezib commented Aug 6, 2013

When running a script with cloubed library, this error raised when calling boot_vm():

generating template file
booting vm mngt0
libvir: QEMU error : Cannot find QEMU binary /usr/bin/kvm: No such file
or directory
ERROR:root:libvirt error: Cannot find QEMU binary /usr/bin/kvm: No such
file or directory
Cannot find QEMU binary /usr/bin/kvm: No such file or directory

Done. 

The distribution is RHEL 6.3 with the following packages:

libvirt-0.9.10-21.bl6.x86_64
libvirt-client-0.9.10-21.bl6.x86_64
libvirt-python-0.9.10-21.bl6.x86_64
qemu-kvm-0.12.1.2-2.295.bl6_3.2.x86_64

Here is the [truncated] output of virsh capabilities:

<capabilities>
  [...]

  <guest>
    <os_type>hvm</os_type>
    <arch name='x86_64'>
      <wordsize>64</wordsize>
      <emulator>/usr/libexec/qemu-kvm</emulator>
      <machine>rhel6.3.0</machine>
      <machine canonical='rhel6.3.0'>pc</machine>
      <machine>rhel6.2.0</machine>
      <machine>rhel6.1.0</machine>
      <machine>rhel6.0.0</machine>
      <machine>rhel5.5.0</machine>
      <machine>rhel5.4.4</machine>
      <machine>rhel5.4.0</machine>
      <domain type='qemu'>
      </domain>
      <domain type='kvm'>
        <emulator>/usr/libexec/qemu-kvm</emulator>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <deviceboot/>
      <acpi default='on' toggle='yes'/>
      <apic default='on' toggle='no'/>
    </features>
  </guest>

</capabilities> 

It looks like cloubed looks for KVM executable under path /usr/bin/kvm whereas
libvirt finds it under path /usr/libexec/qemu-kvm.

@ghost ghost assigned rezib Aug 6, 2013
@rezib
Copy link
Owner Author

rezib commented Aug 6, 2013

Currently, the path of KVM executable is hard-coded in cloubed, and it is given to Libvirt through the emulator element of the XML Domain.

The emulator element is documented in the devices section of Libvirt XML Domain documentation. The documentation especially explains that the default emulator (when there is not any specified emulator element) is given by Libvirt capabilities. And this is exactly what we want here.

The solution may be simply to remove the emulator element out of the XML Domain representation generated by cloubed.

To be tested and validated.

@rezib
Copy link
Owner Author

rezib commented Aug 8, 2013

Tests show that everything works fine without emulator element.

@rezib rezib closed this as completed in 9eb740d Aug 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant