Bug 1496767 - Should not appear to choose boot option info in the conversion when to convert opensuse42.3 guest by virt-v2v
Summary: Should not appear to choose boot option info in the conversion when to conve...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libguestfs
Version: 8.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 8.1
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On:
Blocks: 1463620 1679960
TreeView+ depends on / blocked
 
Reported: 2017-09-28 10:44 UTC by kuwei@redhat.com
Modified: 2019-09-24 08:09 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-24 08:09:51 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)
opensuse43.2.xml (11.79 KB, application/xml)
2017-10-10 02:08 UTC, kuwei@redhat.com
no flags Details
virt-v2v-opesnsuse-42.3.log (2.34 MB, text/plain)
2017-12-11 10:32 UTC, mxie@redhat.com
no flags Details

Description kuwei@redhat.com 2017-09-28 10:44:10 UTC
Description of problem:
Should not appear to choose boot option info  in the conversion when to convert  opensuse42.3 guest by virt-v2v

Version-Release number of selected component (if applicable):
libvirt-3.7.0-2.el7.x86_64
virt-v2v-1.36.6-1.el7.x86_64-
libguestfs-1.36.6-1.el7.x86_64
qemu-kvm-rhev-2.9.0-16.el7_4.8.x86_64
libguestfs-winsupport-7.2-2.el7.x86_64
virtio-win-1.9.3-1.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1.Prepare a opensuse new guest without any specific configure.
2.Convert the geust to rhv.
# virt-v2v opensuse42.3 -o rhv -os 10.73.131.93:/home/nfs_export
[   0.0] Opening the source -i libvirt opensuse42.3
[   0.0] Creating an overlay to protect the source from being modified
[   0.3] Initializing the target -o rhv -os 10.73.131.93:/home/nfs_export
[   0.8] Opening the overlay
[  23.2] Inspecting the overlay

***
Dual- or multi-boot operating system detected.  Choose the root filesystem
that contains the main operating system from the list below:

 [1] /dev/sda2 (openSUSE Leap 42.3)
 [2] btrfsvol:/dev/sda2/@/.snapshots/2/snapshot (openSUSE Leap 42.3)

Enter a number between 1 and 2, or 'exit': 1
[  65.6] Checking for sufficient free disk space in the guest
[  65.6] Estimating space required on target for each disk
[  65.6] Converting openSUSE Leap 42.3 to run on KVM
virt-v2v: This guest has virtio drivers installed.
[  89.7] Mapping filesystem data to avoid copying unused and blank areas
[  91.9] Closing the overlay
[  92.2] Checking if the guest needs BIOS or UEFI to boot
[  92.2] Assigning disks to buses
[  92.2] Copying disk 1/1 to /tmp/v2v.Q95xZy/bdf9c90b-e6f0-439c-aa9f-6305fd5fad7e/images/fe7cd993-fa63-4ebe-a839-ab4a0b757878/78df44cd-4aba-4b3f-a75c-ea6938545266 (qcow2)
    (100.00/100%)
[ 195.2] Creating output metadata
[ 195.3] Finishing off

3.To check v2v log:
libguestfs: trace: v2v: inspect_get_roots
libguestfs: trace: v2v: inspect_get_roots = ["/dev/sda2", "btrfsvol:/dev/sda2/@/.snapshots/2/snapshot"]
libguestfs: trace: v2v: inspect_os = ["/dev/sda2", "btrfsvol:/dev/sda2/@/.snapshots/2/snapshot"]
libguestfs: trace: v2v: inspect_get_product_name "/dev/sda2"
libguestfs: trace: v2v: inspect_get_product_name = "openSUSE Leap 42.3"
libguestfs: trace: v2v: inspect_get_product_name "btrfsvol:/dev/sda2/@/.snapshots/2/snapshot"
libguestfs: trace: v2v: inspect_get_product_name = "openSUSE Leap 42.3"

***
Dual- or multi-boot operating system detected.  Choose the root filesystem
that contains the main operating system from the list below:

 [1] /dev/sda2 (openSUSE Leap 42.3)
 [2] btrfsvol:/dev/sda2/@/.snapshots/2/snapshot (openSUSE Leap 42.3)

Enter a number between 1 and 2, or 'exit': 

Actual results:
As description 

Expected results:
Shoud convert the guest successfully without any  abort.

Additional info:

Comment 2 Richard W.M. Jones 2017-09-28 11:32:33 UTC
I wasn't able to reproduce this using
openSUSE-Tumbleweed.x86_64-0.0.2-Build3.51 from virt-builder,
but it is a real bug.  Probably we need to install a fresh disk
image using btrfs on the root filesystem.

Comment 3 Pino Toscano 2017-10-02 12:44:22 UTC
Can you please attach the XML output of:
  # virt-inspector -n opensuse42.3 --no-icon --no-applications
?

I remember we did fixes in the past regarding this...

Comment 4 kuwei@redhat.com 2017-10-10 02:08:08 UTC
Created attachment 1336586 [details]
opensuse43.2.xml

Comment 5 mxie@redhat.com 2017-12-11 10:31:12 UTC
Try to reproduce this bug with latest builds but get different result
virt-v2v-1.36.10-3.el7.x86_64
libguestfs-1.36.10-3.el7.x86_64
libvirt-3.9.0-5.el7.x86_64
qemu-kvm-rhev-2.10.0-11.el7.x86_64


Steps:
1.Convert opensuse42.3 guest to rhv by virt-v2v but there is a warning about " unknown device "sda" during conversion.
# virt-v2v opensuse-42.3 -o rhv -os 10.73.131.93:/home/nfs_export
[   0.0] Opening the source -i libvirt opensuse-42.3
[   0.0] Creating an overlay to protect the source from being modified
[   0.7] Initializing the target -o rhv -os 10.73.131.93:/home/nfs_export
[  76.8] Opening the overlay
[  87.0] Inspecting the overlay
[ 148.8] Checking for sufficient free disk space in the guest
[ 148.8] Estimating space required on target for each disk
[ 148.8] Converting openSUSE Leap 42.3 to run on KVM
virt-v2v: warning: /files/boot/grub2/device.map/hd0 references unknown 
device "sda".  You may have to fix this entry manually after conversion.
virt-v2v: This guest has virtio drivers installed.
[ 247.3] Mapping filesystem data to avoid copying unused and blank areas
[ 253.7] Closing the overlay
[ 267.6] Checking if the guest needs BIOS or UEFI to boot
[ 267.6] Assigning disks to buses
[ 267.6] Copying disk 1/1 to /tmp/v2v.uXcLhr/bdf9c90b-e6f0-439c-aa9f-6305fd5fad7e/images/ceea0ea3-736a-4baf-9776-6f6e98dba984/94a67437-1695-42ec-bbed-b56fc34ae250 (qcow2)
    (100.00/100%)
[1117.8] Creating output metadata
[1117.9] Finishing off

2.After finishing conversion,import guest from export domain to data domain at rhv,then check guest but found device.map is not updated to vda, details pls refer to log
#cat /boot/grub2/device.map
(hd0) /dev/sda

Additional info:
1.Also could reproduce above problem on SLES12SP1 guest 

2.If only downgrade virt-v2v/libugestfs to 1.36.6-1.el7, also can't reproduce the problem of comment 0

3.Downgrade libvirt/qemu-kvm-rhev version to be same with bug's version, but libvirtd service can't be started on v2v conversion server now,so I can't reproduce comment0 's problem with bug's packages, pls see below
3.1 # rpm -q virt-v2v libguestfs libvirt qemu-kvm-rhev
virt-v2v-1.36.6-1.el7.x86_64
libguestfs-1.36.6-1.el7.x86_64
libvirt-3.7.0-2.el7.x86_64
qemu-kvm-rhev-2.9.0-16.el7_4.8.x86_64
3.2 # virt-v2v opensuse-42.3 -o rhv -os 10.73.131.93:/home/nfs_export
virt-v2v: error while loading shared libraries: libvirt.so.0: cannot open shared object file: No such file or directory
3.3 # service libvirtd status
Redirecting to /bin/systemctl status libvirtd.service
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: failed (Result: start-limit) since Mon 2017-12-11 18:17:07 CST; 5s ago
......


Hi rjones,
 
    Maybe the problem of comment0 has been fixed with updating of virt-v2v/libvirt/qemu, but another problem appears, do you think a new bug for new problem should be opened?

Comment 6 mxie@redhat.com 2017-12-11 10:32:22 UTC
Created attachment 1365907 [details]
virt-v2v-opesnsuse-42.3.log

Comment 7 Richard W.M. Jones 2017-12-11 10:36:11 UTC
I'm fairly sure this won't have been fixed by any updates.
I don't know what changed to make it work, but we're not supporting
OpenSUSE conversions at the moment.

libguestfs 1.38 has a thorough rewrite of inspection so no doubt
there will be a different set of bugs.

Comment 8 Richard W.M. Jones 2017-12-11 10:36:47 UTC
Also (in RHEL) we're not supporting btrfs, which causes the whole
snapshot problem in the first place.

Comment 10 Richard W.M. Jones 2017-12-11 12:07:32 UTC
(In reply to mxie@redhat.com from comment #9)
> (In reply to Richard W.M. Jones from comment #7)
> > I'm fairly sure this won't have been fixed by any updates.
> > I don't know what changed to make it work, but we're not supporting
> > OpenSUSE conversions at the moment.
> > 
> > libguestfs 1.38 has a thorough rewrite of inspection so no doubt
> > there will be a different set of bugs.
> 
> If v2v doesn't support OpenSUSE conversions at the moment.do we should move
> bug 1472288 to ASSIGNED(failedQA) like bug 1477912

Bug 1472288 is fixed even though it's not a supported case,
and bug 1477912 is an unrelated future feature.

> (In reply to Richard W.M. Jones from comment #8)
> > Also (in RHEL) we're not supporting btrfs, which causes the whole
> > snapshot problem in the first place.
> 
> If we're not supporting btrfs, but we have verified this bug 1383517 -
> virt-v2v fails with /etc/fstab containing btrfs with two or more mount
> options which means v2v support convert guest which contains brtfs
> partitions, how should we heal with brtfs problem on v2v in future?

The problem with btrfs is that it requires kernel support and Red Hat
has decided not to further pursue btrfs support in the kernel.  Without
that there's nothing that virt-v2v can do with any guest that has
btrfs filesystems.

https://access.redhat.com/solutions/197643
https://www.theregister.co.uk/2017/08/16/red_hat_banishes_btrfs_from_rhel/

Comment 11 mxie@redhat.com 2018-02-02 11:24:50 UTC
Hi rjones,

   I verify this bug using OpenSUSE13.2/OpenSUSE42.3 guests again with latest v2v builds(1.36.10-6.el7.x86_64),the problems of comment 0 and comment5 can't be reproduced now. One change is setting ext4 format for partitions during installing OpenSUSE system on guest during verify this bug (because rhel doesn't support btrfs)

   According to current test result, I think v2v is ready to support converting OpenSUSE guests now, why don't let v2v support OpenSUSE conversions at the moment?

   If v2v has no plan to support OpenSUSE conversions on rhel7.5, I think bug 1472288 should be set as private and remove it from rebase libguestfs  bug1472272. Because it is a downstream bug and customer could see it( if it is a public bug,customers will think v2v support converting OpenSUSE guest on rhel7.5)

Thanks

Comment 12 mxie@redhat.com 2018-02-05 05:36:23 UTC
This bug could be reproduced again when OpenSUSE42.3 guest's partitions are configured as brtfs format

Packages:
virt-v2v-1.36.10-6.el7.x86_64
libguestfs-1.36.10-6.el7.x86_64
libvirt-3.9.0-11.virtcov.el7.x86_64
qemu-kvm-rhev-2.10.0-19.el7.x86_64


Steps:
1.Create a OpenSUSE42.3 guest on esxi6.5 host and set brtfs format for partitions during installing OpenSUSE system(default partition format of opensuse42.3 is brtfs)
# virt-v2v -ic vpx://root@10.73.199.71/data/10.73.196.89/?no_verify=1 esx6.5-opensuse42.3-brtfs --password-file /tmp/passwd
[   0.0] Opening the source -i libvirt -ic vpx://root@10.73.199.71/data/10.73.196.89/?no_verify=1 esx6.5-opensuse42.3-brtfs
[   1.8] Creating an overlay to protect the source from being modified
[   2.4] Initializing the target -o libvirt -os default
[   2.5] Opening the overlay
[  27.9] Inspecting the overlay

***
Dual- or multi-boot operating system detected.  Choose the root filesystem
that contains the main operating system from the list below:

 [1] /dev/sda2 (openSUSE Leap 42.3)
 [2] btrfsvol:/dev/sda2/@/.snapshots/2/snapshot (openSUSE Leap 42.3)

Enter a number between 1 and 2, or 'exit': 1
[ 305.1] Checking for sufficient free disk space in the guest
[ 305.1] Estimating space required on target for each disk
[ 305.1] Converting openSUSE Leap 42.3 to run on KVM
virt-v2v: This guest has virtio drivers installed.
[1062.9] Mapping filesystem data to avoid copying unused and blank areas
[1070.4] Closing the overlay
[1070.5] Checking if the guest needs BIOS or UEFI to boot
[1070.5] Assigning disks to buses
[1070.5] Copying disk 1/1 to /var/lib/libvirt/images/esx6.5-opensuse42.3-brtfs-sda (raw)
    (100.00/100%)
[1440.2] Creating output metadata
Pool default refreshed

Domain esx6.5-opensuse42.3-brtfs defined from /tmp/v2vlibvirt7c2b51.xml

[1445.9] Finishing off

2.After finishing conversion, check guest:
2.1 Guest has vnc+cirrus mode which is excepted result according to https://bugzilla.redhat.com/show_bug.cgi?id=1472288#c10
2.2 Device.map could be updated to vda
2.3 Network has virtio module and get ip normally


Because rhel doesn't support btrfs, maybe this bug could be closed as WONTFIX

Comment 13 Richard W.M. Jones 2018-02-05 08:52:35 UTC
I've unhidden comment 10 which explains why we cannot fix opensuse
guests with btrfs in virt-v2v in RHEL.

If this bug doesn't indicate a more general issue in virt-v2v then I
agree with your suggestion that we should close it WONTFIX.

Comment 14 Pino Toscano 2018-02-07 16:49:25 UTC
(In reply to mxie@redhat.com from comment #11)
>    If v2v has no plan to support OpenSUSE conversions on rhel7.5, I think
> bug 1472288 should be set as private and remove it from rebase libguestfs 
> bug1472272.

bug 1472288 is a public bug, and it had a public bug for the upstream libguestfs component; hiding it makes no sense.
Also, the fix for it was backported in one of the versions between 1.36.3 and 1.36.6, so it *is* fixed by the rebase.

> Because it is a downstream bug and customer could see it( if it
> is a public bug,customers will think v2v support converting OpenSUSE guest
> on rhel7.5)

There is nothing on these bugs that says openSUSE guests are officially supported.  There were various bugs in the past about support for other distributions in libguestfs itself (not v2v).

Comment 16 Pino Toscano 2019-09-24 08:09:51 UTC
btrfs is not supported by Red Hat, so we cannot convert SUSE guests using btrfs filesystems.

Closing accordingly.


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