how to disable automatic box update

22 views
Skip to first unread message

yusuf yazıcı

unread,
May 10, 2020, 8:22:12 AM5/10/20
to Vagrant
Hello everyone,

Vagrant automatically updates box to the latest release. I want to work with centos 7.5 image due to some application requirements, so i have selected old box version from vagrant cloud.
i have set "config.vm.box_check_update = false" parameter.

But, still box is updated to version 7.8 after deploy. Could you please help me to disable upgrade?

Thank you

Jeff Bonhag

unread,
May 11, 2020, 10:24:18 AM5/11/20
to vagra...@googlegroups.com
Hi there,

Are you setting a box_version in your Vagrantfile? If not, Vagrant will use the latest downloaded version of that box. For example, this will give you a CentOS 7.5 VM:

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

If that doesn't work, please share a copy of your Vagrantfile so we can get a better idea what's going on.

Cheers!
Jeff

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/vagrant/issues
Discuss: https://discuss.hashicorp.com/c/vagrant/24
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/d00e0827-185b-4421-825d-c8a27e751025%40googlegroups.com.

dragon788

unread,
May 12, 2020, 12:10:57 PM5/12/20
to Vagrant
Jeff is correct, if you are trying to avoid getting the latest version of a box and how to get a specific version that one should contain 7.5.

Once you have that box with 7.5 it will be up to you to block updates from happening inside the VM by adding some commands to the provisioning block because the system update occurs inside the VM which Vagrant doesn't know anything about, it just grabs the VM and brings it up and provides access, it doesn't manage anything inside the system except what you specify in the provisioning block.

yusuf yazıcı

unread,
May 12, 2020, 1:07:42 PM5/12/20
to Vagrant
Hello Jeff & Dragon788,
Thank you for your updates. But my Vagrant file is exactly as you stated.

Vagrant.configure("2") do |config|

  config.vm.box = "centos/7"
  config.vm.box_version = "1809.01"


end

Vagrant is booting up virtual machine with centos 7.5 and right after upgrading to 7.8.  Please find "vagrant up" output at the attachment.

Thank you again for your intereset again.





12 Mayıs 2020 Salı 19:10:57 UTC+3 tarihinde dragon788 yazdı:
vagrantup_out.txt

Jeff Bonhag

unread,
May 12, 2020, 3:17:41 PM5/12/20
to vagra...@googlegroups.com
Hi Yusef,

Thanks for the additional information. The update is coming from the vagrant-vbguest plugin, which runs a system update so that it can compile the kernel extension for the VirtualBox guest additions. That `yum update` will update the `centos-release` package from 7.5 to 7.8.

If you need to keep CentOS pinned at exactly 7.5, you can either deactivate the plugin, or use a box with the VirtualBox guest additions already installed, such as bento/centos-7.5.

Kind regards,
Jeff

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/vagrant/issues
Discuss: https://discuss.hashicorp.com/c/vagrant/24
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages