VirtualBox -> VCenter

38 views
Skip to first unread message

Mike M

unread,
Jul 31, 2018, 10:41:56 AM7/31/18
to Packer


Hi,

I am trying to build a virtualbox headless then export it to vcenter using a postprovisioner.   I have attached my configs.  I have scanned the forums and the issues.  No conclusion.  I am getting the following:


==> pnda_template_base: Running post-processor: vsphere
Build 'pnda_template_base' errored: 2 error(s) occurred:

* Post-processor failed: Erroneous exit code 2 while executing script: /tmp/packer-shell362983487

Please see output above for more information.
* Post-processor failed: Unknown artifact type, can't build box: mitchellh.virtualbox

==> Some builds didn't complete successfully and had errors:
--> pnda_template_base: 2 error(s) occurred:

* Post-processor failed: Erroneous exit code 2 while executing script: /tmp/packer-shell362983487

Please see output above for more information.
* Post-processor failed: Unknown artifact type, can't build box: mitchellh.virtualbox


myenv_conf.json
virtualbox.json

Adam Robinson

unread,
Jul 31, 2018, 10:48:49 AM7/31/18
to packe...@googlegroups.com
The vsphere post-processor only takes input from the VMware builder according to the docs.  You might be able to use the artifice post-processor to change the artifact to the ova file you generated, but that is not something I have tried myself.


Thanks,
Adam Robinson
Virtualization and Cloud Infrastructure Senior
Information and Technology Services
University of Michigan

--
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/cb3862bb-985e-4dcd-9461-fb32171dfb9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rickard von Essen

unread,
Jul 31, 2018, 10:49:24 AM7/31/18
to packe...@googlegroups.com
Quoting the docs:

The Packer vSphere post-processor takes an artifact from the VMware builder and uploads it to a vSphere endpoint.

(my emphasis)


Mike M

unread,
Jul 31, 2018, 12:20:58 PM7/31/18
to Packer
Thanks!  I guess I’m trying to find a way to create a and upload a VM from a linux box into vcenter.   (Building the vm on the esxi host itself isn’t possible from a security standpoint).  

I tried to use VMware workstation pro on linux but seems it must have the UI.  Thats the reason for the virtual box route.  

Any other ideas on how this can be accomplished.  Its needed for CI/CD automation.

Adam Robinson

unread,
Jul 31, 2018, 12:27:25 PM7/31/18
to packe...@googlegroups.com
You could build with a nested ESXi instance (using a free license) on your existing ESXi host.  That way you don't have to open up SSH or VNC to a production host.

Thanks,
Adam Robinson
Virtualization and Cloud Infrastructure Senior
Information and Technology Services
University of Michigan
--
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.

Alvaro Miranda Aguilera

unread,
Jul 31, 2018, 2:44:25 PM7/31/18
to packe...@googlegroups.com
you can run VNC to do the install and from there can be headless

having VMWare workstation installed is a pre-requirement here, so the best will be get a SOE that documents that part



--
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+unsubscribe@googlegroups.com.



--
Alvaro

Mike M

unread,
Jul 31, 2018, 8:17:39 PM7/31/18
to Packer
The problem is we are trying to make this work with no human interaction.  We need a solution that can be run unattended many times a day.  We dont care if there is some pre-reqs on the build vm itself.  Just need to run it headless from start to finish.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.



--
Alvaro

Alvaro Miranda Aguilera

unread,
Aug 1, 2018, 5:28:28 AM8/1/18
to packe...@googlegroups.com
Seems a question for your IT department or VMWare support on how to get VMWare Workstation installed in the way you require.

Alvaro



To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/5f4e0e92-8a36-45fc-996f-2f66347c8b50%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Rickard von Essen

unread,
Aug 1, 2018, 7:33:51 AM8/1/18
to packe...@googlegroups.com
You should be able to install VMware Workstation from shell or with X-forwarding. After that you can run it in Xvfb if it requires a Xserver (which I doubt a bit). 




--
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.

Shyam J

unread,
Aug 14, 2018, 7:49:50 AM8/14/18
to Packer
Something I am waiting to try.


May be you might have come across this. 

Thanks
Shyam
Reply all
Reply to author
Forward
0 new messages