[libvirt] [PATCH] kvm 32bit guest on 64bit host
Gerd v. Egidy
lists at egidy.de
Tue Jun 3 09:49:59 UTC 2008
Hi Daniel,
> > I want to manage a 32 bit i686 guest on an x86_64 host with kvm and
> > libvirt. KVM is perfectly capable of doing this (look e.g. at
> > http://kvm.qumranet.com/kvmwiki/Guest_Support_Status) but libvirt did not
> > allow it.
> >
> > So I created the attached patch to allow it and make it easy to extend
> > the capabilities of kvm and kqemu later on.
>
> This is incorrect. KVM is *not* exposing a i686 architecture CPU. It is
> exposing an x86_64 virtualized CPU which is capable of running x86_64 or
> i686 guests. No change is required.
Thanks for looking at my patch. I understand that KVM does not offer a i686
host cpu but allows x86_64 and i686 guests.
The reason for my patch was that I could not create i686 guests on a x86_64
host with KVM, the only option offered was using qemu.
I'm new to libvirt so I'm not that familiar with the capabilities-xml - so
take my findings with some salt ;)
Without my patch the capabilities look like this:
<capabilities>
<host>
<cpu>
<arch>x86_64</arch>
</cpu>
</host>
<guest>
<os_type>hvm</os_type>
<arch name='i686'>
<wordsize>32</wordsize>
<emulator>/usr/bin/qemu</emulator>
<machine>pc</machine>
<machine>isapc</machine>
<domain type='qemu'>
</domain>
</arch>
<features>
<pae/>
<nonpae/>
<acpi default='on' toggle='yes'/>
<apic default='on' toggle='no'/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='x86_64'>
<wordsize>64</wordsize>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<machine>pc</machine>
<machine>isapc</machine>
<domain type='qemu'>
</domain>
<domain type='kvm'>
<emulator>/usr/bin/qemu-kvm</emulator>
</domain>
</arch>
<features>
<acpi default='on' toggle='yes'/>
<apic default='on' toggle='no'/>
</features>
</guest>
... (mips, sparc, etc. omitted)
The i686-guest section does not have a kvm-domain. So libvirt does not allow
the use of kvm for i686 guests.
With my patch the capabilities are:
<capabilities>
<host>
<cpu>
<arch>x86_64</arch>
</cpu>
</host>
<guest>
<os_type>hvm</os_type>
<arch name='i686'>
<wordsize>32</wordsize>
<emulator>/usr/bin/qemu</emulator>
<machine>pc</machine>
<machine>isapc</machine>
<domain type='qemu'>
</domain>
<domain type='kvm'>
<emulator>/usr/bin/qemu-kvm</emulator>
</domain>
</arch>
<features>
<pae/>
<nonpae/>
<acpi default='on' toggle='yes'/>
<apic default='on' toggle='no'/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='x86_64'>
<wordsize>64</wordsize>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<machine>pc</machine>
<machine>isapc</machine>
<domain type='qemu'>
</domain>
<domain type='kvm'>
<emulator>/usr/bin/qemu-kvm</emulator>
</domain>
</arch>
<features>
<acpi default='on' toggle='yes'/>
<apic default='on' toggle='no'/>
</features>
</guest>
... (mips, sparc, etc. omitted)
As you can see the i686 guest section gained a kvm-domain with my patch which
allows me to install i686 KVM-guests on x86_64 hosts.
Kind regards,
Gerd
More information about the libvir-list
mailing list