virt-builder running on ARM

Virt-builder runs fine on an ARM host (the ODROID-XU, no hardware virtualization available which is one of the reasons why it’s a bit slow):

$ virt-builder fedora-19
[   0.0] Downloading: http://libguestfs.org/download/builder/fedora-19.xz
[  21.0] Creating disk image: fedora-19.img
[  22.0] Uncompressing: http://libguestfs.org/download/builder/fedora-19.xz
[  74.0] Opening the new disk
[ 165.0] Setting a random seed
[ 165.0] Random root password: bugfPn1KBwE7reZ0 [did you mean to use --root-password?]
[ 165.0] Finishing off
Output: fedora-19.img
Total usable space: 1.9G
Free space: 1.2G (65%)
$ uname -a
Linux odd.home.annexia.org 3.4.5 #1 SMP PREEMPT
Fri Sep 27 02:59:27 BRT 2013 armv7l armv7l armv7l
GNU/Linux

Although the host is ARM, it’s building an x86-64 guest and this means that you cannot install packages at build time (you can install them at firstboot time instead). The reason is basically because the libguestfs appliance is ARM, so it cannot run yum/apt from the x86-64 guest.

Five years ago when we started off writing libguestfs we had this idea that the appliance code shouldn’t be tied to the same architecture as the host. QEMU can quite happily run an x86-64 emulator on an ARM host, and the XDR protocol that is used between the daemon and the host is fully arch-independent, so you can run a different arch appliance from the host (slowly). For year(s) the libguestfs daemon directory had its own ./configure script so you could reconfigure it with a different architecture, although no one ever did and we dropped that.

5 Comments

Filed under Uncategorized

5 responses to “virt-builder running on ARM

  1. Gavin

    Is it possible to run libvirt API on arm hardware platform? (armv7)
    Or is there any work done to work around this?
    Thanks
    Gavin

  2. Pingback: libguestfs 1.26 released | Richard WM Jones

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s