Bug 1308535 - RFE: v2v: Copy bios.hddOrder to target
RFE: v2v: Copy bios.hddOrder to target
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs (Show other bugs)
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2016-02-15 08:16 EST by Richard W.M. Jones
Modified: 2018-05-17 03:29 EDT (History)
16 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1297202
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Virt
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2016-02-15 08:16:26 EST
+++ This bug was initially created as a clone of Bug #1297202 +++

Description of problem:
- When importing VM with many disks, the target VM may not run properly because bootable disk is not set on the correct disk or any other disks.
- When importing VM with 1 disk, the target VM is running properly although bootable disk does not set by import process.

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

How reproducible:

Steps to Reproduce:
1. Using import dialog, start import of VM with many disks (in my case, rhel7_21_disks).
2. Wait till import progress is completed.
3. Run VM.

Actual results:
VM is running but "no bootable device" message displayed when opening console.
Observing webadmin shows that none of the disks set as "bootable" disk.
Observing vdsm.log shows that bootorder definition is missing for the target disk.

Expected results:
Bootable disk should be defined by import process.
Comment 2 Richard W.M. Jones 2016-02-15 09:39:59 EST
My analysis of the bug

The current situation is that virt-v2v sets the ovf:boot flag to
"True" on the first disk, and "False" on subsequent disks.  This is a
direct copy of what old virt-v2v did.  This behaviour is not very

Reference: search for "boot" in

The reporter stated that this bug doesn't reproduce with < 9 disks.
I created a RHEL 7.1 guest in VMware with 21 vmw_pvscsi disks.

The boot settings in the vSphere UI are:

 - BIOS or EFI
 - Power On Boot Delay
 - Force BIOS Setup
 - Failed Boot Recovery

These are the same in the vCenter UI.  As far as I can tell, there is
no per-disk bootable option.

I also dumped out the libvirt XML from the source, and no boot
settings are added to libvirt.

I also looked at the VMware .vmx and .vmxf files from the VMware
source, and again there are no boot options.

(I will attached all these files to the current bug in case anyone
else wants to take a look).

Anyway, it is my contention that VMware has no boot settings that we
can copy over.
Comment 7 Richard W.M. Jones 2016-02-15 10:24:37 EST
Reading some public documentation about this, there are two ways
to change the boot order of VMware guests.

(1) In the VMware BIOS.  Hit [F2] on the console during the guest
boot, and you can select the boot order in there:


(2) However the modern way to do this is to add some entries
to the .vmx file.  Settings include bios.bootOrder and bios.hddOrder.
Neither is available through the API, you have to edit the .vmx
file directly.  See:


The current libvirt driver does not expose the bios.bootOrder nor
bios.hddOrder settings.

If it did expose these, then it might be possible for virt-v2v to
translate these into the correct OVF, assuming we knew what the
correct OVF was meant to be.


Here are some other things virt-v2v could do:

(a) Not put the ovf:boot option in the OVF at all.  This punts the
issue entirely over to oVirt to sort out.

(b) Do some kind of guest inspection to try to determine the boot
device.  (This sounds like it's going to be difficult to do).


To take this further I'm going to need:

(i) *.vmx file from the source guest which failed to boot.

(ii) Some guidance about what you'd like to happen.

(iii) Exact description of how to control the boot order through OVF.
Comment 10 Richard W.M. Jones 2016-02-17 09:30:40 EST
Updating Summary etc to make it clearer this is now a wishlist
item for virt-v2v.
Comment 11 Shmuel Melamud 2016-02-17 09:46:46 EST
In any case, virt-v2v must set correct BootOrder in the OVF it generates (just ovf:boot is not enough, it just marks a disk as bootable, but doesn't set the boot order). Currently, this was fixed by patching on oVirt level (https://gerrit.ovirt.org/#/c/53037/), but this is not a correct solution.
Comment 12 Richard W.M. Jones 2016-02-17 09:51:54 EST
(In reply to Shmuel Melamud from comment #11)
> In any case, virt-v2v must set correct BootOrder in the OVF it generates
> (just ovf:boot is not enough, it just marks a disk as bootable, but doesn't
> set the boot order). Currently, this was fixed by patching on oVirt level
> (https://gerrit.ovirt.org/#/c/53037/), but this is not a correct solution.

This is news to me.  What should the <BootOrder> element look like?
Comment 13 Shmuel Melamud 2016-02-17 09:59:37 EST
Here's an example:

            <rasd:ApplicationList />
            <rasd:CreationDate>2016/02/01 14:06:05</rasd:CreationDate>
            <rasd:LastModified>1970/01/01 00:00:00</rasd:LastModified>
            <rasd:last_modified_date>2016/02/01 14:06:36</rasd:last_modified_date>
            <rasd:Address />
            <Alias />
Comment 14 Richard W.M. Jones 2016-06-22 10:47:42 EDT
The following commit sets the <BootOrder> element to 1 for the
first disk, 2 for the second disk and so on:


This doesn't solve the problem of how to copy the correct boot
order from the source hypervisor, which isn't generally solvable
without changes to libvirt (see comment 7).
Comment 15 Richard W.M. Jones 2017-02-16 09:23:41 EST
Still a wishlist item, and still requires changes to the libvirt
ESX driver to expose the bios.bootOrder and bios.hddOrder entries
from the source .vmx file

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