Hyper-V builder: disk names and checkpoint/smart paging configuration

Hello, I’m using:

  • Packer v1.8.2 + hyperv-iso and hyperv-vmcx builders
  • Windows 10 Pro
  • Hyper-V 10.0.19041.1

I am able to successfully build images that can then be imported by Hyper-V, but I’ve noted that the exported image seems to still have some artifacts of the build process baked into it, notably the import wizard shows the Temp\hyperv####### path for Checkpoint store and Smart paging folder:

I don’t see these paths present in the VM box.xml file, so I’m guessing they are present in one of the binary files that accompany the xml file.

My questions are:

  1. Is there a way to modify the exported image such that the checkpoint store and smart paging folders are set to a sensible default, and not pointing to my build directory?
  2. When using the hyperv-vmcx builder, the resulting image carries over the same virtual hard drive filename from the base image that was used (e.g. base-image.vhdx). Is there any way to rename the this?

Thank you.