Skip to content
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

Option to skip SSH provisioning #1591

Closed
boenrobot opened this issue Oct 15, 2014 · 17 comments · Fixed by #2235
Closed

Option to skip SSH provisioning #1591

boenrobot opened this issue Oct 15, 2014 · 17 comments · Fixed by #2235
Assignees
Labels
core Core components of Packer enhancement

Comments

@boenrobot
Copy link

As pointed out in #1518, I'd very much like an option to skip connections over SSH when using the VirtualBox builder (and ideally, with other builders too).

This is useful not only in cases like the aforementioned issue (where a connection is not possible), but also when such a connection is not intended - like, when creating a base box to then be provisioned in several different ways.

@ghost
Copy link

ghost commented Oct 17, 2014

In most cases you'll need to at least ssh into the VM in order to gracefully shut it down, even if you're not doing any provisioning.

@boenrobot
Copy link
Author

I could also do that as part of the boot sequence (or rather, Packer could do the shutdown over VNC, after the boot sequence, with "" being automatically appended), if a graceful shutdown is important.

Sure, I can understand that's not how it works in many cases (particularly when timing is tricky)... Which is why if present, such an option should default to not skipping SSH.

@mitchellh mitchellh added enhancement core Core components of Packer labels Oct 27, 2014
@jkilada
Copy link

jkilada commented Oct 28, 2014

I could really use an option to disable SSH provisioning as well. I am constructing VMs using Packer as part of a build process, and for various reasons I need to be able to skip that last step and still have the build succeed and the build output preserved.

@langri-sha
Copy link

I am currently in such a situation, where I am trying to build a slightly opinionated base to use as a seed later on. It's only light configuration on top of a pre-existing base, so it seemed obvious to use boot commands and I found it perfectly sufficient.

I would have liked it much better if SSH was optional and if I could get to the output like @jkilada suggests, without resolving an unencumbered SSH setup in order to build successfully. I must agree with @boenrobot, there are situations where it is impractical to satisfy SSH requirements on the very first build.

@timsutton
Copy link
Contributor

+1 to @jkilada's point. I'm looking at a scenario where Packer would be useful for just automating a customized installation and then I have Vagrant attach this installation disk to another VM to further process the results.

@georgevicbell
Copy link
Contributor

This would be very useful, after installing from ISO I'm getting:
ssh: no common algorithms

I can do a shutdown of the vm from the installer with boot_command. This would actually be the preferred method for this ISO.

Suggest making ssh_* optional for all iso builders, when not defined it just skips the ssh section and tries to export.

@sethvargo sethvargo changed the title Feature request: option to skip SSH provisioning Option to skip SSH provisioning Feb 24, 2015
@J3RK
Copy link

J3RK commented May 19, 2015

What's the status on this feature request? Having the option to skip the SSH step would help out my automation project immensely!

@lamoni
Copy link
Contributor

lamoni commented Jun 13, 2016

Is there a clean way to skip SSH provisioning now that the communicators are implemented? Specifically, I'm trying to skip SSH provisioning in virtualbox-*

@rickard-von-essen
Copy link
Collaborator

@lamoni Just set "communicator": "none" and be sure to have no provisioners and set "shutdown_command": "". We had some bugs around that so if it doesn't work, just file an issue with your details according to the issue template.

@vtolstov
Copy link
Contributor

vtolstov commented Mar 2, 2017 via email

@vtolstov
Copy link
Contributor

vtolstov commented Mar 3, 2017 via email

@vtolstov
Copy link
Contributor

vtolstov commented Mar 3, 2017

Hm, i'm know only qemu builder, sometimes ago we have pr for qemu builder to support communicator none... May be virtualbox need this too.

@beardedN5rd
Copy link

Hi,
would be great to have this for virtualbox as well. atm it fails with
==> virtualbox-iso: Starting the virtual machine... ==> virtualbox-iso: Error starting VM: VBoxManage error: VBoxManage: error: NAT#0: configuration query for "GuestPort" int failed (VERR_CFGM_VALUE_NOT_FOUND). ==> virtualbox-iso: VBoxManage: error: Failed to attach the network LUN (VERR_CFGM_VALUE_NOT_FOUND) ==> virtualbox-iso: VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
with corresponding settings
"communicator":"none", "shutdown_command": ""

@rickard-von-essen
Copy link
Collaborator

@beardedN5rd this can be done with the null comm.

@hashicorp hashicorp locked and limited conversation to collaborators May 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
core Core components of Packer enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

12 participants