Hi
I am using packer to build a Virtual box image running 64bit ubuntu 14.04.4
server. My use case is when users import this image by default their
networking is set to Bridged mode and the option to reinitialize mac
address be set.
I tried to enforce that in my template.json as *below*:
Is there a way to enforce this when the off file is built?
Is this virtual box specific issue? Should I try this with VMware?
Any help is much appreciated.
{
"builders": [
{
"type": "virtualbox-iso",
"boot_command": [
"<esc><wait>",
"<esc><wait>",
"<enter><wait>",
"/install/vmlinuz<wait>",
" auto<wait>",
" console-setup/ask_detect=false<wait>",
" console-setup/layoutcode=us<wait>",
" console-setup/modelcode=pc105<wait>",
" debian-installer=en_US<wait>",
" fb=false<wait>",
" initrd=/install/initrd.gz<wait>",
" kbd-chooser/method=us<wait>",
" keyboard-configuration/layout=USA<wait>",
" keyboard-configuration/variant=USA<wait>",
" locale=en_US<wait>",
" netcfg/get_hostname=ubuntu-1404<wait>",
" netcfg/get_domain=vm<wait>",
" noapic<wait>",
" preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort
}}/preseed.cfg<wait>",
" -- <wait>",
"<enter><wait>"
],
"boot_wait": "10s",
"disk_size": 40960,
"guest_os_type": "Ubuntu_64",
"http_directory": "http",
"iso_checksum": "2ac1f3e0de626e54d05065d6f549fa3a",
"iso_checksum_type": "md5",
"iso_url":
"http://releases.ubuntu.com/14.04/ubuntu-14.04.4-server-amd64.iso",
"ssh_username": "***",
"ssh_password": "***",
"ssh_port": 22,
"ssh_wait_timeout": "10000s",
"shutdown_command": "echo 'shutdown -P now' > /tmp/shutdown.sh; echo
'***'|sudo -S sh '/tmp/shutdown.sh'",
"vboxmanage": [
[
"modifyvm",
"{{.Name}}",
"--memory",
"1024"
],
[
"modifyvm",
"{{.Name}}",
"--cpus",
"1"
],
[
"modifyvm",
"{{.Name}}",
"--usb",
"on"
],
* [*
* "modifyvm",*
* "{{.Name}}",*
* "--nic0",*
* "bridged"*
* ],*
* [*
* "modifyvm",*
* "{{.Name}}",*
* "--macaddress0",*
* "auto"*
* ]*
]
}
],
"provisioners": [
{
"type": "shell",
"execute_command": "echo '***'|sudo -E -S sh '{{.Path}}'",
"override": {
"virtualbox-iso": {
"scripts": [
"scripts/base.sh",
"scripts/virtualbox.sh",
"scripts/some_custom_scripts.sh",
"scripts/cleanup.sh",
"scripts/zerodisk.sh"
]
}
}
}
]
}
--
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/e8bf8e0f-a520-4d4d-8d53-e657ac2ba6de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.