This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Bug 2140548 - [RFE] virt-v2v can't convert windows guest if C drive is dynamic
Summary: [RFE] virt-v2v can't convert windows guest if C drive is dynamic
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: virt-v2v
Version: 9.2
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-07 07:22 UTC by mxie@redhat.com
Modified: 2023-07-07 20:45 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-07 20:45:45 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
vmware-win10-LDM.png (103.40 KB, image/png)
2022-11-07 07:22 UTC, mxie@redhat.com
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-745 0 None None None 2023-07-07 20:45:45 UTC
Red Hat Issue Tracker RHELPLAN-138443 0 None None None 2022-11-07 07:23:22 UTC

Description mxie@redhat.com 2022-11-07 07:22:01 UTC
Created attachment 1922663 [details]
vmware-win10-LDM.png

Description of problem:
virt-v2v can't convert windows guest if C drive is dynamic 

Version-Release number of selected component (if applicable):
virt-v2v-2.0.7-6.el9.x86_64
libguestfs-1.48.4-2.el9.x86_64
guestfs-tools-1.48.2-7.el9.x86_64
libvirt-libs-8.9.0-2.el9.x86_64
qemu-img-7.1.0-4.el9.x86_64
nbdkit-server-1.30.8-1.el9.x86_64
libnbd-1.12.6-1.el9.x86_64


How reproducible:
100%

Steps to Reproduce:
1.Prepare a windows guest on VMware

2.Convert C drive from basic to dynamic in disk management, pls refer to attached screenshot

3.Convert the guest from VMware by v2v
# virt-v2v -ic vpx://root.213.107/data/10.73.212.38/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.3 -io  vddk-thumbprint=87:F9:29:E7:33:DE:34:68:74:3F:6A:C9:61:96:C3:51:E2:1E:EA:2B  -ip /home/passwd esx7.0-win10-x86_64-LDM
[   1.3] Setting up the source: -i libvirt -ic vpx://root.213.107/data/10.73.212.38/?no_verify=1 -it vddk esx7.0-win10-x86_64-LDM
[   3.3] Opening the source
[  13.5] Inspecting the source
virt-v2v: error: inspection could not detect the source guest (or physical 
machine).

Assuming that you are running virt-v2v/virt-p2v on a source which is 
supported (and not, for example, a blank disk), then this should not 
happen.

No root device found in this operating system image.

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]



Actual results:
As above description

Expected results:
virt-v2v can convert windows guest if C drive is dynamic 

Additional info:

Comment 2 Richard W.M. Jones 2022-11-07 09:55:36 UTC
We don't support virt-v2v with the system disk on a dynamic drive at the moment,
although we did write some experimental tooling to handle it:

https://github.com/mdbooth/libldm
(This is not packaged in RHEL)

This is the closest existing bug I can find related to this:

https://bugzilla.redhat.com/show_bug.cgi?id=2068173

I'm not certain if it's common for the system drive to use LDM (I actually
thought it was not possible before reading this bug), but the request to support
this would need to come from a customer.

Comment 3 Richard W.M. Jones 2022-11-07 13:24:45 UTC
FWIW I tried this on Fedora and it revealed an upstream bug in libguestfs,
now fixed here:

https://github.com/libguestfs/libguestfs/commit/d5472a221905116e2133e923dae89fb9fb7f2f26
(This does not affect RHEL, nor does it fix this bug)

After fixing this, virt-v2v incorrectly detects the guest as multi-boot:

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

   [1] /dev/mapper/ldm_vol_DESKTOP-ONJ2VA0-Dg0_Volume1 (Windows 10 Enterprise LTSC 2021)
   [2] /dev/mapper/ldm_vol_DESKTOP-ONJ2VA0-Dg0_Volume1 (Windows 10 Enterprise LTSC 2021)

  Enter a number between 1 and 2, or ‘exit’: 

I think this is related to https://listman.redhat.com/archives/libguestfs/2022-March/028493.html

I added "--root first" to the virt-v2v command line to pick one of these,
but it failed later:

  mount: /sysroot/Windows/Temp/ESP_8NeuBD: /dev/sda1 already mounted or mount point busy.
       dmesg(1) may have more information after failed mount system call.
  ocaml_exn: 'mount' raised 'Failure' exception
  guestfsd: error: mount exited with status 32: mount: /sysroot/Windows/Temp/ESP_8NeuBD: /libguestfs: trace: v2v: mount = -1 (error)
  virt-v2v: error: libguestfs error: mount: mount exited with status 32: mount: /sysroot/Windows/Temp/ESP_8NeuBD: /dev/sda1 already mounted or mount point busy.
       dmesg(1) may have more information after failed mount system call.

So this still won't work (not to mention that ldmtool would have to be
packaged for RHEL which is another kettle of fish).

Comment 4 Klaus Heinrich Kiwi 2022-11-10 12:01:15 UTC
I'll opt to 'park' this on the backlog for the time being. I'd like to understand how popular the use of a dynamic system disk in virtualized windows guests is first.. 

Rich: is this documented as a standing limitation in the product documentation?

Thanks,

 -Klaus

Comment 5 Richard W.M. Jones 2022-11-15 10:22:19 UTC
I thought it was, but I checked now (both upstream and downstream) and
in fact we do not document this limitation at present.  As it would be
worth documenting it, I pushed this:

https://github.com/libguestfs/virt-v2v/commit/6aa09ca0a9e912e1ae2e984b384ee54eb5d5b3aa

Comment 6 Richard W.M. Jones 2022-12-02 12:44:53 UTC
Documentation change (comment 5) available in virt-v2v-2.0.7-7.el9


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