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
Feature request: hyperv-iso builder vm configuration version #5984
Comments
I have the same problem, would be awesome, and seems to be quite straightforward to implement. |
I just ran into this issue. Built a box on Windows 10. Tried to import into Windows Server 2016 and I'm getting the error:
|
I've written a patch that allows you to set "configuration_version" on the hyper-v builder; see the linked PR for the patch. I'd love it if someone could test it out for me and verify that it works for you. |
Thank you for implementing it! |
That's because the feature isn't released with Packer yet; We update the website and docs when the release goes live on our website. Currently this feature is only available on the master branch, so the docs aren't live yet. |
oh, but that PR doesn't include docs-- adding them so they'll go out with the next release. |
Much obliged! |
Thanks for implementing this @SwampDragons ! I'm confused as to how, exactly, one should specify the The documentation says only:
That doesn't tell me how to Adding What additional step is required? Thanks in advance for any guidance! |
My apologies; I failed to realize that Packer 1.4.1 is required for this to work, and it does indeed work now that I've upgraded! 👏 |
Oh, good. This will become much clearer once we manage to implement versioned docs. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Hello,
At the moment packer hyperv-iso builder creates virtual machine with the latest configuration version available on the host. This is default Windows behavior as well. If virtual machine is created on Windows Server 2016 it has default configuration version of 8.0. Virtual machines created on Windows Server 2012 R2 have configuration version of 5.0.
Version of existing virtual machines can be seen with command below.
Get-VM | Select name, version
The problem is that Microsoft has significantly changed virtual machine configuration files between configuration versions 5.0 and 8.0 and they are not backwards compatible. In other words, if I create a vm template on Server 2016 I cannot import that template on Server 2012 due to configuration version incompatibility.
When creating virtual machine manually from PowerShell, this can be overwritten using -Version parameter like this:
It would be good to add this option to packer to produce virtual machine templates that can be imported on older versions of Hyper-V even if packer itself runs on the latest server version.
The text was updated successfully, but these errors were encountered: