Bug 1223016

Summary: [RFE] Provide VHD Image for Microsoft SCVMM support
Product: Red Hat CloudForms Management Engine Reporter: Chris Pelland <cpelland>
Component: BuildAssignee: John Prause <jprause>
Status: CLOSED ERRATA QA Contact: Jeff Teehan <jteehan>
Severity: medium Docs Contact:
Priority: high    
Version: 5.5.0CC: jhardy, obarenbo
Target Milestone: GAKeywords: FutureFeature
Target Release: 5.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.5.0.8 Doc Type: Enhancement
Doc Text:
Cause: Consequence: Fix: Result:
Story Points: ---
Clone Of:
: 1276411 (view as bug list) Environment:
Last Closed: 2015-12-08 13:10:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Feature
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1276411    

Description Chris Pelland 2015-05-19 15:32:06 UTC
We were not able to make the VHD image for MS SCVMM work on cfme-5.4 (CloudForms 3.2) for the following reasons:

The NIC driver in RHEL is not compatible with the HyperV virtual machine specification and will require some work to either replace driver or find a more generally compatible one. 

Creating this BZ to track this functionality targeted for cfme-5.5 and cfme-5.4.z stream.

Comment 1 John Prause 2015-07-20 19:20:14 UTC
Some info for later reference:
http://windowsitpro.com/virtual-machine-manager/deploy-linux-scvmm

Some details from the link:

1. Startup a Cloudforms VSphere appliance

2. Since RHEL6.6 has a default kernel version that is older (must be at least 3.4), you must install the latest Hyper-V integration services.

Question: Where do you get the latest Hyper-V integration services?

3. Install the SCVMM 2012 SP1 Linux agent. This is found in the C:\Program Files\Microsoft System Center 2012\Virtual Machine Manager\agents\Linux folder on the SCVMM server. The file will be called: scvmmguestagent.1.0.0.544.x64.tar

Question: Where do we get Microsoft System Center 2012? Is there a newer version?

4. Shut down the Linux VM, and then save its VHDX file to the SCVMM library.

5. Create a Linux template, and make sure you set the correct Operating System, which will allow you to configure automatic naming, and then save the template.

6. You can now create new Linux VMs from the template.

Comment 2 John Prause 2015-07-29 18:32:58 UTC
This is information from jhardy:

1. The VHD support was a nice to have for CF3.2, so yes a tech preview item. As we get closer to Azure capabilities maturing this item becomes higher on the list of required items. Not confirmed but my guess would be to run CF in Azure will require a VHD format, equally we do have an account in support exception running CF in SCVMM as they only have a SCVMM environment. So we have two drivers requiring us to deliver on this, Azure and SCVMM.

2. The version of SCVMM to base against would be SCVMM 2012 R2.

Comment 3 John Prause 2015-08-03 17:40:32 UTC
Currently, brew image-build only supports the following formats:

vmdk, qcow, qcow2, vdi, rhevm-ova, vsphere-ova, docker, raw-xz

Comment 4 John Prause 2015-08-03 17:44:42 UTC
More info from: https://social.technet.microsoft.com/Forums/windowsserver/en-US/ef8c12f7-c45d-442e-9a30-c43cd87df3b3/how-to-convert-vmware-image-to-hyperv-images


Vmdk2Vhd is a simple utility to convert virtual hard drive images from VMWare's VMDK format into the Microsoft's VHD format. This is a sector by sector copy operation from one format to the other and the source file remains unaltered.

Comment 5 John Prause 2015-08-03 20:55:32 UTC
Version 1.9.0 of brew is supposed to support vpc (vhd equivalent),..however we have 1.9.1 of brew installed and don't see that supported image build.

I've opened: https://engineering.redhat.com/rt/Ticket/Display.html?id=364765
with rel-eng and will need this resolved to move forward.

Comment 6 John Prause 2015-09-11 17:41:35 UTC
The brewery machines have been updated with the latest version of brew that have VPC support. We still need to modify or add kickstart files to generate this additional appliance build.

Comment 7 John Prause 2015-09-17 20:07:58 UTC
Hurray! I was able to brew a scratch build for a 5.4 VHD appliance.

Next I'll see if we can mount this somewhere and give it a quick test.
If that works, then I'll brew an official 5.4.2 build for QE to test.

Comment 9 Jeff Teehan 2015-11-06 21:05:42 UTC
Great job on the implementation.  This has been thoroughly tested and verified.  I'm just going to add a snippet of the email I sent regarding Azure VHD implementation for the record.

Here are some basics:

1.  Convert-VHD -VHDType Fixed -- The VHD must be Fixed, not Variable.
2.  Need to install WALinuxAgent and prep. -- https://github.com/Azure/WALinuxAgent
3.  Need to install yum, subscription-manager, unzip to do step 2
4.  Edit /etc/waagent.conf and change the Remove Root password to "N"
5.  Run waagent -deprovision
6.  Resize-VHD -- The VHD byte size MUST be in whole MBs divisible by 1048576, the next higher value being 44023414784

Azure CLI needs to be installed to upload the VHD
You need to have an Azure Storage account, Resource Group, etc with a blob and a container.
https://cfme5.blob.core.windows.net/vhd

Command would be:
7.  azure storage blob upload -c "DamnLongConnectionString" --blobtype page
8.  Create an image from the disk.
9.  Create a VM from the image.  Need to enable SSH, HTTP, HTTPS endpoints when creating the VM.

When its done, you'll get a URL like above as well as an external IP address to SSH into so that you can configure the appliance.

Comment 11 errata-xmlrpc 2015-12-08 13:10:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:2551