Re: [libvirt-users] Development of application on using the libvirt API(s)

Eric Blake
Thu, 19 Mar 2015 18:33:19 -0000

On 03/19/2015 11:44 AM, Parvathi wrote:
> Hi,
>
> I am developing an application that would essentially control/run VMs on a
> X86_64 host machine. The existing OS is 32 bit based so the application
> needs to be 32bit too. KVM/QEMU are 64 bit so that guests could be either
> be 32 or 64 bit. Does using libvirt as 32bit library on a 64bit host
> (capable of hosting 32 and 64 bit guests) pose any problems? Will it even
> work?

Yes, a 32-bit libvirt.so client on one host can correctly control a
64-bit libvirtd on another host.  There are some APIs that (for
historical reasons) pass a 'long'; these APIs properly flag overflow if
a value cannot be converted from 64-bit on the host down to the limited
32-bit on the client.  But as long as the API doesn't trigger that large
of a value, you are fine.  And for everything specified as 'int' or
'long long', it all works just fine.

--
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org