[CentOS-devel] Disk size on Vagrant image

Sat Aug 19 13:52:09 UTC 2017
Laurentiu Pancescu <lpancescu at centosproject.org>

On 19/08/17 14:22, Richie Rees wrote:
> Any change of getting the guest additions installed with the vbox? Have looked at your ft branch and can't see the additions being installed and is a requirement for inclusion on the vagrant forge. I understand that the additions have to be compiled against the kernel, as we require this on my current project is we set up a pipe line to compile the additions against all kernels and drop them in an S3 bucket, you could do a curl at the end of the kick script to obtain the correct additions to match the kernel?

TL;DR Generate your own CentOS images if you really need the Guest 
Additions.

The Vagrant images generated by the Packer configuration in my 
vbox-packer branch _do_ include the VirtualBox Guest Additions as part 
of the image - both centos/6 and centos/7. [1]  Clone my repo locally, 
switch to the vbox-packer branch and run "packer build -only centos-7 
packer.json" to generate the images.  You might want to replace the 
German CentOS mirror in packer.json with one closer to you.  Another 
option would be [2], which is a little faster, but it needs Ansible on 
the host (Windows users might be out of luck).

As for including the VirtualBox Guest Additions in the official 
images... it's complicated.  The build process can only access official 
CentOS repos, third-party packages are off-limits for security and 
reproducibility reasons - the builders don't even have Internet access. 
Not even EPEL packages are an option.  VirtualBox isn't packaged by us 
yet, and my first attempts were blocked by the upstream source not even 
compiling on CentOS 6.9 (the kernel is too old) and CentOS 7 versions 
prior to 7.3 (due to a bug in gcc 2.8.5, which is the system compiler 
for 7.x).  CentOS Linux 7.3.1611 is now able to compile the VirtualBox 
sources, I just haven't found the time to create a regular rpm and a 
kmod.  This would be the right way to do it, and might even allow us to 
benefit from the stable ABI offered by CentOS kernels to avoid 
recompiling the Guest Additions during each kernel upgrade.  It's a 
significant amount of work and at the very bottom of my priorities list, 
but I would certainly look at any .spec files if someone else decides to 
invest the effort.

I never heard of Vagrant Forge, and a Google search didn't return 
anything - did you mean Vagrant Cloud (formerly part of Hashicorp's 
Atlas)?  In any case, that "requirement" certainly isn't enforced by 
Hashicorp: the official Fedora, Debian and Ubuntu images don't include 
the VirtualBox Guest Additions either, there are weird file corruption 
issues with the Guest Additions in some situations (we also received a 
report about kernel panics under high load) and the images work just 
fine without them (the README in [2] has more details).  I'm also not 
sure if the CentOS Project would be fine with shipping tainted kernels 
[3] as the default in a set of official images.

Best regards,
Laurențiu


[1] 
https://github.com/lpancescu/sig-cloud-instance-build/blob/vbox-packer/vagrant/packer.json#L55-L57
[2] https://github.com/lpancescu/cloud-instance-starter-kit
[3] https://lkml.org/lkml/2011/10/6/317