cloudbase / windows-imaging-tools

Tools to automate the creation of a Windows image for OpenStack, supporting KVM, Hyper-V, ESXi and more.
Apache License 2.0
675 stars 227 forks source link

Add support for Windows server 2019 using virtio-win-0.1.171 or later #274

Closed felfert closed 3 years ago

felfert commented 5 years ago

Ok, a clean PR now: This PR adds support for Windows Server 2019, using latest virtio-win-0.1.171

While testing, I also found out, that the fallback to win2k12r2 drivers in WinImageBuilder.ps1, line 697 is probably a bad idea, because no error or warning is printed, but a non-functional image is generated. This should be replaced by fatal error, clearly stating that the appropriate drivers are missing.

AppVeyorBot commented 5 years ago

:white_check_mark: Build windows-openstack-imaging-tools 1.0.62 completed (commit https://github.com/cloudbase/windows-openstack-imaging-tools/commit/de0430dcb0 by @felfert)

felfert commented 5 years ago

@ader1990 Did you had a chance to evaluate this yet?

ader1990 commented 5 years ago

@ader1990 Did you had a chance to evaluate this yet?

Hello, didn t get the chance yet, will come back with an answer next week.

felfert commented 5 years ago

Also: What do you think about my remark regarding the fallback to win2k12r2 drivers? I would like to create a PR which replaces the fallback by a fatal error. Otherwise user could be fooled if the wron drivers are installed and the resulting image crashes during boot.

ader1990 commented 5 years ago

Also: What do you think about my remark regarding the fallback to win2k12r2 drivers? I would like to create a PR which replaces the fallback by a fatal error. Otherwise user could be fooled if the wron drivers are installed and the resulting image crashes during boot.

The fallback code is meant to install drivers from older virtio drivers on newer Windows version. For example, at the moment I made that fallback, there was Windows 10 released but the virtio stable drivers did only support Windows 8.1, that s why the fallback.

ader1990 commented 5 years ago

we can make a fallback path work for 2019 too.

win10 and win16, afaik, can work with 2k12r2 drivers.

we can make a fallback path 2k16 to 2k12r2, 2k19 to 2k16. Or to remove it completely and fail the build which would be the sane thing to do, but people might want to install a known stable version of virtio of 2k12r2 for 2k16. Let me know what you think.

felfert commented 5 years ago

I would prefer the build to fail if drivers did not match. We can introduce a new option (e.g: enableVirtioDriverFallback) which is off by default. Then, people who know what they are doing can still enable the fallback at their own risk.

ader1990 commented 5 years ago

I would prefer the build to fail if drivers did not match. We can introduce a new option (e.g: enableVirtioDriverFallback) which is off by default. Then, people who know what they are doing can still enable the fallback at their own risk.

Fair enough, but the code should still work and install older drivers for newer versions, like it does currently. Maybe we can reuse the flag "force" to make this fallback.

felfert commented 5 years ago

The current fallback does not work with 2019. (because it falls back to 2k12 drivers)

Maybe we can reuse the flag "force" to make this fallback.

That's exactly what I was proposing: Disabling the the fallback by default and provide a "force" flag for people who want to use older drivers at their own risk.

felfert commented 5 years ago

I think, we should separate the 2 issues:

With my original remark, I just wanted to express my opinion about the current fallback. which is suboptimal (in 2016 case) and not working at all (in the 2019 case). So why not simply merge this PR and then I create another PR containing an updated fallback (optional and to 2016 instead of 2012)

AppVeyorBot commented 4 years ago

:white_check_mark: Build windows-openstack-imaging-tools 1.0.251 completed (commit https://github.com/cloudbase/windows-openstack-imaging-tools/commit/831709153c by @felfert)

zpeschke commented 3 years ago

Is there an ETA for this? Thanks!

mikeycarlton commented 3 years ago

What's the current status on getting Server 2019 support out for the cloudbase imaging tools? Server 2019 has been out for quite some time now.

ader1990 commented 3 years ago

@mikeycarlton @zpeschke imaging tools supported Windows Server 2019 out of the box.

Also, the latest stable Fedora virtio drivers for Windows 2019 are the same as the Windows 2016 drivers.

I am closing this PR and will create another one as soon as the Fedora VirtIO drivers will be different for 2019 with the suggested changes (the build number comparison should be forward looking, so that it supports future Windows Server 2019 releases).

Thank you, Adrian Vladu

mikeycarlton commented 3 years ago

Awesome thanks! Could you update the Readme to reflect that it supports Server 2019?

mikeycarlton commented 3 years ago

Nevermind you beat me to it 👍