Red Hat Bugzilla – Bug 1308535
RFE: v2v: Copy bios.hddOrder to target
Last modified: 2018-05-17 03:29:01 EDT
+++ 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):
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.
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.
Bootable disk should be defined by import process.
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.
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
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.
Updating Summary etc to make it clearer this is now a wishlist
item for virt-v2v.
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.
(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?
Here's an example:
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).
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