Updated CentOS Vagrant Images Available (v1611.01)

Friday , 16, December 2016 23 Comments

We are pleased to announce new official Vagrant images of CentOS Linux 6.8 and CentOS Linux 7.3.1611 for x86_64, featuring updated packages to 15 December 2016, as well as the following user-visible changes:

  • the size of the boot partition has been increased to 1GB in centos/7, to conform with the new upstream recommendations
  • the centos/7 image is now based on CentOS Linux 7.3.1611

Known Issues

  1. The VirtualBox Guest Additions are not preinstalled; if you need them for shared folders, please install the vagrant-vbguest plugin and add the following line to your Vagrantfile:
    config.vm.synced_folder ".", "/vagrant", type: "virtualbox"

    We recommend using NFS instead of VirtualBox shared folders if possible. You can also use the vagrant-sshfs plugin, which, unlike NFS, works on all operating systems.

  2. Since the Guest Additions are missing, our images are preconfigured to use rsync for synced folders. Windows users can either use SMB for synced folders, or disable the sync directory by adding the line
    config.vm.synced_folder ".", "/vagrant", disabled: true

    to their Vagrantfile.

  3. Vagrant 1.8.5 is unable to create new Linux boxes due to Vagrant bug #7610
  4. Vagrant 1.8.7 is unable to download or update boxes due to Vagrant bug #7969.
  5. Vagrant 1.9.1 seems unable to assign an address to VirtualBox host-only interfaces.
  6. Installing open-vm-tools is not enough for enabling shared folders with Vagrant’s VMware provider. Please follow the detailed instructions in https://github.com/mvermaes/centos-vmware-tools (updated for this release).

Recommended Setup on the Host

Our automatic testing is running on a CentOS Linux 7 host, using Vagrant from SCL, with libvirt and VirtualBox 5.0.30 (without the VirtualBox Guest Additions) as providers. We strongly recommend using the libvirt provider when stability is required.

We also performed additional manual testing with Vagrant 1.9.0 on OS X 10.11.6, with VirtualBox 5.0.30.

Downloads

The official images can be downloaded from Hashicorp’s Atlas. We provide images for libvirt-kvm, VirtualBox and VMware.

If you never used our images before:

$ vagrant box add centos/6 # for CentOS Linux 6
$ vagrant box add centos/7 # for CentOS Linux 7

Existing users can upgrade their images:

$ vagrant box update --box centos/6
$ vagrant box update --box centos/7

Verifying the integrity of the images

The SHA256 checksums of the images are signed with the CentOS 7 Official Signing Key. First, download and verify the checksum file:

$ curl http://cloud.centos.org/centos/7/vagrant/x86_64/images/sha256sum.txt.asc -o sha256sum.txt.asc
$ gpg --verify sha256sum.txt.asc

If the check passed, you can use the corresponding checksum when downloading the image with Vagrant:

$ vagrant box add --checksum-type sha256 --checksum 74a95be409cef813881f5312dc1221e2559cdbf25f45d5234d81e91632f99cce --provider libvirt --box-version 1610.01 centos/7

Unfortunately, this is not possible with vagrant box update.

Feedback

If you encounter any unexpected issues with the Vagrant images, feel free to ask on the centos-devel mailing list, or via IRC, in #centos on Freenode.

Ackowledgements

We would like to thank the following people (listed alphabetically):

  • Graham Mainwaring, for helping with tests and validations
  • Michael Vermaes, for testing our official images, as well as for writing the detailed guide to using them with VMware Fusion Pro and VMware Workstation Pro.
23 thoughts on “ : Updated CentOS Vagrant Images Available (v1611.01)”
  • Jan Alfred Richter says:

    Hey there, I have an issue with installing guest additions via vagrant-vbguest plugin. The kernel versions do not match with the machine. To make it work properly you need to vagrant up first, wait for shared folders to fail due to missing guest additions, then ssh to machine, install sudo yum install kernel* and then vagrant reload.

    Could you perhaps update the kernel versions in the machine so they match with the plugin?

    Thanks

    • Laurențiu Păncescu says:

      The images always contain the latest available packages at build time. We have absolutely no intention of including older packages with known security vulnerabilities - especially kernels.

      By the way, the vagrant-vbguest plugin works fine on our automated test systems (CentOS Linux 7 host with Vagrant 1.8.1 from SCL and VirtualBox 5.0.30 - just checked). I suspect there is an issue with your setup.

      • Justin Naldzin says:

        Vagrant fails to mount VirtualBox shared folders from a Windows host. The following messages seem to show the problem:
        1.) No package kernel-devel-3.10.0-327.36.3.el7.x86_64 available.
        2.) Failed to set up service vboxadd, please check the log file /var/log/VBoxGuestAdditions.log for details.
        3.) Vagrant was unable to mount VirtualBox shared folders. This is usually
        because the filesystem "vboxsf" is not available. This filesystem is
        made available via the VirtualBox Guest Additions and kernel module.
        Please verify that these guest additions are properly installed in the
        guest. This is not a bug in Vagrant and is usually caused by a faulty
        Vagrant box. For context, the command attempted was:

        mount -t vboxsf -o uid=1000,gid=1000 benchmarking /benchmarking

        The error output from the command was:

        /sbin/mount.vboxsf: mounting failed with the error: No such device

        • Laurențiu Păncescu says:

          The first error, not being able to install the kerneldevel package, is causing the other two errors. You should only have that problem if you are trying to use vagrant-vbguest with a centos/7 box older than v1611. When you use "vagrant box update", only boxes created after the update will be based on the new release. Existing boxes will continue to be based on 7.2.1511, which had the old kernel version that vagrant-vbguest is trying to use (that's an implementation problem of vagrant-vbguest, because it doesn't update the system via yum and reboot, before trying to install the VirtualBox Guest Additions). You'll have to recreate any existing boxes - or update them yourself before running "vagrant vbguest" from the command line. As a test, please create a new directory somewhere and issue the following commands:

          vagrant init centos/7
          vagrant box update
          vagrant up

          That should leave you with a working centos/7 box, with the VirtualBox Guest Additions installed and working (no need to call "vagrant vbguest" explicitly).

      • Justin Naldzin says:

        From a windows host:

        $ vagrant vbguest default --do install
        [default] No installation found.
        Loaded plugins: fastestmirror
        Loading mirror speeds from cached hostfile
        * base: centos.host-engine.com
        * extras: mirror.cloud-bricks.net
        * updates: mirror.cloud-bricks.net
        No package kernel-devel-3.10.0-327.36.3.el7.x86_64 available.
        Package gcc-4.8.5-11.el7.x86_64 already installed and latest version
        Package binutils-2.25.1-22.base.el7.x86_64 already installed and latest version
        Package 1:make-3.82-23.el7.x86_64 already installed and latest version
        Package 4:perl-5.16.3-291.el7.x86_64 already installed and latest version
        Package bzip2-1.0.6-13.el7.x86_64 already installed and latest version
        Nothing to do
        Copy iso file C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
        mount: /dev/loop0 is write-protected, mounting read-only
        Forcing installation of Virtualbox Guest Additions 5.1.10 - guest version is unknown
        Verifying archive integrity... All good.
        Uncompressing VirtualBox 5.1.10 Guest Additions for Linux...........
        VirtualBox Guest Additions installer
        Removing installed version 5.1.10 of VirtualBox Guest Additions...
        Copying additional installer modules ...
        Installing additional modules ...
        vboxadd.sh: Building Guest Additions kernel modules.
        Failed to set up service vboxadd, please check the log file
        /var/log/VBoxGuestAdditions.log for details.

  • Ali Çömez says:

    Hey my friend is very good news 🙂 I think I need to thank Centos team for this. Thanks centos team

  • Olga Bobrova says:

    CentOS7 image download from Atlas is broken for VMWare-Fusion provider:

    $ vagrant box add centos/7 --provider vmware_fusion
    ==> box: Loading metadata for box 'centos/7'
    box: URL: https://atlas.hashicorp.com/centos/7
    ==> box: Adding box 'centos/7' (v1611.01) for provider: vmware_fusion
    box: Downloading: https://atlas.hashicorp.com/centos/boxes/7/versions/1611.01/providers/vmware_fusion.box
    An error occurred while downloading the remote file. The error
    message, if any, is reproduced below. Please fix this error and try
    again.

    The requested URL returned error: 404 Not Found

    Trying to curl that URL, we see that vagrant is trying to download an image from http://cloud.centos.org/centos/7/vagrant/x86_64/images/CentOS-6-x86_64-Vagrant-1611_01.VMwareFusion.box which is, indeed, a malformed address (note CentOS-6-... there)

  • Siva Krishna Giri Babu Avvaru says:

    required centos desktop download link

    • Laurențiu Păncescu says:

      If you want to run a CentOS Linux desktop in a VM, you'll have to download the official DVD image from http://www.centos.org and perform your own installation. We only provide minimal Vagrant images, suitable as a base for developers using CentOS Linux in a traditional server role; you could use yum to manually install desktop packages in one of our Vagrant images, and export the resulting box using Vagrant.

  • Benjamin Brabant says:

    Hi,
    I encountered a problem while trying to ssh from my host (ssh vagrant@192.168.42.42), the connection timed out.

    I finally figure out that file "/etc/sysconfig/network-scripts/ifcfg-eth1" has incorrect rights (600 | vagrant:vagrant).
    I change the rights as follows and restart network service to fix the issue.

    sudo chown root:root /etc/sysconfig/network-scripts/ifcfg-eth1
    sudo chmod 644 /etc/sysconfig/network-scripts/ifcfg-eth1
    sudo systemctl network restart

    I run a virtualbox 5.1.12-112440 on a Mac OS X 10.10.5

    Do you ever know the existence of this issue and otherwise how could it be fixed ?

    Regards

    • Laurențiu Păncescu says:

      Hi Benjamin,

      I wasn't aware of this, thanks for letting me know. I'll update the release notes to recommend using Vagrant 1.9.0.

      Our image only comes with eth0 as an active network interface; the configuration files for the other interfaces are created by Vagrant, if you have private or public networking in your Vagrantfile. Vagrant 1.9.0 doesn't show this problem, but 1.9.1 does - "ip addr show" displays only eth0 with an associated address. Both the permissions and the SELinux context on ifcfg-eth1 seem to be wrong, but 1.9.0 works despite that. You can file a bug report on the Vagrant issue tracker if you want (https://github.com/mitchellh/vagrant/issues).

  • Kirill says:

    I'm getting multiple curl: (6) Could not resolve host errors when yum install is executed in this vagrant box. Mirrors are totally available.
    The issues that I experience occurs during installation of guest additions with vagrant-vbguest plugin and later on when I try to install packages with yum install. Emailing to centos-devel resulted in no response

    • You probably need to be subscribed to centos-devel before sending email to the list (better check the list archives at https://lists.centos.org/pipermail/centos-devel/ to see if your email was accepted). Regarding the curl error, it might be something wrong related to networking - there have been bugs in several Vagrant releases; it works fine here, please try Vagrant 1.9.0 if you are using a different version. If not, you'll have to debug networking in the VM using the regular Linux tools, to find out what's going on.

  • Zee Alexander says:

    Thanks for your work! Any chance you'd be willing to replace the smartquotes with normal double or single quotes in your first two code examples?

    (Of course I was able to fix it and use the code, but for the benefit of others)

    • I actually typed normal quotes, but WordPress replaces them with smartquotes - it has some typograhy enhancements filter enabled by default. I can't change that, I don't have admin privileges on the blog, just authorship. Sorry.

  • Steve says:

    When attempting to add the vmware workstation box using the command:

    vagrant box add centos/7 --provider vmware_workstation

    once the box has downloaded, vagrant reports:

    The box you attempted to add doesn't match the provider you specified.

    Provider expected: vmware_workstation
    Provider of box: vmware_fusion

    • Please use vmware_fusion as the provider when downloading the image, even if you're using VMware Workstation on Windows. vmware_desktop should work for both in the future, but we're waiting for an upgrade of the build servers.

  • Alexander says:

    My computer is ASUS N551VW6700. It has Core i7 CPU, 16 GiB RAM, 1 TiB Hard Drive, and two graphic cards. One is Intel HD Graphics 530 with 128 MiB video memory, the other is NVIDIA GeForce GTX 960M with 4 GiB video memory. When I install CentOS 7.3.1611 on my computer, it can't get into the GUI interface and my computer complain:
    NMI watchdog: BUG: soft lockup -CPU#5 stuck for 22s![Xorg:1375]
    And this sentence is shown in the way of continuous loop.

    Is there any way to solve my problem?

  • fastzhong says:

    As many people reported, synced folder does NOT work for centOs7:

    [isc-build] GuestAdditions 5.0.32 running --- OK.
    ==> isc-build: Checking for guest additions in VM...
    ==> isc-build: Setting hostname...
    ==> isc-build: Configuring and enabling network interfaces...
    ==> isc-build: Rsyncing folder: /cygdrive/d/Projects/SmartHUB/shub/trunk/deployment-docker/ => /vagrant
    ==> isc-build: Mounting shared folders...
    isc-build: /tmp/vagrant-cache => C:/Users/zhonglun/.vagrant.d/cache/centos/7

    I have other box in the same place, from my vagrant file:

    config.vm.define "isc-build" do |node|
    node.vm.box = "centos/7"
    node.vm.provider :virtualbox do |vb|
    vb.memory = 2048
    vb.cpus = 1
    end
    node.vm.hostname = "isc-ansible"
    node.vm.network "private_network", ip: "30.30.30.60"
    # node.vm.provision :shell, path: "env_isc_build/bootstrap.sh", privileged: true
    end

    config.vm.define "smarthub-ansible" do |node|
    node.vm.box = "elastic/sles-12-x86_64"
    node.vm.provider :virtualbox do |vb|
    vb.memory = 1024
    vb.cpus = 1
    end
    node.vm.hostname = "smarthub-ansible"
    node.vm.network "private_network", ip: "30.30.30.10"
    privileged: true
    end

    ubuntu & suse box have no such problem.

    • Our boxes use rsync by default, in order to avoid Vagrant errors due to the missing guest additions. You have to explicitly configure VirtualBox shared folders in your configuration file in order to override our default, if you use something like vagrant-vbguest (or use SMB). On Windows, there was also the problem that Vagrant tries to use a SSH control connection for rsync, which Cygwin doesn't support properly or at all.

  • Please give us your valuable comment

    Your email address will not be published. Required fields are marked *