[CentOS-devel] Fwd: Vagrant boxes (7.2.1511)

Laurentiu Pancescu

lpancescu at gmail.com
Tue Dec 13 23:54:02 UTC 2016


I'm a member of the Cloud Instance SIG, involved in the development of 
the Vagrant images (I'm a CentOS contributor, not part of the Core 
Team). [1]

On 13/12/16 18:16, Carlos Rodrigues wrote:
> Now that CentOS 7.3 has been released, vagrant boxes have become
> broken when the vagrant-vbguest plugin is used to build guest
> additions at creation time due to the "kernel-devel" package matching
> the running kernel not being available in the default repos anymore
> (since the base repo is not cumulative with older point releases).

I know.  I planned to have new Vagrant images, based on CentOS Linux 
7.1611, available simultaneously with the main release.  In the past 
weeks, I had already tested updating the v1610 centos/7 image with the 
packages from the CR repository, without seeing any problems.  I started 
test builds on Monday morning, as soon as the repos were switched, but 
they failed: our image builders, running CentOS 6.8, were unable to 
parse the XFS filesystem generated by a fresh 7.1611 installation (this 
worked without issues upto 7.1511, the previous version).  We hope to 
solve this in the following days - many thanks to Fabian and Thomas for 
their help.

Part of the problem is caused by the fact that vbguest tries to install 
the VirtualBox Guest Additions *before* performing a system update.  As 
you pointed out, this doesn't work over point releases such as this one 
due to kernel-devel and kernel-headers being unavailable; it also has 
the disadvantage of wasting time by having the box compile the Guest 
Additions twice - once during the initial "vagrant up", and then during 
the kernel upgrade.  My own starter kit avoids this problem by updating 
the system first and then installing the VirtualBox Guest Additions, 
leaving you with a ready-to-use 7.1611 system after "vagrant up", even 
when starting with a 7.1511-based v1610 box. [2]  It requires Ansible on 
the host, and you might have to try "IDE" or "IDE controller" in the 
Vagrantfile when attaching the ISO, if VirtualBox complains about not 
finding it.

> Using vagrant is especially useful when you want reproducible
> environments, and this includes pinning the base box to a particular
> version. As it stands, new CentOS point releases permanently break
> this usecase and I believe it would be important to have a solution
> for this.

As far as I understand, we can only support the current version of 
CentOS Linux (right now, 7.1611) - not any previous releases.  The only 
solution I can think of would be to provide the packages required to 
build the VirtualBox Guest Additions as part of the image, so that it 
becomes self-sufficient.

However, this would increase the size of the box by around 180MB just 
for console support (to support X11, we'd need even more space for the 
X11 development packages, Mesa and some others).  Considering that 
networking works fine without the Guest Additions, and the availability 
of SMB, NFS and sshfs for shared folders, not to mention that VirtualBox 
shared folders are slow, prone to data corruption in combination with 
sendfile and occasionally 'forgetting' to update some files between the 
host and the guest, I feel inclined to keep the package selection as it 
is now.

Best regards,

[1] https://wiki.centos.org/SpecialInterestGroup/CloudInstance
[2] https://github.com/lpancescu/cloud-instance-starter-kit

More information about the CentOS-devel mailing list