And looking further into it I think I could achieve this with a powershell post processor to run import-vm and bring it back into hyper-v. I can use the builder to already have the vm at the correct path so it would just be a simple in-place import of the VM.
The next step would be to also have this post processor make the vm highly available in the cluster. I could then have packer on each of my cluster nodes and have a powershell script that asks a few questions then runs packer on the chosen host using invoke-command and running the build then importing it back into hyper-v. On Saturday, October 13, 2018 at 3:54:17 PM UTC+11, M Black wrote: > > skip_export: true still unregisters the machine from hyper-v and leaves > the vhdx files and nothing else. > > I thought an option like this should be possible but it seems I am > incorrect. > > > On Saturday, October 13, 2018 at 1:26:03 PM UTC+11, Lucas Jackson wrote: >> >> Use skip_export: true >> >> >> >> Sent from my Samsung Galaxy smartphone. >> >> -------- Original message -------- >> From: M Black <[email protected]> >> Date: 2018-10-12 9:49 PM (GMT-05:00) >> To: Packer <[email protected]> >> Subject: [packer] Ability to not export and leave VM sitting in Hyper-v >> >> Is there a way to have the hyper-v builder not export the VM after its >> built? >> So far I am able to create a VM from scratch, install centos with a >> kickstart file all with one command which is amazing. >> However the way packer works is to also export it, is there a way to skip >> this step? I want my build to stay sitting in Hyper-v after its being built. >> That way packer would be an amazing deployment tool for production >> hyper-v VM's and so much better than anything I have found yet. >> Is this possible? >> >> -- >> This mailing list is governed under the HashiCorp Community Guidelines - >> https://www.hashicorp.com/community-guidelines.html. Behavior in >> violation of those guidelines may result in your removal from this mailing >> list. >> >> GitHub Issues: https://github.com/mitchellh/packer/issues >> IRC: #packer-tool on Freenode >> --- >> You received this message because you are subscribed to the Google Groups >> "Packer" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/packer-tool/59677afd-5e9f-43a6-ad10-8d75742341c3%40googlegroups.com >> >> <https://groups.google.com/d/msgid/packer-tool/59677afd-5e9f-43a6-ad10-8d75742341c3%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/8a0bd7bc-1331-495b-9344-105f6e5b702e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
