Unable to get VM with Bridged Configuration using Packer

688 views
Skip to first unread message

Arun Shivaramakrishna

unread,
Feb 26, 2016, 9:59:33 AM2/26/16
to Packer
Hello,

I have attached the .Json script and the config file I am using to create a VM (using Virtual Box). I am sucessfully able to create VM. However, it is created using 'NAT' configuration(default). Could you please suggest me what changes are to be done in the json or cfg file, if I need to create the VM with 'Bridged' Configuration. I am not able to find much resources in this regard and any suggestions will greatly help me.

Thank you very much for the help,
arun_ubtest.json
preseed.cfg

Bernd Naumann

unread,
Feb 26, 2016, 12:39:56 PM2/26/16
to packe...@googlegroups.com
Hi Arun,

I have not tested this but to configure virtualbox you can pass
vboxmanage arguments to packer, like you already do for cpu and memory.

For possible network configs take a look at:
https://www.virtualbox.org/manual/ch08.html#idp46730496367936

Hope that helps,
Bernd


signature.asc

Alvaro Miranda Aguilera

unread,
Feb 26, 2016, 8:20:25 PM2/26/16
to packe...@googlegroups.com
Hello,

Packer allow you use Vboxmodify commands, and change those parameters.

You can have before boot, after boot after shutdown

I will suggest check over there. check vboxmanage_post 

  • vboxmanage (array of array of strings) - Custom VBoxManage commands to execute in order to further customize the virtual machine being created. The value of this is an array of commands to execute. The commands are executed in the order defined in the template. For each command, the command is defined itself as an array of strings, where each string represents a single argument on the command-line to VBoxManage (but excluding VBoxManage itself). Each arg is treated as a configuration template, where the Name variable is replaced with the VM name. More details on how to use VBoxManage are below.

  • vboxmanage_post (array of array of strings) - Identical to vboxmanage, except that it is run after the virtual machine is shutdown, and before the virtual machine is exported.

Thanks
Alvaro.

--
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 packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/86823df2-c014-437b-85b1-77a51187afe9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages