Hi all,

I'm looking at creating a Vagrant VM using a CI server with no internet 
connection. Or rather, the CI only has a connection to the internet via 
Artifactory, which is acting as a proxy for Yum packages and Vagrant boxes, 
including caching those files for reproducibility.

I'm trying to build a VM with centos/7 (v1801.02, Virtualbox) as a base 
image. I would also like to install VirtualBox Guest Additions, using the 
Vagrant plugin vagrant-vbguest. 

I will include a sanitised Vagrantfile and build script as attachments for 
this process.


What I am trying to do is the following:
 - Disable vagrant-vbguest
 - Provision the VM
 - Enable vagrant-vbguest
 - Vagrant up again (to install Guest Additions)
 - Export the VM

However, it seems that after provisioning the machine with the plugin 
disabled, re-enabling the plugin has no effect. How can I cause the above 
set of steps to occur?

Michael

-- 
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/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/06daea1a-c111-48e0-87ab-205cf0f28bbe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: Vagrantfile
Description: Binary data

#!/bin/bash
set -e

# Ensure that the box is added from Artifactory
vagrant box add "https://my/artifactor/url/centos7";

# Disable the guest additions plugin
export VAGRANT_NO_PLUGINS=1

# First build of VM
vagrant up

# Enable guest additions plugin to install Guest Additions
unset VAGRANT_NO_PLUGINS

# For some reason, running the script a few times is needed for the guest additions
vagrant halt && vagrant up
vagrant halt && vagrant up
vagrant halt

# Package the output into a box file
vagrant package --output my-centos7.box

# Upload the box file to Artifactory - command not included here

Reply via email to