Bug 1209225

Summary: Allow configurable location for virtio drivers
Product: Red Hat Enterprise Linux 7 Reporter: Arik <ahadas>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: juzhou, michal.skrivanek, mzhan, ptoscano, tzheng, xiaodwan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: V2V
Fixed In Version: libguestfs-1.28.1-1.25.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 07:00:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1154205, 1172230    

Description Arik 2015-04-06 18:03:30 UTC
Description of problem:
When invoking virt-v2v from vdsm, we need a way to provide a path to virtio drivers that are mounted on the local host (from the iso-domain). This change was already merged u/s, we need it for rhel 7 as well.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
commit b8cb5c0d69e7ab8cd8598c0c49f0d65a1366cd62 on u/s

Comment 2 zhoujunqin 2015-07-06 09:44:00 UTC
Try to verify this bug with new build:
libvirt-1.2.17-1.el7.x86_64
libguestfs-1.28.1-1.43.el7.x86_64
virt-v2v-1.28.1-1.43.el7.x86_64
virtio-win-1.7.4-1.el7.noarch

Steps:

1. Check virt-v2v manual page for allowing configurable location for virtio drivers 

# man virt-v2v
...
ENABLING VIRTIO
...
        Windows        Drivers are installed from the directory pointed to by
                       "VIRTIO_WIN" environment variable
                       (/usr/share/virtio-win by default) if present
...

2. Run virt-v2 cmd for testing:

Scenario 1: Unset VIRTIO_WIN_DIR and without virtio-win pkg installed.

# unset VIRTIO_WIN_DIR

# echo $VIRTIO_WIN_DIR

# virt-v2v -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 --password-file /tmp/passwd2 esx5.5-win7-x86_64  -on esx5.5-win7-x86_64-unset 
[   0.0] Opening the source -i libvirt -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 esx5.5-win7-x86_64
[   1.0] Creating an overlay to protect the source from being modified
[   1.0] Opening the overlay
[  10.0] Initializing the target -o libvirt -os default
[  10.0] Inspecting the overlay
[  58.0] Checking for sufficient free disk space in the guest
[  58.0] Estimating space required on target for each disk
[  58.0] Converting Windows 7 Ultimate to run on KVM
virt-v2v: warning: there are no virtio drivers available for this version 
of Windows (6.1 x86_64 Client).  virt-v2v looks for drivers in 
/usr/share/virtio-win

The guest will be configured to use slower emulated devices.
virt-v2v: This guest does not have virtio drivers installed.
[  67.0] Mapping filesystem data to avoid copying unused and blank areas
[  67.0] Closing the overlay
[  67.0] Copying disk 1/1 to /var/lib/libvirt/images/esx5.5-win7-x86_64-unset-sda (raw)
    (100.00/100%)
[ 881.0] Creating output metadata
Pool default refreshed

Domain esx5.5-win7-x86_64-unset defined from /tmp/v2vlibvirtadb392.xml

[ 882.0] Finishing off

Result: Conversion finished without installing virtio-win driver to guest.

Scenario 2: Using default setting for VIRTIO_WIN_DIR and pkg virtio-win installed

# ls  /usr/share/virtio-win/
drivers  guest-agent  virtio-win-1.7.4_amd64.vfd  virtio-win-1.7.4.iso  virtio-win-1.7.4_x86.vfd  virtio-win_amd64.vfd  virtio-win.iso  virtio-win_x86.vfd

# virt-v2v -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 --password-file /tmp/passwd2 esx5.5-win7-x86_64 -on esx5.5-win7-x86_64-withvirtio
[   0.0] Opening the source -i libvirt -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 esx5.5-win7-x86_64
[   1.0] Creating an overlay to protect the source from being modified
[   1.0] Opening the overlay
[ 143.0] Initializing the target -o libvirt -os default
[ 143.0] Inspecting the overlay
[ 190.0] Checking for sufficient free disk space in the guest
[ 190.0] Estimating space required on target for each disk
[ 190.0] Converting Windows 7 Ultimate to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 200.0] Mapping filesystem data to avoid copying unused and blank areas
[ 201.0] Closing the overlay
[ 201.0] Copying disk 1/1 to /var/lib/libvirt/images/esx5.5-win7-x86_64-withvirtio-sda (raw)
    (100.00/100%)
[ 768.0] Creating output metadata
Pool default refreshed

Domain esx5.5-win7-x86_64-withvirtio defined from /tmp/v2vlibvirt20fab7.xml

[ 770.0] Finishing off

Result: Conversion finished with installing virtio-win driver to guest.

Scenario 3: Using custom VIRTIO_WIN_DIR=/root/virtio-win

3.1 After install virtio-win pkg, copy dir /usr/share/virtio-win/ to another dir, then remove virtio-win pkg.
# cp -r /usr/share/virtio-win/ .

# ls virtio-win
drivers  guest-agent  virtio-win-1.7.4_amd64.vfd  virtio-win-1.7.4.iso  virtio-win-1.7.4_x86.vfd  virtio-win_amd64.vfd  virtio-win.iso  virtio-win_x86.vfd

# pwd
/root

# export VIRTIO_WIN_DIR=/root/virtio-win

# virt-v2v -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 --password-file /tmp/passwd2 esx5.5-win7-x86_64 -on esx5.5-win7-x86_64-cc  -o null
[   0.0] Opening the source -i libvirt -ic vpx://root.4.103/tzheng-demo/10.66.106.63/?no_verify=1 esx5.5-win7-x86_64
[   1.0] Creating an overlay to protect the source from being modified
[   1.0] Opening the overlay
[ 137.0] Initializing the target -o null
[ 137.0] Inspecting the overlay
[ 183.0] Checking for sufficient free disk space in the guest
[ 183.0] Estimating space required on target for each disk
[ 183.0] Converting Windows 7 Ultimate to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 191.0] Mapping filesystem data to avoid copying unused and blank areas
[ 192.0] Closing the overlay
[ 192.0] Copying disk 1/1 to /var/tmp/null.gmroV1/sda (raw)
    (100.00/100%)
[ 720.0] Creating output metadata
[ 720.0] Finishing off

Result: Conversion finished with installing virtio-win driver to guest.


Seen above steps, move this bug from ON_QA to VERIFIED.

Comment 4 errata-xmlrpc 2015-11-19 07:00:21 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://rhn.redhat.com/errata/RHBA-2015-2183.html