Bug 1472972

Summary: [RFE] The azure image as built cannot be used in azure.
Product: Red Hat CloudForms Management Engine Reporter: Jeff Teehan <jteehan>
Component: BuildAssignee: Satoe Imaishi <simaishi>
Status: CLOSED CURRENTRELEASE QA Contact: Leo Khomenko <lkhomenk>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.7.0CC: bascar, jhardy, lkhomenk, mdahlgre, miked, mpfuetzn, obarenbo, rcyriac, sgirijan, ssainkar, tdrake
Target Milestone: GAKeywords: FutureFeature, RFE, TestOnly, ZStream
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: provider:azure:image
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1484984 1487297 (view as bug list) Environment:
Last Closed: 2018-03-06 15:07:49 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:
Bug Depends On:    
Bug Blocks: 1484984, 1487297    

Description Jeff Teehan 2017-07-19 17:20:53 UTC
Description of problem:
Azure has two requirements that our build process is not meeting.  First, the disk has to be a fixed size.  Second, the fixed size needs to be exactly divisible by 1mb.

This is what we are telling our customers to do, if they can find the article.
https://access.redhat.com/node/2984371/

Version-Release number of selected component (if applicable):
Been around for a while.

How reproducible:
Try to upload the azure image and create an appliance from it.

Steps to Reproduce:
1.  Take standard azure image - cfme-azure-5.x.x.x-1.x86_64.vhd
2.  Upload as is to azure.
3.

Actual results:
The disk and VM is unusable.

Expected results:
We seem to be getting complaints on this on a weekly basis.

Mostly of the people who run into this feel we should just correctly size the vhd at build time.

Additional info:
This requirement was in classic mode.  For a year, it wasn't a requirement in Resource Manager mode.  Sometime in the spring the re-implemented the requirement.

Comment 2 Mike Dahlgren 2017-07-20 05:55:21 UTC
I show that a gzipped aligned vdf file is 1/10th the size of the standard download and should be the default offering.

qemu-img info --output=json -f vpc cfme-azure-5.8.0.17-1.x86_64_fixed.vhd
{
    "virtual-size": 34361835520,
    "filename": "cfme-azure-5.8.0.17-1.x86_64_fixed.vhd",
    "format": "vpc",
    "actual-size": 3158839296,
    "dirty-flag": false
}

33G - cfme-azure-5.8.0.17-1.x86_64_fixed.vhd
317M - cfme-azure-5.8.0.17-1.x86_64_fixed.vhd.gz

Comment 7 CFME Bot 2017-08-24 18:17:49 UTC
New commit detected on ManageIQ/manageiq-appliance-build/master:
https://github.com/ManageIQ/manageiq-appliance-build/commit/0c44a47808a06e70261de00165e9159302376618

commit 0c44a47808a06e70261de00165e9159302376618
Author:     Satoe Imaishi <simaishi>
AuthorDate: Thu Aug 17 13:14:13 2017 -0400
Commit:     Satoe Imaishi <simaishi>
CommitDate: Wed Aug 23 17:29:01 2017 -0400

    Azure now requires .vhd image to be in fixed format and aligned to nearest 1MB
    https://bugzilla.redhat.com/show_bug.cgi?id=1472972

 scripts/fix_azure_disk.rb | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 scripts/fix_azure_disk.rb

Comment 10 CFME Bot 2017-08-24 18:27:56 UTC
New commit detected on cfme_productization/master:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme_productization.git;a=commit;h=3590cf9bd8fea2f41f2a672e0fdfb61f1f2fb676

commit 3590cf9bd8fea2f41f2a672e0fdfb61f1f2fb676
Author:     Satoe Imaishi <simaishi>
AuthorDate: Wed Aug 23 18:25:59 2017 -0400
Commit:     Satoe Imaishi <simaishi>
CommitDate: Wed Aug 23 18:25:59 2017 -0400

    Azure .vhd disk needs to be resized/converted
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1472972

 manageiq-appliance-build/lib/tasks/image_build.rake | 15 +++++++++++++++
 1 file changed, 15 insertions(+)