[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [vagrant] official Debian lxc boxes



On 02/08/2016 01:34 PM, Antonio Terceiro wrote:
> On Sat, Feb 06, 2016 at 01:13:46PM -0200, Tiago Ilieve wrote:
>> Emmanuel,
>>
>> On 5 February 2016 at 16:10, Emmanuel K <emmanuel@libera.cc> wrote:
> [...]
>>> a big point here is that packer with the virtualbox provider requires
>>> the build to be run on physical hardware, as virtualbox do not run
>>> nested. Without this point, the build would already been moved to
>>> debian-ci. A good point though is that the build process do not require
>>> being root.
>>
>> I do remember you mentioning the requirement for physical hardware.
>> Have you tried to build VirtualBox/Vagrant images using bootstrap-vz?
>> It can be used inside a virtual machine with no problem (at least with
>> full hardware virtualization).
> 
> TBH I think the requirement for physical hardware is not reasonable. I
> have built Vagrant Virtualbox images before¹ using vmdebootstrap doesn't
> even need to boot the image to build it, and bootstrap-vz also seems to
> be able to build images "anywhere". Also packer is not in Debian so I
> see no reason to build our images that we want to call "official" with

TLDR: Ok for bootstrap-vz (or maybe vmdebootstrap)

There is WIP to package packer in Debian, Daniel Stender and Alexandre
Viau have packaged around halt of the depency last month.

I had a look at bootstrap-vz a couple months and created some templates
in debian-vm-templates. Although I pay respect to the work from Anders
and others (specially the Grub2 integration) I noticed some problems.

* the image generated with boostrap-vz takes 10 seconds longer to boot
 ( https://github.com/andsens/bootstrap-vz/issues/247 )
* it is not possible to embed a Vagrant file into the box, needed to
override the Virtualbox shared folders with rsync
* I think the issue is now fixed, but I heard from Marcin in last
debconf that it was problematic to build dkms modules inside the chroot,
since the kernel version as seen in the chroot was the kernel version
from the host.

IMHO the VM/debian installer approach is technically better
than the chroot / deboostrap approach for creating VM disk images.
You use the field tested debian installer and avoid a whole class of
bugs like this: https://github.com/andsens/bootstrap-vz/issues/245

If I had to build a Qcow2 image I would rather use for instance
virt-install like
https://gist.github.com/EmmanuelKasper/5919508

Now VirtualBox is in contrib, so it is not possible to have a DFSG free
toolchain based on Packer, and the real hardware requirement is too much
in 2016, so I agree it's time to move on to something different, but I
wanted to explaing why I used packer.

Emmanuel









Reply to: