Updated CentOS Vagrant Images Available (v2004.01)

Friday, 15, May 2020 Laurențiu Păncescu announcement 7 Comments

We are pleased to announce new official Vagrant images of CentOS Linux 6.10 and CentOS Linux 7.8.2003 for x86_64. All included packages have been updated to May 30th, 2019.

We are unfortunately not able to create images for CentOS 8.x om our build infrastructure at this time, but are working on this.

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, to prevent errors on "vagrant up".

  3. 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
  4. Some people reported "could not resolve host" errors when running the centos/7 image for VirtualBox on Windows hosts. We don't have access to any Windows computer, but some people reported that adding the following line to the Vagrantfile fixed the problem:
    vb.customize ["modifyvm", :id, "--natdnshostresolver1", "off"]

Recommended Setup on the Host

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

Downloads

The official images can be downloaded from Vagrant Cloud. We provide images for HyperV, libvirt-kvm, VirtualBox and VMware.

If you never used our images before:

vagrant box add centos/6 # for CentOS Linux 6, or...
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

Once you are sure that the checksums are properly signed by the CentOS Project, you have to include them in your Vagrantfile (Vagrant unfortunately ignores the checksum provided from the command line). Here's the relevant snippet from my own Vagrantfile, using v1803.01 and VirtualBox:

Vagrant.configure(2) do |config|
  config.vm.box = "centos/7"

  config.vm.provider :virtualbox do |virtualbox, override|
    virtualbox.memory = 1024
    override.vm.box_download_checksum_type = "sha256"
    override.vm.box_download_checksum = "b24c912b136d2aa9b7b94fc2689b2001c8d04280cf25983123e45b6a52693fb3"
    override.vm.box_url = "https://cloud.centos.org/centos/7/vagrant/x86_64/images/CentOS-7-x86_64-Vagrant-1803_01.VirtualBox.box"
  end
end

Feedback

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

Ackowledgements

I would like to warmly thank Brian Stinson, Fabian Arrotin and Thomas Oulevey for their work on the build infrastructure, as well as Patrick Lang from Microsoft for testing and feedback on the Hyper-V images. I would also like to thank the CentOS Project Lead, Karanbir Singh, without whose years of continuous support we wouldn't have had the Vagrant images in their present form.

I would also like to thank the following people (in alphabetical order):

7 thoughts on "Updated CentOS Vagrant Images Available (v2004.01)"

  1. reli says:

    I have downloaded the box file and initialized four vms using vagrant, but how setup the passwordless ssh login?
    i confused me for a while.

  2. nhoj.patrick says:

    I know I've got centos/7 vagrant working before but I've just tried today and am getting an error, with this setup;
    - Vagrant 2.2.14
    - VirtualBox 6.1.16
    - MacOS 10.15.7

    Output;
    `
    The following SSH command responded with a non-zero exit status.
    Vagrant assumes that this means the command failed!

    umount /mnt

    Stdout from the command:

    Stderr from the command:

    umount: /mnt: not mounted
    `

    For Vagrantfile and the full output see https://gist.github.com/nhojpatrick/6a8284fe85ce5d6f30762ac525e418c1

    The vm does start, but I want to automatically run an ansible scripts upon creation but this error prevents that 2nd step.

  3. Pruthvi says:

    Did you create an issue for this?

  4. daniel says:

    This version asks for password and centos/root doesnt work

    1. David says:

      You use vagrant ssh. Then you are inside the box.

  5. Renato Rossi Ferreira says:

    Hello,
    Would like know if this image have browser? I studying jenkins. I have some issue about check localhost.
    Tks for helping

Leave a Reply to Renato Rossi Ferreira Cancel reply

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