Bug 1308535
| Summary: | RFE: v2v: Copy bios.hddOrder to target | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Richard W.M. Jones <rjones> |
| Component: | virt-v2v | Assignee: | Virtualization Maintenance <virt-maint> |
| Status: | CLOSED WONTFIX | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | unspecified | CC: | bugs, juzhou, lersek, mavital, michal.skrivanek, mxie, mzhan, nsimsolo, ptoscano, rjones, sbonazzo, smelamud, snagar, tzheng, xiaodwan |
| Target Milestone: | beta | Keywords: | FutureFeature, Reopened, Triaged |
| Target Release: | --- | Flags: | knoel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | V2V | ||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1297202 | Environment: | |
| Last Closed: | 2022-01-19 16:36:00 UTC | Type: | Feature Request |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Virt | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1794317 | ||
| Bug Blocks: | 1758964 | ||
|
Description
Richard W.M. Jones
2016-02-15 13:16:26 UTC
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 useful. Reference: search for "boot" in https://github.com/libguestfs/libguestfs/blob/master/v2v/OVF.ml 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: https://pubs.vmware.com/vsphere-4-esx-vcenter/index.jsp?topic=/com.vmware.vsphere.config_iscsi.doc_41/esx_san_config/booting/t_change_boot_sequence_bios.html (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: https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2011654 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. 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:
<Item>
<rasd:Caption>VM100_Disk1</rasd:Caption>
<rasd:InstanceId>cb39ad76-c80f-4b59-a2b9-ff2da59e9b73</rasd:InstanceId>
<rasd:ResourceType>17</rasd:ResourceType>
<rasd:HostResource>2c5fc317-5dd1-46ac-89cc-0208bb354196/cb39ad76-c80f-4b59-a2b9-ff2da59e9b73</rasd:HostResource>
<rasd:Parent>00000000-0000-0000-0000-000000000000</rasd:Parent>
<rasd:Template>00000000-0000-0000-0000-000000000000</rasd:Template>
<rasd:ApplicationList />
<rasd:StorageId>7990f391-063a-4258-8117-231e2ec821c2</rasd:StorageId>
<rasd:StoragePoolId>e5838493-2ce1-44f0-8c02-77726cf2d96c</rasd:StoragePoolId>
<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>
<Type>disk</Type>
<Device>disk</Device>
<rasd:Address />
<BootOrder>1</BootOrder>
<IsPlugged>true</IsPlugged>
<IsReadOnly>false</IsReadOnly>
<Alias />
</Item>
The following commit sets the <BootOrder> element to 1 for the first disk, 2 for the second disk and so on: https://github.com/libguestfs/libguestfs/commit/94e1504146bfb2d0dd9661865d0a423b6be07eb7 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 After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. My apologies, this bug was closed by a broken process that we do not have any control over. Reopening. Let's close this as it's virtually impossible to fix properly anyway. |