In the Hyper V Generation 2 builder, if the OS installer doesn't eject the DVD when done, the builder will keep rebooting from the ISO.
This behavior is quite different from every other packer builder and Generation 1 where when the VM is rebooted, the ISO is automatically removed/ejected and the OS is booted off the disk as expected.
A lot of OS installers do not support this, especially older and obscure platforms. A simple provision to eject the DVD from a boot command or provisioner would be perfect for this.
In the Hyper V Generation 2 builder, if the OS installer doesn't eject the DVD when done, the builder will keep rebooting from the ISO.
This behavior is quite different from every other packer builder and Generation 1 where when the VM is rebooted, the ISO is automatically removed/ejected and the OS is booted off the disk as expected.
A lot of OS installers do not support this, especially older and obscure platforms. A simple provision to eject the DVD from a boot command or provisioner would be perfect for this.
As is, it does seem to be able to quite easily eject a drive from powershell : https://goodworkaround.com/2012/11/08/eject-dvd-iso-from-hyper-v-2012-using-powershell/