-
Notifications
You must be signed in to change notification settings - Fork 38
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 option to destroy vifs #43
base: main
Are you sure you want to change the base?
Conversation
I'm so sorry for the late reply on this and greatly appreciate you taking the time to improve the packer plugin! I've had a ton of travel, personal things and my contributions to another project have been taking up my time. I plan to look at this within the next week or two! |
* `destroy_vifs` (boolean) - Whether to destroy VIFs on the VM prior to | ||
exporting. Removing them may make the image more generic and reusable. | ||
Default is `false`. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@heindsight can you explain a scenario where having the VIFs remain hurts the template's reusability? I understand the general sentiment that it is unnecessary to include extra configuration, but I don't quite see where this could manifest to a concrete problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ddelnano to be honest, I have not encountered such a situation myself. I cherry picked this from another fork that we were previously using at Sohonet because we have a number of existing templates that use this option.
The main reason for originally using this option in our templates really is just to avoid including unnecessary extra configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello - I couldn't resist chiming in.
On the surface, it seems sloppy to leave a 10MB container that will never be used again. Or is there an example where it could be?
What will happen if it is left in place and ends up inside a template. Will we get TWO of these things when a VM is deployed from the template, and if so - will the "current" or new one be used correctly for deployment?
Or instead will a new deployment just overwrite the existing one?
How will a Windows VM react to a snapshot request with a drive like this hanging around?
Additionally, it seems wasteful - I know we live in an age where we can be sloppy with diskspace because you can get 1TB drive for $40 or so, so... who cares about soaking up 10MB on these things. But not all VMs run on cheap harddrives
In principal, it would seem to be best if temporary drives were really temporary and cleaned up after the fact. Garbage collection seems to be a good practice, whether in terms of RAM or disk space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Roche-Mike this PR adds an option to remove virtual network interfaces from the the VM template. It has nothing to do with any 10MB temporary drive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the surface, it seems sloppy to leave a 10MB container that will never be used again. Or is there an example where it could be?
@Roche-Mike as Heinrich mentioned, this should be unrelated to what you described. However, I am interested in what you are describing and it's something we should consider if the plugin is having the correct behavior. Can you please open a new issue with the relevant context so we can have a focused discussion on that behavior?
Add the option to destroy vifs prior to exporting the VM.