Bug 1343066

Summary: [RFE] vmdisk hook: add support for booting from image file
Product: [oVirt] vdsm Reporter: Dmitry Glushenok <glush>
Component: RFEsAssignee: Dan Kenigsberg <danken>
Status: CLOSED WONTFIX QA Contact: meital avital <mavital>
Severity: medium Docs Contact:
Priority: low    
Version: 4.18.15CC: bugs, glush, mgoldboi, mtessun, nsoffer
Target Milestone: ---Keywords: FutureFeature, Improvement
Target Release: ---Flags: rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?
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: 2018-07-06 14:31:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
vmdisk hook script with boot support none

Description Dmitry Glushenok 2016-06-06 12:36:25 UTC
Created attachment 1165200 [details]
vmdisk hook script with boot support

Description of problem:
Now it is impossible to boot from disks, attached using vmdisk hook.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Attach disk image to VM using vmdisk hook
2. Install OS into attached disk image
3. Try to book from the disk image

Actual results:
VM cannot find boot device.

Expected results:
VM successfully boots to installed OS.

Additional info:
Boot support for vmdisk attached images can be achieved by adding following code into createDiskElement():

    boot = domxml.createElement('boot')
    # find unused boot order number
    bootorders = []
    for b in xmldisks:
        bootorders.append(d.getElementsByTagName('boot')[0].getAttribute('order'))

    for i in range(1, 28):
        if not str(i) in bootorders:
            boot.setAttribute('order', str(i))
            break

    disk.appendChild(boot)

Comment 1 Dan Kenigsberg 2016-06-06 14:27:04 UTC
Would you be kind to post your suggestion as a change to gerrit.ovirt.org?

Comment 2 Dmitry Glushenok 2016-06-06 14:53:36 UTC
I've tried posting the change to gerrit.ovirt.org twice - both times got "500 Internal server error". Is there any manual how to do it right?

Comment 3 Yaniv Kaul 2016-06-06 19:57:36 UTC
(In reply to Dmitry Glushenok from comment #2)
> I've tried posting the change to gerrit.ovirt.org twice - both times got
> "500 Internal server error". Is there any manual how to do it right?

Can you send this information to infra ? we'd be happy to help you submit this enhancement!

Comment 4 Dan Kenigsberg 2016-06-07 06:43:28 UTC
Have you followed http://www.ovirt.org/develop/dev-process/working-with-gerrit/ ?

Attaching a patch to this BZ may be easier to review.

Comment 5 Dmitry Glushenok 2016-06-07 13:06:56 UTC
Thank you for the manual.
Suggested change posted to Gerrit: https://gerrit.ovirt.org/58748 vmdisk hook: add support for booting from image file [DRAFT]

Comment 6 Dmitry Glushenok 2016-06-10 09:05:40 UTC
Updated proposed change on Gerrit with:
- fix for disks without boot tag
- modified README file

Comment 7 Yaniv Kaul 2017-09-01 09:31:13 UTC
Moving back to NEW, as patch is not up-to-date. Would be happy to see it though.