RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1727164 - Cannot pass block device as virtio-win ISO path
Summary: Cannot pass block device as virtio-win ISO path
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.6
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On:
Blocks: 1741166 1811054
TreeView+ depends on / blocked
 
Reported: 2019-07-04 19:36 UTC by Tomáš Golembiovský
Modified: 2020-03-31 19:55 UTC (History)
8 users (show)

Fixed In Version: libguestfs-1.40.2-6.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1741166 1811054 (view as bug list)
Environment:
Last Closed: 2020-03-31 19:55:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1082 0 None None None 2020-03-31 19:55:41 UTC

Description Tomáš Golembiovský 2019-07-04 19:36:46 UTC
It is not possible to pass block device (directly or via symbolic link) to virt-v2v for virtio-win ISO. It accepts only regular files, but one may want to use real CD or SAN volume.

There is already patch upstream but RHV would appreciate having it in RHEL7 too.

One can easily test it using loop device. Quoting Rich's test flow:


$ sudo losetup /dev/loop0 `pwd`/fake-virtio-win.iso

$ ll /dev/loop0 
brw-rw----. 1 root disk 7, 0 Jul  4 16:01 /dev/loop0
$ sudo blockdev --getsize64 /dev/loop0 
2738176

Now run the same command as above but pointing to /dev/loop0, and
of course virt-v2v will now need to be run as root:

sudo VIRTIO_WIN=/dev/loop0 \
../run virt-v2v -vx -i disk test-data/phony-guests/windows.img -o null |&
  tee /tmp/log

To show that it used the block device:

$ grep copy_from_virtio_win /tmp/log
windows: copy_from_virtio_win: guest tools source ISO /dev/loop0

To clean up:

$ sudo losetup -d /dev/loop0

Comment 2 Richard W.M. Jones 2019-07-04 21:24:39 UTC
Upstream commit c22a8b68fe5729d3a8907b41eef287cd9f3a55c0.

Comment 3 Richard W.M. Jones 2019-07-04 21:27:57 UTC
Let's see if we can get this as first z-stream (7.7.1).

Comment 5 Richard W.M. Jones 2019-07-08 08:09:52 UTC
I've set the flag to 7.8 with the hope we can get a z-stream for this to get it
into an early 7.7.x.

Comment 7 liuzi 2019-08-15 07:53:02 UTC
Reproduce the bug with builds:
virt-v2v-1.40.2-5.el7.x86_64
libguestfs-1.40.2-5.el7.x86_64
virtio-win-1.9.6-1.el7.noarch

Steps:
1.Prepare a rhel7 conversion server,and create a block device as virtio-win ISO path.
#losetup /dev/loop0 /usr/share/virtio-win/virtio-win.iso

# ll /dev/loop0
brw-rw----. 1 root disk 7, 0 Aug 15 15:17 /dev/loop0

# blockdev --getsize64 /dev/loop0
294205440

# export VIRTIO_WIN=/dev/loop0

2.Use virt-v2v to convert a windows guest and check whether install virtio-drivers during the conversion.
# virt-v2v  -ic vpx://root.75.182/data/10.73.3.19/?no_verify=1  esx5.5-win2012-x86_64 -o null --password-file /home/passwd 
[   0.0] Opening the source -i libvirt -ic vpx://root.75.182/data/10.73.3.19/?no_verify=1 esx5.5-win2012-x86_64
[   2.0] Creating an overlay to protect the source from being modified
[   2.4] Opening the overlay
[  14.5] Inspecting the overlay
[  90.3] Checking for sufficient free disk space in the guest
[  90.3] Estimating space required on target for each disk
[  90.3] Converting Windows Server 2012 Datacenter to run on KVM
virt-v2v: warning: /usr/share/virt-tools/pnp_wait.exe is missing.  
Firstboot scripts may conflict with PnP.
virt-v2v: warning: there are no virtio drivers available for this version 
of Windows (6.2 x86_64 Server).  virt-v2v looks for drivers in /dev/loop0

The guest will be configured to use slower emulated devices.
virt-v2v: This guest does not have virtio drivers installed.
[  94.2] Mapping filesystem data to avoid copying unused and blank areas
[  95.0] Closing the overlay
[  95.1] Assigning disks to buses
[  95.1] Checking if the guest needs BIOS or UEFI to boot
[  95.1] Initializing the target -o null
[  95.1] Copying disk 1/1 to /var/tmp/null.ml6KTx/sda (raw)
^C  (6.02/100%)

Result:virt-v2v cannot find virtio drivers from /dev/loop0.


Verify bug with builds:
virt-v2v-1.40.2-6.el7.x86_64
libguestfs-1.40.2-6.el7.x86_64
virtio-win-1.9.8-6.el7.noarch

1.Prepare a rhel7 conversion server,and create a block device as virtio-win ISO path.
#losetup /dev/loop0 /usr/share/virtio-win/virtio-win.iso

# ll /dev/loop0
brw-rw----. 1 root disk 7, 0 Aug 15 03:07 /dev/loop0

# blockdev --getsize64 /dev/loop0
325976064

# export VIRTIO_WIN=/dev/loop0

2.Use virt-v2v to convert a windows guest and check whether install virtio-drivers during the conversion.
# virt-v2v  -ic vpx://root.75.182/data/10.73.3.19/?no_verify=1  esx5.5-win2012-x86_64 -o null --password-file /home/passwd
[   0.0] Opening the source -i libvirt -ic vpx://root.75.182/data/10.73.3.19/?no_verify=1 esx5.5-win2012-x86_64
[   1.9] Creating an overlay to protect the source from being modified
[   2.9] Opening the overlay
[  19.4] Inspecting the overlay
[  90.2] Checking for sufficient free disk space in the guest
[  90.2] Estimating space required on target for each disk
[  90.2] Converting Windows Server 2012 Datacenter to run on KVM
virt-v2v: warning: /usr/share/virt-tools/pnp_wait.exe is missing.  
Firstboot scripts may conflict with PnP.
virt-v2v: warning: there is no QXL driver for this version of Windows (6.2 
x86_64).  virt-v2v looks for this driver in /dev/loop0

The guest will be configured to use a basic VGA display driver.
virt-v2v: This guest has virtio drivers installed.
[ 119.3] Mapping filesystem data to avoid copying unused and blank areas
[ 120.3] Closing the overlay
[ 120.6] Assigning disks to buses
[ 120.6] Checking if the guest needs BIOS or UEFI to boot
[ 120.6] Initializing the target -o null
[ 120.7] Copying disk 1/1 to /var/tmp/null.qlUue8/sda (raw)
^C  (1.00/100%)


3.Check the conversion log find info about virtio-win driver
# grep copy_from_virtio_win /log
windows: copy_from_virtio_win: guest tools source ISO /dev/loop0

Result:virt-v2v can find virtio-driver from block device and install to windows guests during conversion.So change bug form ON_QA to VERIFIED.

Comment 15 errata-xmlrpc 2020-03-31 19:55:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1082


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