Dockerfile for running libguestfs, virt-tools and virt-v2v

FROM fedora
RUN dnf install -y libguestfs libguestfs-tools-c virt-v2v \
                   libvirt-daemon libvirt-daemon-config-network

# https://bugzilla.redhat.com/show_bug.cgi?id=1045069
RUN useradd -ms /bin/bash v2v
USER v2v
WORKDIR /home/v2v

# This is required for virt-v2v because neither systemd nor
# root libvirtd runs, and therefore there is no virbr0, and
# therefore virt-v2v cannot set up the network through libvirt.
ENV LIBGUESTFS_BACKEND direct

2 Comments

Filed under Uncategorized

2 responses to “Dockerfile for running libguestfs, virt-tools and virt-v2v

  1. Hi Richard,

    thanks a lot for that example of your great tool. Could you maybe extend it by adding an example of how I use the container build from that Docker image?

    It’s probably outside of the scope of your post, but I wanted to make you aware of this bug report https://bugs.launchpad.net/ubuntu/+source/libguestfs/+bug/1766534 Maybe other users, who have a tendency for Ubuntu and the s390x platform, might find this useful.

    Regards, Markus

  2. rich

    virt-v2v isn’t a server, it’s a command line process, so to use the container you’d have to have some kind of script or service which starts it up and runs it with the right parameters.

    I’ve seen that bug, but I don’t know why it’s happening. Fedora and RHEL both have libguestfs on s/390 and it’s working fine.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.