Closed jrgifford closed 10 years ago
The vmtools.sh needs to be fixed too
diff --git a/template/ubuntu/script/vmtools.sh b/template/ubuntu/script/vmtools.sh
index 8162cd9..de388f4 100644
--- a/template/ubuntu/script/vmtools.sh
+++ b/template/ubuntu/script/vmtools.sh
@@ -233,7 +233,7 @@ if [ $PACKER_BUILDER_TYPE == 'vmware' ]; then
#apt-get -y remove linux-headers-$(uname -r) build-essential perl
#apt-get -y autoremove
-elif [ $PACKER_BUILDER_TYPE == 'virtualbox' ]; then
+elif [ $PACKER_BUILDER_TYPE == 'virtualbox-iso' ]; then
echo "Installing VirtualBox guest additions"
apt-get install -y linux-headers-$(uname -r) build-essential per
Should work now. Ross Smith II came up with a best approach (so far) using a regex matcher:
if [[ $PACKER_BUILDER_TYPE =~ vmware ]]; then I've standardize on using [[ per
http://google-styleguide.googlecode.com/svn/trunk/shell.xml#Test,_%5B_and_%5B%5B
Using the latest packer (v0.5.0), until this change was made, you could not build any of the machines using VirtualBox by default.