[virt-tools-list] [PATCH 0/7] [RFC] Install LXC guests with virt-install

Fabiano Fidêncio fabiano at fidencio.org
Wed May 16 21:16:00 UTC 2018


Lubomir,

On Tue, May 15, 2018 at 1:07 PM, Lubomir Rintel <lkundrak at v3.sk> wrote:
> On Fri, 2018-03-23 at 10:42 +0100, Cedric Bosdonnat wrote:
>> Hello Lubomir,
>>
>> This whole feature looks very similar to what Radostin and I worked
>> on last year:
>>
>> https://github.com/virt-manager/virt-bootstrap
>>
>> You should really have a look at that tool: it allows you to create a
>> libvirt-lxc
>> container out of a docker image, a tarball, or a virt-builder
>> template. The good
>> thing is that virt-manager also uses it for setting up a local OS
>> container.
>
> Sorry for the late reply, I somehow missed your message.
>
> Thanks for pointing me to this. Sadly the tool doesn't seem to be
> available for my distro (yet?).

I've opened https://bugzilla.redhat.com/show_bug.cgi?id=1579045
If you're a Fedora maintainer, please, feel free to take over the
review and give us some help in order to have the tool on Fedora.

>
> I definitely intend to check it out.
>
> Lubo
>
>>
>> --
>> Cedric
>>
>> On Fri, 2018-03-23 at 10:16 +0100, Lubomir Rintel wrote:
>> > Hello,
>> >
>> > I do often use the libvirt_lxc containers with userns, and for
>> > years
>> > I've used hacky-ish shell scripts to create them, unable to figure
>> > out a
>> > sensible way to set them up. Perhaps virt-install is the right tool
>> > to
>> > do the job?
>> >
>> > Chained up to this message is a patchset that adds the
>> > functionality to
>> > virt-install.  It is known to have some rough edges (the root
>> > password is
>> > unset, does the wrong thing if there are multiple <filesystem>s in
>> > the VM,
>> > remote installs are untested), but essentially is able to
>> > initialize Debian
>> > and Fedora containers:
>> >
>> >   virt-install \
>> >     --connect lxc:/// \
>> >     --name fedora \
>> >     --memory 512 \
>> >     --idmap
>> > uid_start=0,uid_target=1000000,uid_count=65536,gid_start=0,gid_targ
>> > et=1000000,gid_count=65536 \
>> >     --filesystem /var/lib/libvirt/filesystems/fedora,/ \
>> >     --location http://download.fedoraproject.org/pub/fedora/linux/r
>> > eleases/27/Server/x86_64/os
>> >
>> >   virt-install \
>> >     --connect lxc:/// \
>> >     --name debian \
>> >     --memory 512 \
>> >     --idmap
>> > uid_start=0,uid_target=1000000,uid_count=65536,gid_start=0,gid_targ
>> > et=1000000,gid_count=65536 \
>> >     --filesystem /var/lib/libvirt/filesystems/debian,/ \
>> >     --location http://ftp.us.debian.org/debian/dists/testing/
>> >
>> > Does this approach look sensible? Does it make sense to address the
>> > known issues in this and merge the functionality to virt-manager or
>> > should this perhaps belong to a separate tool?
>> >
>> > The diffstat looks optimistic.
>> >
>> >  virt-install             |   9 ++-
>> >  virtinst/__init__.py     |   1 +
>> >  virtinst/lxcinstaller.py | 175
>> > +++++++++++++++++++++++++++++++++++++++++++++++
>> >  virtinst/urlfetcher.py   |  42 +++++++++++-
>> >  4 files changed, 223 insertions(+), 4 deletions(-)
>> >
>> > Thanks,
>> > Lubo
>> >
>> >
>> > _______________________________________________
>> > virt-tools-list mailing list
>> > virt-tools-list at redhat.com
>> > https://www.redhat.com/mailman/listinfo/virt-tools-list
>> >
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list


Best Regards,
-- 
Fabiano Fidêncio




More information about the virt-tools-list mailing list