On 01/18/2010 04:59 PM, Matthias Bolte wrote:
2010/1/18 Steve Brown<sbrown25(a)gmail.com>:
>>> $ sudo virsh capabilities
>>> <capabilities>
>>> <host>
>>> <cpu>
>>> <arch>x86_64</arch>
>>> </cpu>
>>> <migration_features>
>>> <live/>
>>> <uri_transports>
>>> <uri_transport>tcp</uri_transport>
>>> </uri_transports>
>>> </migration_features>
>>> </host>
>>> <guest>
>>> <os_type>hvm</os_type>
>>> <arch name='i686'>
>>> <wordsize>32</wordsize>
>>> <emulator>/usr/bin/qemu</emulator>
>>> <machine>pc-0.11</machine>
>>> <machine canonical='pc-0.11'>pc</machine>
>>> <machine>pc-0.10</machine>
>>> <machine>isapc</machine>
>>> <domain type='qemu'>
>>> </domain>
>>> </arch>
>>> <features>
>>> <pae/>
>>> <nonpae/>
>>> <acpi default='on' toggle='yes'/>
>>> <apic default='on' toggle='no'/>
>>> </features>
>>> </guest>
>>> </capabilities>
>>>
>> Ok, this confirms your host OS is x86_64, but it only shows a single
>> guest entry for i386. This is because the 'qemu' binar is the 32-bit
>> emulator. To make x86_64 guests work, you need to install the
>> qemu-system-x86_64 binary, or a KVM binary called 'kvm' or
'qemu-kvm'.
>>
>> Once those are installed, you should see another<guest> appear in
>> that capabilities XML
>>
> Unfortunately, I already have the 64bit emulator installed:
>
> $ which qemu-system-x86_64
> /usr/local/bin/qemu-system-x86_64
> $ ls -l /usr/local/bin/qemu-*
> -rwxr-xr-x 1 root root 217184 Jan 14 14:00 /usr/local/bin/qemu-img
> -rwxr-xr-x 1 root root 229120 Jan 14 14:00 /usr/local/bin/qemu-io
> -rwxr-xr-x 1 root root 210968 Jan 14 14:00 /usr/local/bin/qemu-nbd
> -rwxr-xr-x 1 root root 2323328 Jan 14 14:01 /usr/local/bin/qemu-system-x86_64
>
> This was done by building the qemu-kvm-0.12.1.1 package from source.
> I am able to run this vm just fine using the qemu-system-x86_64
> binary. I've tried rebuilding libvirt several times to make it aware
> that the proper binaries are installed, but it can't seem to find them
> for some reason.
>
>
libvirt expects the QEMU binaries in /usr/bin. e.g. it explicitly
checks for /usr/bin/qemu-system-x86_64. Try symlinking
/usr/local/bin/qemu-system-x86_64 to /usr/bin/qemu-system-x86_64.
That's not enough. I have a locally-built qemu-system-x86_64 installed
in /usr/bin, and the only way I could get it to work properly was copy
/usr/bin/qemu-system-x86_64 to /usr/bin/qemu-kvm (a symlink would likely
do the job just as well). There is a bit of code just doesn't happen
unless /usr/bin/qemu-kvm or /usr/bin/kvm exist and are executable,
although I have to say that once I solved my own problem by making a
copy of the file with the proper name, I stopped trying to understood
exactly what was happening in that code :-)