-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for building from an existing Vagrant box #869
Comments
+1 |
For Virtualbox, you can currently achieve this manually by downloading a .box, extracting its contents (they're just tarballs, optionally gzipped) and then pointing the source_path of the virtualbox-ovf builder to the box.ovf file that was extracted from the tarball. I agree though that having actual support for Vagrant boxes inside Packer without requiring above workaround would be really useful. |
+1. This would remove a lot of friction from the following workflow: take an existing Vagrant box, update contents, and update deployed box so other users can benefit. |
+1. Would definitely be convenient to have. |
+1 |
+1 - i was also looking for that feature - just want to make small changes to an existing base box. |
+1 |
+1 |
+1 Nathan Sullivan
|
+1 Seems like it would be fairly straightforward to do this for VirtualBox boxes as @jorisvddonk suggests. My guess would be most people who want this are aiming to do it for the VirtualBox Vagrant provider anyway. |
+1 this would make it easier as a lot of the time I just want to take a box and then add simple things like chef etc. rather than do a full install of the OS from an ISO |
+1 There are issues in that a Vagrant Box is not necessarily intended for the VirtualBox provider and may not contain an OVF/OVA file. But for all those who want this workflow that wouldn't be a problem. |
+1 |
1 similar comment
+1 |
+1 Ability to skip installation process would be great. |
+1 |
1 similar comment
+1 |
+1 Consideration to the pre-processor would be what type of vagrant box provider is in use as well; I'm guessing the two most common are VirtualBox and VMWare |
+1 this should happen |
+1 I'm sitting here waiting for a windows update....this takes ages. I know i should do this during off-peak but sometimes you just need to build a new box. And would be lovely if i don't have to do a windows update from an installation. |
+1 |
I started converting an existing Vagrant workflow to Packer so we can also build AMIs. I was very surprised to discover that Packer doesn't support building directly from virtualboxes on Atlas. :( 👍 |
+1 I have a FreeBSD vagrant box that I build from ISO that would be great if I can use it as base box for other Packer generated boxes that uses FreeBSD as base so I can have better build times. |
+1 |
+1 for introducing this feature. Will simplify a lot of work. |
+1 |
2 similar comments
+1 |
+1 |
I've +1'd this request.
Are there any gotchas with this approach ? |
@lqueryvg you may want to look into WSO2's product Vagrant box repository [1], which was recently initiated. In this repository, the approach which you have pointed out has been used. When working on building Vagrant boxes for WSO2 products, we encountered the same issue discussed here and we came up with the same solution. Yet hopefully, this feature would be introduced sooner rather than later. |
+1 |
1 similar comment
+1 |
+1 @KFoxder |
@cornfeedhobo, what did you mean saying that @themalkolm's solution doesn't support variables? |
+1 |
1 similar comment
+1 |
5 years after the issue was first opened, let me throw in a +1 as well. |
I've implemented an integration for the virtualbox-ovf builder already and for the vmware-ovf one, but I'm not wild about the complexity it adds to the code, and I think this would work better as a standalone builder -- so I'll be working on that next, with the Vagrant team. I'd love volunteers to test builds once I've got something working. |
I'm game |
Also willing to test while in progress, feel free to ping me whenever |
I have a rough builder created here So far thanks to some hardcoding it only works on OSX (I've attached a binary to that PR) but I intend to fix the pathing for linux and windows tomorrow. I'd love some testing and feedback. Docs changes are included in the PR, and there's a usage example in the PR comments. |
Windows and linux builds are now available for the vagrant builder. |
+1 for this. Also voicing the need/want for this to work via |
@sudomateo the new vagrant builder will call out directly to vagrant rather than requiring users to set up the underlying builder; you will have the opportunity to set whichever vagrant provider suits your needs. |
As this is still open as I just want to take official vagrant boxes, execute some ansible playbooks, then create a new vagrant box or personal usage... @Adezandee Do you have an updated version as I've just tried with packer v1.3.4 and get this;
|
@nhojpatrick my original comment was a partial packer file. I just updated it with a complete working example. |
@nhojpatrick that functionality will be added when #7221 is merged :) |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
It's quite complex to build a Vagrant box from an ISO file. You need to know the boot sequence and the preseed. Both of these are hardly readable.
Sometimes, we just need to build a box out of an existing Vagrant box. It would be great if Packer had a pre-processor that would take, in input, a Vagrant box, and would then feed the "virtualbox-ovf" builder. Alternatively, this could be another builder.
That would add the ability to provision a pre-built Vagrant box, then repackage it as a Vagrant box.
Ideally, the Vagrant box in input could be taken from the local context or from a URL (e.g. a box from http://www.vagrantbox.es/).
Does it make sense?
The text was updated successfully, but these errors were encountered: