Bug 1069966 - RFE: let virt-builder etc build ARM guests on x86 host
Summary: RFE: let virt-builder etc build ARM guests on x86 host
Keywords:
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-26 01:21 UTC by Daniel Lipsitt
Modified: 2021-04-19 10:34 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Daniel Lipsitt 2014-02-26 01:21:04 UTC
Description of problem:

I can't figure out how to run guestfish, virt-builder, etc., on an arm image without libguestfs asking qemu to use KVM acceleration.

Version-Release number of selected component (if applicable):

libguestfs 1.25.37

Steps to Reproduce:

LIBGUESTFS_HV=/usr/bin/qemu-system-arm guestfish --ro -a my.img -v config -machine accel=''

Actual results:

Verbose output shows this qemu command:

/usr/bin/qemu-system-arm \
[...]
    -machine accel=kvm:tcg \
[...]

Expected results:

No KVM acceleration.

Comment 1 Richard W.M. Jones 2014-05-06 16:30:48 UTC
(In reply to Daniel Lipsitt from comment #0)
> Description of problem:
> 
> I can't figure out how to run guestfish, virt-builder, etc., on an arm image
> without libguestfs asking qemu to use KVM acceleration.
> 
> Version-Release number of selected component (if applicable):
> 
> libguestfs 1.25.37
> 
> Steps to Reproduce:
> 
> LIBGUESTFS_HV=/usr/bin/qemu-system-arm guestfish --ro -a my.img -v config
> -machine accel=''
> 
> Actual results:
> 
> Verbose output shows this qemu command:
> 
> /usr/bin/qemu-system-arm \
> [...]
>     -machine accel=kvm:tcg \
> [...]
> 
> Expected results:
> 
> No KVM acceleration.

I'm a little confused about what you're trying to achieve here.

If the disk image is from an ARM guest, and you just want to
change files in the disk image, then you don't need to
change the hypervisor.

If the host is ARM, then you need to build libguestfs for ARM,
and it should automatically use the right version of qemu.

If you're trying to run commands inside the guest (eg.
virt-builder --run-command / --install ...) and the host is
x86 but the guest is ARM, then it's plausible that setting
the HV may let you do this, although it's completely untested.

You might try instead using a firstboot script.  If you don't
want to use a firstboot script for some reason, then you can use
the following environment variable to disable KVM:
http://libguestfs.org/guestfs.3.html#force_tcg

Comment 2 Daniel Lipsitt 2014-05-06 23:59:27 UTC
The goal is to do a full build of an ARM image on an x86 host.

Comment 3 Richard W.M. Jones 2014-05-07 08:01:19 UTC
(In reply to Daniel Lipsitt from comment #2)
> The goal is to do a full build of an ARM image on an x86 host.

Certainly be interesting to see if it works.

In theory it should work: the library<->daemon protocol is
designed to be architecture, bit-size and endianness independent
(it uses XDR).

You'll need to arrange that supermin builds or uses an ARM-based
appliance.  Likely the easiest thing is to copy an appliance
from an ARM machine and use the fixed appliance method
(see: http://libguestfs.org/libguestfs-make-fixed-appliance.1.html )


Note You need to log in before you can comment on or make changes to this bug.