Created
March 12, 2015 15:33
-
-
Save loic-moriame/e6db6e419b9705238b06 to your computer and use it in GitHub Desktop.
Export a CentOS Vagrant Box using VirtualBox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from the VM to export | |
# Remove the udev persistent net rules file: | |
rm -f /etc/udev/rules.d/70-persistent-net.rules | |
# Clean history | |
rm .bash_history | |
history -c | |
# Shutdown the virtual machine: | |
shutdown -h now |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from the host | |
# Create Vagrant box | |
# vagrant package --output <BOX NAME> --base <VIRTUALBOX VM NAME> | |
# i.e: | |
vagrant package --output centos-6.5-x86_64.box --base centos-6.5-x86_64 | |
# Add Vagrant box | |
# vagrant box add <BOX NAME> <BASE BOX> | |
# i.e: | |
vagrant box add centos-6.5-x86_64 centos-6.5-x86_64.box |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment