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

Avoid forcibly shutting the VM down when there is no shutdown command #97

Open
tiramiseb opened this issue Sep 22, 2022 · 3 comments
Open

Comments

@tiramiseb
Copy link

tiramiseb commented Sep 22, 2022

Description

Ability to disable the feature that forcibly halts the virtual machine.

Use Case(s)

I have an automatic installer on an ISO image. I just need Packer to boot the VM, type a command, and then wait for the VM to stop by itself.

While it works perfectly with qemu (no forced shutdown), this plugin forces the shutdown.

A workaround I have found is to define shutdown_command = "placeholder" in the source definition (*), but well, it's a bit ugly...

(*): with a fake shutdown command defined but no communicator, it allows (*StepShutdown).Run, to avoid entering in the else block and not forcibly halt the virtual machine.

@tenthirtyam
Copy link
Collaborator

tenthirtyam commented Nov 22, 2022

I suggest that this is not implemented based on prior precedent for a similar issue on packer-plugin-vsphere. This would deviate from the intended use of Packer and this plugin; however, there is an existing workaround.

Ryan Johnson
Senior Staff Solutions Architect | Product Engineering @ VMware, Inc.

@tiramiseb
Copy link
Author

The issue you are linking here is not similar. That issue is about leaving the VM running forever, and manually stopping it afterwards, which is not what I need.

The disable_shutdown option, which is present for packer-plugin-vsphere, would be perfectly fine for my need. A 5-minute timeout (configurable with shutdown_timeout) is more than enough for my installer.

But that option does not exist on packer-plugin-vmware.

@tenthirtyam
Copy link
Collaborator

In that case such an option may be an option to consider.

@tenthirtyam tenthirtyam added this to the Backlog milestone May 24, 2024
@tenthirtyam tenthirtyam self-assigned this Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants