Bug 1438946 - virt-install does not boot from specified --cdrom if --boot hd is specified
Summary: virt-install does not boot from specified --cdrom if --boot hd is specified
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-04 20:16 UTC by fednuc
Modified: 2017-04-04 22:30 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-04 22:30:28 UTC
Embargoed:


Attachments (Terms of Use)

Description fednuc 2017-04-04 20:16:12 UTC
The following should boot from the specified --cdrom object during installation, then set the boot device list to only the HD after installation:

$ virt-install --name something --memory 1024 --boot hd --cdrom=some.iso --disk size=10

Instead, it tries to boot from the new/blank HD image and fails. In ~/.cache/virt-manager/virt-manager.log, the following appears:

Generated install XML: 
....
    <boot dev="hd"/>
....
Generated boot XML: 
....
    <boot dev="hd"/>


The man page for virt-install states:

--boot BOOTOPTS
           Optionally specify the post-install VM boot configuration.

Removing the --boot hd option results in <boot dev="cdrom"> and <boot dev="hd"> entries in the install XML section, and only a <boot dev="hd"> entry in the boot XML section, and installation is successful.

Though this workaround would work for this simple case, it would appear to prevent the specification of any other post-install boot list that doesn't include cdrom.

I believe this is a relatively new bug in virt-install, as I have some installation records from using virt-install under Fedora 24 that include (successful) VM creation using a combination of --cdrom=some.iso and --boot hd

Comment 1 Cole Robinson 2017-04-04 22:30:28 UTC
Thanks for the report. Indeed it shouldn't work like that but looks like it's been broken since v1.0.0! Anyway, it's fixed upstream now

commit ff3b4dc5b0b21393dbccc0f5f691b17bf1a761bd
Author: Cole Robinson <crobinso>
Date:   Tue Apr 4 18:22:15 2017 -0400

    cli: Don't overwrite install bootorder with manual --boot (bz 1438946)
    
    --boot should be for post-install bootorder only
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1438946



Note for that particular command line, if you drop the --boot argument it will give you the desired result (first boot=cdrom, permanent boot=disk)


Note You need to log in before you can comment on or make changes to this bug.