-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VirtualBox Guest Additions in Vagrant image #27
Comments
hi @Vsipuli if you were able to help package up these additions, we can get them included in. |
That is true, guest additions are needed a lot. Unfortunately I don't know how to package them up, coz I'm not very familiar with CentOS, but I need it for my current project... That is an unpleasant surprise that they are not present by default. |
And due to the lack of Guest Additions, that vagrant box uses rsync to share a folder with host system. And that is bad, because it is one-ways synchronization. |
you should be able to turn off the rsync feature in your Vagrantfile locally. w.r.t the guest additions, the blocker is basically having them packaged up somewhere. |
That is not a problem to disable rsync, the problem is to enable default sync folder type which is 'VirtualBox', because it is not available when Virtualbox Guest Additions are not installed. If it'll be helpful to anyone, for now I decided to use this image https://atlas.hashicorp.com/avinashkolluru/boxes/centos7-1508.01-bzip2 with Of cause the official CentOS box would be much better. |
@kbsingh Good to hear that you are ready to accept contributions. If I find some time I might look into this. |
related the following: * CentOS#27 * dotless-de/vagrant-vbguest#167
pull request #28 will allow the vagrant-vbguest plugin to work until dotless releases a new version I can make a pull request that includes the VirtualBox Guest Additions as part of the base image but is there any way for me to run that koji command myself or is that 'cbs' some internal centos build server? I've got a Fedora account if that matters. |
@mmckinst cheers, merged in the req for bzip2; Unfortunately, the images for 2015-Sept update were built last week, so this change wont be included in the images released today - however it will make it into the next build for CentOS-7, 2015-Oct, due on the 28th/Oct. Ideally, we should get the additions packaged up ( from the gpl souces ) into rpms and have them built at cbs ( http://cbs.centos.org ), and then reference them in the kickstarts. We dont interface with the Fedora Koji, but run our own accounting setup. |
It took me some time to understand how do that. config.vm.synced_folder '.', '/vagrant', disabled: true But the thing is that this image does not use the standard path (which I saw in many other images). config.vm.synced_folder ".", "/home/vagrant/sync", disabled: true Hopefully it will save time for others who wants to do that. |
thanks for the note, I've added it to the README.md file |
Added a note on setting up VirtualBox shared folders with a standard /vagrant path based on this discussion to README.md in pull request #33. |
Am I right when I expect that vagrant box "centos/7" created by this build script should be available at https://atlas.hashicorp.com/centos/boxes/7 ? As fallback I started to use https://atlas.hashicorp.com/avinashkolluru/boxes/centos7-1508.01-bzip2 , but the official one would be better. Thanks for the info. |
We are using |
@tomor You might have an old version of the box downloaded. If the output of |
The problem was in the old version/or not installed vbguest plugin. |
Unfortunately I get into another troubles which are described here: dotless-de/vagrant-vbguest#170 . It looks like it's a problem of vagrant-vbguest plugin, not centos box, but as it's connected with guest additions I'm posting it here as it might be helpful for others. |
I had problems with the centos/7 Vagrant box and guest additions. In order to get guest additions to install correctly I had to do the following:
At this point the guest additions install correctly and virtualbox file syncing works. I had previously installed the vbguest plugin which may have also factored in here. |
I have the same error as @jronallo.
and
which seems to be latest. Worth mentioning that couple of months ago everything worked well. So, I believe a release of newer version of box is required. |
Basically I just can't load CentOS VM via vagrant after doing |
For anyone having the same issues, the only working box is https://vagrantcloud.com/boxcutter/boxes/centos72 it works with vagrant 1.8.1, virtualbox 5.0.12 and vagrant-vbguest 0.11.0 plugin I spend about a couple of days to figure that out, sad that official images are not supported that well. |
@kbsingh Would you be open to just running the virtualbox guest additition install script in the kickstart? |
it seems an issue with the exact kernel version of the CentOs/7 official box . If I 'manually' upgrade (yum upgrade) and reboot, then the kernel version matches with what is installed by "yum install -y kernel-devel": 3.10.0.327. After this, I can succesfully run the VBox additions. But before "yum upgrade": |
@tallandtree what happens if you run : yum install kernel-devel- |
I hope to have a new vagrant box's set online on the 2nd or 3rd of Feb ( early next week ), that should have all updates rolled in already. |
@mmckinst the build time instances dont have internet access, so they wont be able to grab external bits. Also, I have been trying to work the route to get closure on licensing and packaging for the extensions, and so far have not been able to get resolution there. That would be the best way to resolve this issue, if we are able to just bundle them in, packaged properly and tracking the kernel-abi in a way that every kernel or system update does not completely destroy the box. |
config.vm.box = "centos/7"
==> default: No package kernel-devel-3.10.0-229.14.1.el7.x86_64 available. And the guest additions fails accordingly. |
@kbsingh the new one will have kernel-devel installed by default? |
@mmckinst I wasent planning on putting in kernel-devel, its going to have a significant impact on size of download. I want to still try and see if we can just ship a pre-setup vbox components. |
How about adding kernel-devel, adding the vbox components and then removing kernel-devel? It's not pretty, but it may get the extensions there without too much impact on the size of the download... |
Hi everyone, so is there any solution to this issue? Is there any possibility to make usual dir sync work for centos/7 image? E.g. some bootstrap script or whatever. |
By my measure a fully patched up centos7 vagrant box takes about 42MB of disk to have working VB Guest Additions when you get it all done. Getting there is painful starting with a 1602.02 image, which has lots of released updates now a month+ later. The 1602.02 image as of today is updated just enough to really mess up the guest additions process. You can't --disablerepo=updates --enablerepo=base because you're not starting with a unpatched image. Installing gcc updates kernel-headers beyond the rev level of the running kernel which to me is a rpm dependency bug. Only way out of it is to do the yum update of everything to absolutely current and take the reboot to re-baseline its brain before you try to build+install guest additions. I followed the usual procedure for installing guest additions. After the 'yum update' reboot, I did a 'yum install -y gcc kernel-devel' which installed 35 rpms, and at that point the guest box additions (without X11) built ok from the command line. I then had to install yum-utils (which brought in two more rpms) to run "package-cleanup --oldkernels --keep=1" to clean up the old kernel, then I deleted all 38 rpms the guest additions building requires. I then did a 'yum erase' to clean up metadata. Whew. Bottom line, you're talking 500MB in size increase to be able to rebuild the guest additions. The additions themselves are only 42MB in size if you update=>add=>build=>cleanup the box leaving just the guest additions there (on top of where you started). |
If at all possible, a spec file that builds the guest additions from the GPL source tarball would be the way to go. That would allow us to preinstall it into the machine, and also manage its own updates etc using rpms. If someone's got a few minutes, would appreciate a stab at that. |
Is there really a general solution ? I thought the version of guest additions had to match the version of VirtualBox you are running (I'm not positive there, but every other virtualization product has that linkage) |
@kbsingh, regarding having a SPEC file for VirtualBox (guest additions), I would like to bring RPM Fusion's packaging effort to attention. Their SPEC file is battle tested for the duration of several Fedora releases (git history), so I think it should be quite solid. Unfortunately, RPM Fusion won't build RPMs for CentOS/RHEL 7 until they sort of their infrastructure issues. Could CentOS use their SPEC/SRPM and rebuild it? One issue to consider is that The second issue is what @vinceskahan mentioned, how well will a particular version of VirtualBox Guest Additions shipped with CentOS' Vagrant image work with different VirtualBox versions installed on the host? |
I'm increasingly convinced there's not a general solution here. Oracle's site here has all kinds of version-matters type wording on it and the actual downloads page here has links that aren't stable nor predictable to me. Doubt we're going to get there as-is. FWIW, I have my buildup to a x11-enabled centos7 VM down to just a few steps, so I'm calling it good enough for me:
I can make the Vagrantfile and provisioner scripts available if anybody cares.... |
I am using |
Anyone use the |
@jonvel the bento boxes are my go to box for all OSs, they very high quality and have the bare minimum that I want to start from. |
@tomor - I'm working on something completely different, but your tip "vagrant plugin install vagrant-vbguest" was exactly what I needed. Thanks! Michael |
can any one help me? For more information about the https://www.vagrantup.com/docs/share/ |
please help me to solve this problem |
Still an issue. |
@xmj i am not sure how useful this issue is at this point - there are quite a few different pieces raised. if the baseline is that we should include the vbox additions, someone needs to step up and package it, work through the license and get the rpms in cbs.centos.org. |
Excellent, does the following sound about right?
|
I hope licensing won't be a problem as the Opensource edition falls under GPLv2, and we'll not be using the parts that fall under the PUEL. |
I would request you to open new issue with literally just this scope @xmj : 'get vbox additions pre-installed' and setup exactly this list as a set of pre-conditions. w.r.t licensing. gplv2 is perfect, as long as all the content we consume falls under it. |
It seems that the CentOS Cloud image for Vagrant (using the VirtualBox provider) does not include the VirtualBox Guest Additions:
As mentioned in the log output above, the VirtualBox Guest Additions are useful for many purposes in day-to-day work with virtual machines. Would you please consider including them by default in the CentOS Cloud image for Vagrant (for the VirtualBox provider)?
The text was updated successfully, but these errors were encountered: