Bug 1673740

Summary: [RFE] - Add Microsoft Hyper-V as supported composer disk format
Product: Red Hat Enterprise Linux 8 Reporter: Brian Smith <briasmit>
Component: loraxAssignee: Brian Lane <bcl>
Status: CLOSED WONTFIX QA Contact: Release Test Team <release-test-team>
Severity: unspecified Docs Contact: Eliane Ramos Pereira <elpereir>
Priority: unspecified    
Version: 8.0CC: anilsson, atodorov, briasmit, hhei, jstodola, leiwang, release-test-team, ribarry, tbowling, vkuznets, xiaofwan, xuli, yacao, yujiang, yuxisun
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-18 17:54:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Brian Smith 2019-02-07 22:54:00 UTC
Description of problem:
When creating a image in Composer, Microsoft Hyper V is not listed as an output option.  


Version-Release number of selected component (if applicable):  RHEL 8 Beta, snapshot 3


How reproducible: every time


Steps to Reproduce:
Try to create image in Composer -- Microsoft Hyper V is not listed as option.


Additional info:
This request came from a customer.

Comment 1 Brian Lane 2019-02-08 00:13:25 UTC
I believe the .vhd disk image also works with Hyper-V, if not can you provide details on the differences?

Comment 2 Brian Smith 2019-02-08 17:26:33 UTC
This was a customer request as Composer in Cockpit lists Azure as an output format, but not Hyper V, and the documentation doesn't reference Hyper V as supported.   If Hyper V uses the same format as Azure, can we update Composer in Cockpit to list both of them?  Thanks!

Comment 3 Andreas Nilsson 2019-02-13 14:00:07 UTC
Here is the kickstart for vhd's: https://github.com/weldr/lorax/blob/master/share/composer/vhd.ks
This one installs WALinuxAgent and it's dependencies. Is that desirable in a Hyper V environment, or should we need to make a separate kickstart without WALinuxAgent?

Comment 4 Brian Smith 2019-03-05 22:14:01 UTC
Unfortunately, I'm not familiar enough with Hyper-V images to know if WALinuxAgent should or should not be included.

Comment 5 Andreas Nilsson 2019-03-06 13:28:59 UTC
Do you have access to a hyper-v environment? I can try to get hold of one up if not and see what's needed there and if the Azure image even boots on a regular, non-azure Hyper-V environment.
Judging from the WALinuxAgent docs, it seems it's very Azure specific, so there is probably no use on it outside Azure.
https://github.com/Azure/WALinuxAgent

Comment 6 Brian Smith 2019-03-06 15:47:48 UTC
@Andreas - Unfortunately, I don't have access to a hyper-v environment.

Comment 7 Xiaofeng Wang 2019-03-25 03:29:38 UTC
@anilsson, @brasimit, and @bcl:
1. .vhd can be used by both Hyper-V and Azure.
2. Just like WALA is a dependence of Azure, Hyper-V needs hyperv-daemons as its dependence.
3. hyperv-daemons groups  hypervfcopyd, hypervkvpd, hypervvssd, hyperv-tools, and hyperv-daemons-license together, and they have same NVR. 
4. If running .vhd on Hyper-V, it does not need WALA. Just like @anilsson mentioned, WALA is for Azure ONLY.

Xiaofeng

Comment 8 Andreas Nilsson 2019-03-25 10:15:12 UTC
Sounds like it need to be two separate images then. One for Azure and one for local Hyper-V environments.

Comment 9 Brian Lane 2019-03-25 17:20:15 UTC
(In reply to Xiaofeng Wang from comment #7)
> @anilsson, @brasimit, and @bcl:
> 1. .vhd can be used by both Hyper-V and Azure.
> 2. Just like WALA is a dependence of Azure, Hyper-V needs hyperv-daemons as
> its dependence.
> 3. hyperv-daemons groups  hypervfcopyd, hypervkvpd, hypervvssd,
> hyperv-tools, and hyperv-daemons-license together, and they have same NVR. 
> 4. If running .vhd on Hyper-V, it does not need WALA. Just like @anilsson
> mentioned, WALA is for Azure ONLY.
> 
> Xiaofeng

Thanks for the additional details!
Sounds like we can make a new template that includes @hyperv-daemons instead. Is .vhd the preferred disk type or would another be more appropriate?

Comment 10 Xiaofeng Wang 2019-03-27 06:21:07 UTC
Hyper-V supports .vhd and .vhdx disk types.
Before Hyper-V 2012 or Windows Server 2012, .vhd is the only disk type supported by Hyper-V.
The .vhdx becomes the default disk type since Hyper-V 2012 or Windows Server 2012, but keep .vhd as another choice.

I think .vhdx is the best choice for Hyper-V image.
1. Microsoft has marked .vhd as legacy format and .vhdx is the default format for Windows Server 2012, 2012R2, 2016 and 2019.
2. .vhdx supports some features which are not supported by .vhd, such as more storage capacity, file corruption protection,etc.

There're two things to note here:
1. Azure does not support .vhdx yet.
2. The Hyper-V images does not have WALA enabled because WALA will report some errors if it's not running on Azure.

Xiaofeng

Comment 11 David Shea 2019-04-02 15:59:19 UTC
https://github.com/weldr/lorax/pull/671

I was able to test the output with a Hyper-V manager provided by Xiaofeng. The VM boots and the hyper-V guest daemons are running.

Comment 12 David Shea 2019-04-05 15:37:42 UTC
Merged to master, tested with a Windows 10 machine provided by Xiaofeng. This bug needs qa_ack to go forward.

Comment 31 RHEL Program Management 2020-03-18 17:54:55 UTC
Quality Engineering Management has reviewed and declined this request. You may appeal this decision by reopening this request.