Hey there,
New to Packer but am very close to getting my first base box for vagrant
working properly. I have a script that will ensure our developers are using
VirtualBox 5.2.0. I downloaded the VBoxGuestAdditions.iso and am placing it
via my builder. I tried moving it around and placing it in /tmp then using
a bootstrap to move it to the proper location but it isn't working. Once my
base box is created, running vagrant up produces the following error:
[default] GuestAdditions versions on your host (5.2.0) and guest (5.0.18)
do not match.
As we want to keep our hosts 5.2.0, I need to have my base box created with
5.2.0. Here is my current builder:
"builders": [
{
"type": "virtualbox-iso",
"guest_os_type": "Ubuntu_64",
"guest_additions_url": "./VBoxGuestAdditions.iso",
"iso_url":
"http://releases.ubuntu.com/16.04.3/ubuntu-16.04.3-server-amd64.iso",
"iso_checksum": "f3532991e031cae75bcf5e695afb844dd278fff9",
"iso_checksum_type": "sha1",
"vm_name": "packer-ubuntu-16.04-amd64",
"disk_size": "{{ user `disk_size` }}",
"headless": "{{ user `headless` }}",
"boot_wait": "5s",
"http_directory": "http",
"boot_command": [
"<enter><wait>",
"<f6><esc>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs>",
"/install/vmlinuz ",
"initrd=/install/initrd.gz ",
"auto=true ",
"priority=critical ",
"net.ifnames=0 ",
"url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg",
"<wait><enter>"
],
"ssh_wait_timeout": "30m",
"ssh_username": "ubuntu",
"ssh_password": "ubuntu",
"shutdown_command": "sudo systemctl poweroff",
"vboxmanage": [
["modifyvm", "{{ .Name }}", "--memory", "{{ user `memory` }}"],
["modifyvm", "{{ .Name }}", "--cpus", "{{ user `cpus` }}"]
]
}
],
The guest_additions_url is the download straight from virtualbox.org for
5.2.0. When Packer is building my image, I see the following info messages
so not sure why it gets downgraded to 5.0.18:
==> virtualbox-iso: Downloading or copying Guest additions checksums
virtualbox-iso: Downloading or copying:
http://download.virtualbox.org/virtualbox/5.2.0/SHA256SUMS
==> virtualbox-iso: Downloading or copying Guest additions
virtualbox-iso: Downloading or copying:
file:///Users/matt.denton/config_management/puppet/packer/VBoxGuestAdditions.iso
==> virtualbox-iso: Uploading VirtualBox version info (5.2.0)
==> virtualbox-iso: Uploading VirtualBox guest additions ISO...
Getting into my base box via vagrant up (and taking the time to update the
guest additions via vagrant-vbguest plugin) I see the following broken
symlink:
lrwxrwxrwx 1 root root 52 Oct 29 14:35 VBoxGuestAdditions ->
/opt/VBoxGuestAdditions-5.2.0/lib/VBoxGuestAdditions
If I change the symlink to point /usr/lib/VboxGuestAdditions to the same
.iso I have in my builder, it all works. Really been beating my head
against the wall and any assistance on this would be appreciated. Thanks!
--
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/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups
"Packer" 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/packer-tool/613b8bb2-71ee-46e3-b6b3-b42daaaf5727%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.