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 1168865 - warning: /files/boot/grub/device.map/hd0 references unknown device "vda" when convert a local guest with virtio disk to openstack server (-i disk))
Summary: warning: /files/boot/grub/device.map/hd0 references unknown device "vda" when...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-28 09:41 UTC by zhoujunqin
Modified: 2016-09-18 08:28 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-23 14:50:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
detail debug info for virt-v2v (450.10 KB, text/plain)
2014-11-28 09:41 UTC, zhoujunqin
no flags Details
virt-p2v-vda-log (92.76 KB, application/zip)
2016-09-18 07:33 UTC, mxie@redhat.com
no flags Details

Description zhoujunqin 2014-11-28 09:41:06 UTC
Created attachment 962407 [details]
detail debug info for virt-v2v

Description of problem:
Warning message showed during convert a local guest with virtio disk to openstack server with option "-i disk"

virt-v2v: warning: /files/boot/grub/device.map/hd0 references unknown
device "vda".  You may have to fix this entry manually after conversion.
virt-v2v: warning: /files/etc/sysconfig/grub/boot references unknown device
"vda".  You may have to fix this entry manually after conversion.

Version-Release number of selected component (if applicable):
libguestfs-1.28.1-1.14.el7.x86_64
virt-v2v-1.28.1-1.14.el7.x86_64
augeas-1.1.0-17.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare a local guest with virtio disk installed:
# virsh dumpxml kvm-rhel6.6-x64
...

    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/kvm-rhel6.6-x64'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </disk>
...

2. Use virt-v2v convert this guest to openstack server:

# source  keystonerc_admin_rhel7

~(keystone_admin)]# virt-v2v  -i disk /var/lib/libvirt/images/kvm-rhel6.6-x64  -o glance
[   0.0] Opening the source -i disk /var/lib/libvirt/images/kvm-rhel6.6-x64
[   0.0] Creating an overlay to protect the source from being modified
[   1.0] Opening the overlay
[   4.0] Initializing the target -o glance
[   8.0] Inspecting the overlay
[  17.0] Checking for sufficient free disk space in the guest
[  17.0] Estimating space required on target for each disk
[  17.0] Converting Red Hat Enterprise Linux Server release 6.6 (Santiago) to run on KVM
virt-v2v: warning: /files/boot/grub/device.map/hd0 references unknown -------------------------->>unexpected warning messages
device "vda".  You may have to fix this entry manually after conversion.
virt-v2v: warning: /files/etc/sysconfig/grub/boot references unknown device
"vda".  You may have to fix this entry manually after conversion.
virt-v2v: This guest has virtio drivers installed.
[  48.0] Mapping filesystem data to avoid copying unused and blank areas
[  48.0] Closing the overlay
[  49.0] Copying disk 1/1 to /var/tmp/glance.6nwMHW/sda (qcow2)
    (100.00/100%)
[ 101.0] Creating output metadata
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | 02ab981af95513c71fb5008f0a3f21ff     |
| container_format | bare                                 |
| created_at       | 2014-11-28T07:33:27                  |
| deleted          | False                                |
| deleted_at       | None                                 |
| disk_format      | qcow2                                |
| id               | 0cc2e824-729b-440a-a20b-86d3d41d755c |
| is_public        | False                                |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | kvm-rhel6                            |
| owner            | c3a9c07d56aa401b84da161f28cfc06f     |
| protected        | False                                |
| size             | 3388866560                           |
| status           | active                               |
| updated_at       | 2014-11-28T07:34:02                  |
| virtual_size     | None                                 |
+------------------+--------------------------------------+
+----------------------------+--------------------------------------+
| Property                   | Value                                |
+----------------------------+--------------------------------------+
| Property 'architecture'    | x86_64                               |
| Property 'hw_disk_bus'     | virtio                               |
| Property 'hw_vif_model'    | virtio                               |
| Property 'hypervisor_type' | kvm                                  |
| Property 'os_distro'       | rhel                                 |
| Property 'os_type'         | linux                                |
| Property 'os_version'      | 6.6                                  |
| Property 'vm_mode'         | hvm                                  |
| checksum                   | 02ab981af95513c71fb5008f0a3f21ff     |
| container_format           | bare                                 |
| created_at                 | 2014-11-28T07:33:27                  |
| deleted                    | False                                |
| deleted_at                 | None                                 |
| disk_format                | qcow2                                |
| id                         | 0cc2e824-729b-440a-a20b-86d3d41d755c |
| is_public                  | False                                |
| min_disk                   | 0                                    |
| min_ram                    | 2048                                 |
| name                       | kvm-rhel6                            |
| owner                      | c3a9c07d56aa401b84da161f28cfc06f     |
| protected                  | False                                |
| size                       | 3388866560                           |
| status                     | active                               |
| updated_at                 | 2014-11-28T07:34:03                  |
| virtual_size               | None                                 |
+----------------------------+--------------------------------------+
[ 142.0] Finishing off


Actual results:
As $step2.

Expected results:
No warning message showing.

Additional info:
1. I will attach detail log.

2. There is no such warning message showing when convert with guest name:
eg: # virt-v2v -o glance kvm-rhel6.6-x64 -on kvm-rhel6.6-x64-22222

3. Get same result when use "-i disk" $disk-name/ $guest-name" when convert to rhev server.

Comment 1 Richard W.M. Jones 2014-11-28 09:59:09 UTC
(In reply to zhoujunqin from comment #0)
> Created attachment 962407 [details]
> detail debug info for virt-v2v
> 
> Description of problem:
> Warning message showed during convert a local guest with virtio disk to
> openstack server with option "-i disk"

The problem here is you're using -i disk ...

> 1. Prepare a local guest with virtio disk installed:
> # virsh dumpxml kvm-rhel6.6-x64
> ...
> 
>     <disk type='file' device='disk'>
>       <driver name='qemu' type='qcow2'/>
>       <source file='/var/lib/libvirt/images/kvm-rhel6.6-x64'/>
>       <target dev='vda' bus='virtio'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x07'
> function='0x0'/>
>     </disk>

... but you have the libvirt XML.

If you have the libvirt XML, you should be passing it to virt-v2v, ie.
you should use -i libvirt (the default) or -i libvirtxml.

       -i disk
           Set the input method to disk.

           In this mode you can read a virtual machine disk image with no
           metadata.  virt-v2v tries to guess the best default metadata.  This
           is usually adequate but you can get finer control (eg. of memory
           and vCPUs) by using -i libvirtxml instead.  Only guests that use a
           single disk can be imported this way.

-i disk is only a testing / last resort option where you don't have
the XML.

> 2. There is no such warning message showing when convert with guest name:
> eg: # virt-v2v -o glance kvm-rhel6.6-x64 -on kvm-rhel6.6-x64-22222

This is using -i libvirt (the default mode), so it gets the libvirt XML,
so it is able to see that the source disk uses virtio-blk.

Comment 3 zhoujunqin 2014-11-28 10:32:54 UTC
(In reply to Richard W.M. Jones from comment #1)

Hi rjones,
yes, it's a guest existing in my host, i use virsh dumpxml $guest to show the guest with virtio driver:

and i just now tried with option "-i libvirtxml"

# virt-v2v -i libvirtxml /var/lib/libvirt/images/kvm-rhel6.6-x64.xml -o glance 
[   0.0] Opening the source -i libvirtxml /var/lib/libvirt/images/kvm-rhel6.6-x64.xml
[   0.0] Creating an overlay to protect the source from being modified
[   0.0] Opening the overlay
[   2.0] Initializing the target -o glance
[   4.0] Inspecting the overlay
[  11.0] Checking for sufficient free disk space in the guest
[  11.0] Estimating space required on target for each disk
[  11.0] Converting Red Hat Enterprise Linux Server release 6.6 (Santiago) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[  41.0] Mapping filesystem data to avoid copying unused and blank areas
[  41.0] Closing the overlay
[  41.0] Copying disk 1/1 to /var/tmp/glance.0gW377/sda (qcow2)
    (100.00/100%)
[  77.0] Creating output metadata
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | 5fce1a81017c629d037c199dc2c22c52     |
| container_format | bare                                 |
| created_at       | 2014-11-28T10:10:56                  |
| deleted          | False                                |
| deleted_at       | None                                 |
| disk_format      | qcow2                                |
| id               | 7a92a197-1bf8-4843-9f3c-068115d44734 |
| is_public        | False                                |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | kvm-rhel6.6-x64                      |
| owner            | c3a9c07d56aa401b84da161f28cfc06f     |
| protected        | False                                |
| size             | 3389063168                           |
| status           | active                               |
| updated_at       | 2014-11-28T10:11:32                  |
| virtual_size     | None                                 |
+------------------+--------------------------------------+
+----------------------------+--------------------------------------+
| Property                   | Value                                |
+----------------------------+--------------------------------------+
| Property 'architecture'    | x86_64                               |
| Property 'hw_disk_bus'     | virtio                               |
| Property 'hw_vif_model'    | virtio                               |
| Property 'hypervisor_type' | kvm                                  |
| Property 'os_distro'       | rhel                                 |
| Property 'os_type'         | linux                                |
| Property 'os_version'      | 6.6                                  |
| Property 'vm_mode'         | hvm                                  |
| checksum                   | 5fce1a81017c629d037c199dc2c22c52     |
| container_format           | bare                                 |
| created_at                 | 2014-11-28T10:10:56                  |
| deleted                    | False                                |
| deleted_at                 | None                                 |
| disk_format                | qcow2                                |
| id                         | 7a92a197-1bf8-4843-9f3c-068115d44734 |
| is_public                  | False                                |
| min_disk                   | 0                                    |
| min_ram                    | 1024                                 |
| name                       | kvm-rhel6.6-x64                      |
| owner                      | c3a9c07d56aa401b84da161f28cfc06f     |
| protected                  | False                                |
| size                       | 3389063168                           |
| status                     | active                               |
| updated_at                 | 2014-11-28T10:11:33                  |
| virtual_size               | None                                 |
+----------------------------+--------------------------------------+
[ 118.0] Finishing off

Result: there is no warning message any more.

And will you fix this bug for the scenario the user just have image disk left or improve the warning message tell the user cannot do that, please take into consideration, thanks.

Comment 5 Richard W.M. Jones 2015-09-23 14:50:18 UTC
I'm closing this but I believe it's NOTABUG.  If you use -i disk,
then virt-v2v essentially guesses what the source disk driver is.
If you pass the XML, then virt-v2v doesn't have to guess.  Virt-v2v
doesn't have the information to always guess correctly when using
-i disk.

Comment 7 mxie@redhat.com 2016-09-18 07:33:22 UTC
Created attachment 1202118 [details]
virt-p2v-vda-log


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