hashicorp / packer-plugin-hyperv

Packer plugin for Hyper-V Builder
https://www.packer.io/docs/builders/hyperv
Mozilla Public License 2.0
19 stars 24 forks source link

`keep_registered` and `skip_export` are mutually exclusive #121

Open remi-espie opened 11 months ago

remi-espie commented 11 months ago
          Something still off with the combination of parms to get this to work

I have the following params that I believe are relevant to delivering a working VM in Hyper-V manager:

  temp_path             = "E:/Hyper-V/"
  shutdown_command = "shutdown /s /t 5" 
  shutdown_timeout = "60s"
  keep_registered = true
  skip_export     = true 
  skip_compaction = true

I have no output_directory specfied according to hints mentioned in this thread.

HyperV "Virtual Machine" files appear to remain in the build folder below E:/Hyper-V/ - but there is no "Virtual DIsks" folder - that appears to be created in an output-xxx subfolder beside the HCL file.

The VM listed in HyperV manager will not start - complains about missing disk files. WHen I move the Virtual DIsk folder below the build folder, then complains about incorrect perms.

Ulitimately perhaps I'm abusing packer to create VM instances rather than images, but then perhaps keep_registered and skip_export should not be options?

packer 1.9.4 with hyperv plugin 1.1.3

Originally posted by @pmcevoy in https://github.com/hashicorp/packer-plugin-hyperv/issues/115#issuecomment-1836039080