Bug 609525

Summary: /boot/grub/device.map isn't updated
Product: Red Hat Enterprise Linux 5 Reporter: Matthew Booth <mbooth>
Component: virt-v2vAssignee: Matthew Booth <mbooth>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.6CC: ajia, cshao, llim, mbooth, mkenneth, mshao, rjones, rwu, yupzhang
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: virt-v2v-0.6.1-1.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 609448
: 677262 (view as bug list) Environment:
Last Closed: 2011-02-14 08:58:45 UTC Type: ---
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: 609448    
Bug Blocks: 677262    
Attachments:
Description Flags
Device Updated successfully-conversion.log
none
fails to update device.map-kvm-RHEL-48-32-conversion.log
none
virt-v2v.conf
none
RHEL-4.8-32_conversion.log none

Comment 1 Rita Wu 2010-07-16 08:06:06 UTC
Verified on virt-v2v-0.6.1-1.el5.
Scenario 1: installed virtio drivers
Before conversion:
# cat /boot/grub/device.map 
# this device map was generated by anaconda
(hd0)     /dev/sda

After conversion:

# cat /boot/grub/device.map
# this device map was generated by anaconda
(hd0)     /dev/vda


Scenario 1: didn't install virtio drivers(rhel3u9)
Before conversion:
# cat /boot/grub/device.map 
# this device map was generated by anaconda
(hd0)     /dev/sda

After conversion:

# cat /boot/grub/device.map
# this device map was generated by anaconda
(hd0)     /dev/sda

Comment 3 Rita Wu 2010-07-20 10:55:48 UTC
Created attachment 433127 [details]
Device Updated successfully-conversion.log

Retest it. It seems some works, some fails.

#############################
It works for kvm-rhel55-32 
#############################
Before conversion:
# cat /boot/grub/device.map 
# this device map was generated by anaconda
(hd0)     /dev/sda

After conversion:

# cat /boot/grub/device.map
# this device map was generated by anaconda
(hd0)     /dev/vda

Comment 4 Rita Wu 2010-07-20 11:00:25 UTC
Created attachment 433129 [details]
fails to update device.map-kvm-RHEL-48-32-conversion.log

fails on kvm-rhel48-32 also ESX3.5-rhel55-32,etc
##########################
fails on kvm-rhel48-32 
##########################
after conversion
# cat /boot/grub/device.map 
# this device map was generated by anaconda
(fd0)     /dev/fd0
(hd0)     /dev/hda
[root@dhcp-66-92-60 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       18G  3.1G   14G  19% /
/dev/vda1              99M   14M   80M  15% /boot
none                  252M     0  252M   0% /dev/shm
[root@dhcp-66-92-60 ~]# cat /etc/fstab 
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
/dev/hdc                /media/cdrom            auto    pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0

########################
cleankvm-rhel48-32.xml 
#######################
]# virsh dumpxml cleankvm-RHEL-4.8-32.raw
<domain type='kvm'>
  <name>cleankvm-RHEL-4.8-32.raw</name>
  <uuid>2104208f-161e-4ea5-5289-93f2579b45f5</uuid>
  <memory>524288</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='rhel5.4.0'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' cache='none'/>
      <source file='/media/disk-1/cleankvm/raw/cleankvm-RHEL-4.8-32.raw'/>
      <target dev='vda' bus='virtio'/>
    </disk>
    <interface type='network'>
      <mac address='54:52:00:3f:2f:01'/>
      <source network='default'/>
      <model type='virtio'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/12'/>
      <target port='0'/>
    </serial>
    <console type='pty' tty='/dev/pts/12'>
      <source path='/dev/pts/12'/>
      <target port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
  </devices>
</domain>

Comment 5 Matthew Booth 2010-09-14 15:40:25 UTC
I can't reproduce this failure. I have tested this exact image (kvm/raw/RHEL-4.8-32.raw), and device.map is updated as expected.

If you can still reproduce, can you please provide:

- Exact version of virt-v2v tested
- Domain XML *before* conversion

Matt

Comment 6 cshao 2010-09-15 05:00:15 UTC
(In reply to comment #5)
> I can't reproduce this failure. I have tested this exact image
> (kvm/raw/RHEL-4.8-32.raw), and device.map is updated as expected.
> 
> If you can still reproduce, can you please provide:
> 
> - Exact version of virt-v2v tested
> - Domain XML *before* conversion
> 
> Matt

I can reproduce this failure on kvm-rhel4.8-32.

1.Exact version of virt-v2v tested.

virt-v2v-0.6.1-2.el5
libguestfs-1.2.7-1.el5.6

2. Domain XML *before* conversion

<domain type='xen'>
  <name>kvm-48-32</name>
  <uuid>7915da67-5dcf-8386-e26f-fceb81f3f55d</uuid>
  <memory>524288</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='xenfv'>hvm</type>
    <loader>/usr/lib/xen/boot/hvmloader</loader>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
    <disk type='file' device='disk'>
      <driver name='file'/>
      <source file='/root/xen/RHEL-4.8-32.raw'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <interface type='bridge'>
      <mac address='00:16:36:6a:cf:8c'/>
      <source bridge='xenbr0'/>
      <script path='vif-bridge'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
  </devices>
</domain>

Comment 7 Matthew Booth 2010-09-15 09:03:24 UTC
I've just had a thought. Can you also provide the version of augeas-libs you have installed?

Comment 8 cshao 2010-09-15 09:15:01 UTC
(In reply to comment #7)
> I've just had a thought. Can you also provide the version of augeas-libs you
> have installed?

augeas-libs-0.7.2-1.el5.3

Comment 9 Matthew Booth 2010-09-15 09:50:21 UTC
I think that's the problem. virt-v2v should probably depend on augeas-libs-0.7.2-2.el5. Can you update augeas-libs and retry?

Comment 10 cshao 2010-09-15 10:35:50 UTC
(In reply to comment #9)
> I think that's the problem. virt-v2v should probably depend on
> augeas-libs-0.7.2-2.el5. Can you update augeas-libs and retry?

Hi Matt,  there is no augeas-libs-0.7.2-2.el5 in brewweb and rhn channel. 
So I can't update augeas-libs, sorry.
Can you provide augeas-libs-0.7.2-2.el5 for retesting? 
Thanks.

Comment 11 Matthew Booth 2010-09-15 13:09:44 UTC
(In reply to comment #6)
> I can reproduce this failure on kvm-rhel4.8-32.
> 
> 1.Exact version of virt-v2v tested.
> 
> virt-v2v-0.6.1-2.el5
> libguestfs-1.2.7-1.el5.6
> 
> 2. Domain XML *before* conversion
> 
> <domain type='xen'>
>   <name>kvm-48-32</name>
>   <uuid>7915da67-5dcf-8386-e26f-fceb81f3f55d</uuid>
>   <memory>524288</memory>
>   <currentMemory>524288</currentMemory>
>   <vcpu>1</vcpu>
>   <os>
>     <type arch='x86_64' machine='xenfv'>hvm</type>
>     <loader>/usr/lib/xen/boot/hvmloader</loader>
>     <boot dev='hd'/>
>   </os>

This is xen domain metadata for a kvm guest? Are you sure that the image and domain metadata you're using match up?

Matt

Comment 12 Matthew Booth 2010-09-15 13:33:35 UTC
So, augeas isn't the issue. I've also tried this with the wrong metadata, so that isn't the issue either. I believe the disk image you're using is the same one llim sent to me.

To try to pin this down, could you please attach:

* The full command line you are running.
* The contents of the virt-v2v.conf you are using.
* The contents of /etc/fstab and /boot/grub/device.map both before and after conversion.
* The full output of virt-v2v run with LIBGUESTFS_TRACE=1

All of the above must be for the same execution, so sorry for the duplicate requests. Somewhere we must be doing something different. It's in there somewhere!

Comment 13 cshao 2010-09-16 03:38:09 UTC
(In reply to comment #12)
> So, augeas isn't the issue. I've also tried this with the wrong metadata, so
> that isn't the issue either. I believe the disk image you're using is the same
> one llim sent to me.
> 
> To try to pin this down, could you please attach:
> 
> * The full command line you are running.
> * The contents of the virt-v2v.conf you are using.
> * The contents of /etc/fstab and /boot/grub/device.map both before and after
> conversion.
> * The full output of virt-v2v run with LIBGUESTFS_TRACE=1
> 
> All of the above must be for the same execution, so sorry for the duplicate
> requests. Somewhere we must be doing something different. It's in there
> somewhere!

I can reproduce this failure on kvm-rhel4.8-32.

1. * The full command line you are running.
# LIBGUESTFS_TRACE=1 virt-v2v -i libvirtxml -o rhev -osd 10.66.90.115:/vol/v2vrwu2/esx_export RHEL-4.8-32.raw.xml 2>&1 > /root/xen/RHEL-4.8-32_conversion.log

2. * The contents of the virt-v2v.conf you are using.
please see attachment 'virt-v2v.conf'

3. * The contents of /etc/fstab and /boot/grub/device.map both before and after
conversion.
++++++++++++++++++
before conversion
++++++++++++++++++
# cat /boot/grub/device.map 
# this device map was generated by anaconda
(fd0)     /dev/fd0
(hd0)     /dev/vda
# cat /etc/fstab 
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
/dev/hdc                /media/cdrom            auto    pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0
 
+++++++++++++++++++++++++
after conversion
+++++++++++++++++++++++++
# cat /boot/grub/device.map 
# this device map was generated by anaconda
(fd0)     /dev/fd0
(hd0)     /dev/vda
# cat /etc/fstab 
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
/dev/hdc                /media/cdrom            auto    pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0



4. * The full output of virt-v2v run with LIBGUESTFS_TRACE=1
please see attachment 'RHEL-4.8-32_conversion.log'

5. # cat RHEL-4.8-32.raw.xml
<domain type='kvm'>
  <name>RHEL-4.8-32-raw</name>
  <uuid>aef21107-ef24-b42a-3a06-8d1e0ff4f8cc</uuid>
  <memory>524288</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='rhel5.4.0'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' cache='none'/>
      <source file='/root/xen/RHEL-4.8-32.raw'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <interface type='bridge'>
      <mac address='54:52:00:31:1f:4c'/>
      <source bridge='virbr0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
  </devices>
</domain>

Comment 14 cshao 2010-09-16 03:38:46 UTC
Created attachment 447617 [details]
virt-v2v.conf

Comment 15 cshao 2010-09-16 03:39:16 UTC
Created attachment 447618 [details]
RHEL-4.8-32_conversion.log

Comment 16 cshao 2010-09-16 05:38:07 UTC
(In reply to comment #12)
> So, augeas isn't the issue. I've also tried this with the wrong metadata, so
> that isn't the issue either. I believe the disk image you're using is the same
> one llim sent to me.
> 
> To try to pin this down, could you please attach:
> 
> * The full command line you are running.
> * The contents of the virt-v2v.conf you are using.
> * The contents of /etc/fstab and /boot/grub/device.map both before and after
> conversion.
> * The full output of virt-v2v run with LIBGUESTFS_TRACE=1
> 
> All of the above must be for the same execution, so sorry for the duplicate
> requests. Somewhere we must be doing something different. It's in there
> somewhere!

I am sorry for the comment 13, I used the wrong image to test.

Comment 17 cshao 2010-09-16 10:53:59 UTC
I test in the below guest, I can't reproduce this failure. and device.map is updated as expected.

rhel5u4-32b-xen-pv; 
rhel4u8-32-xen-hv; 
ESX3.5-RHEL5.5-32b; 
ESX4.0-RHEL4.8-32b
kvm-rhel5u5-64.img

before conversion
# cat /boot/grub/device.map
# this device map was generated by anaconda
(hd0)     /dev/hda


after conversion
# cat /boot/grub/device.map
# this device map was generated by anaconda
(hd0)     /dev/vda


So change the bug status to verified.

Comment 18 yuping zhang 2011-02-14 08:47:48 UTC
We reproduce this issue on virt-v2v-0.6.3-5.el5.

Guest ESX3.5-RHEL4.8-64b,ESX4.1-RHEL4.8-64b
Before conversion
# cat /boot/grub/device.map 
# this device map was generated by anaconda
(fd0)     /dev/fd0
(hd0)     /dev/sda

After conversion
# cat /boot/grub/device.map 
# this device map was generated by anaconda
(fd0)     /dev/fd0
(hd0)     /dev/sda

I cannot reproduce this issue on rhel4u8-32b-hv-raw-intel,ESX4.1-RHEL5.6-32b,ESX4.1-RHEL5.6-64b,RHEL-5.5-64-raw and rhel5u6-32b-kvm.

Comment 19 Yewei Shao 2011-02-14 08:58:45 UTC
This original bug is for rhel 5.6, so need to open and clone a new bug to rhel 5.7. Close now.