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 673466 - The disk size of 2k8-r2-XenPV guest will be enlarged from 100M to 50G when convert to RHEV
Summary: The disk size of 2k8-r2-XenPV guest will be enlarged from 100M to 50G when co...
Keywords:
Status: CLOSED DUPLICATE of bug 676323
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-v2v
Version: 6.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Matthew Booth
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 676778 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-28 10:20 UTC by Rita Wu
Modified: 2013-07-03 01:42 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-15 08:49:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log from LIBGUESTFS_TRACE=1 (5.58 KB, text/plain)
2011-01-28 10:20 UTC, Rita Wu
no flags Details
DM-5000G (224.23 KB, image/png)
2011-01-28 10:21 UTC, Rita Wu
no flags Details
MC-50G (340.64 KB, image/png)
2011-01-28 10:23 UTC, Rita Wu
no flags Details
ovf (5.84 KB, application/octet-stream)
2011-02-10 06:49 UTC, cshao
no flags Details

Description Rita Wu 2011-01-28 10:20:01 UTC
Created attachment 475767 [details]
log from LIBGUESTFS_TRACE=1

Description of problem:
There are 2 disks inside 2k8-r2-XenPV guest, system disk is 9.8G, and the data disk is 100M(hasn't be formatted before conversion)

# ll -h /var/lib/libvirt/images/disk3.img
-rw-r--r-- 1 root root 100M Jan 24 17:23 /var/lib/libvirt/images/disk3.img

# ll -h /var/lib/libvirt/images/rhn/xenhvm/win2008-R2.img
-rwxr-xr-x 1 root root 9.8G Jan 21 21:17 /var/lib/libvirt/images/rhn/xenhvm/win2008-R2.img


But after conversion,  The size of the 2disks will be enlarged inside Windows:
1. In Disk Management, system disk's size becomes 5000G, and the data disk's size becomes 50G (attachment:DM-5000G)
2. In My Computer, system disk's size is correct(9.8G), but the data disk's size becomes 50G (attachment:MC-50G)


Version-Release number of selected component (if applicable):
virt-v2v-0.7.1-1.el6.x86_64
libguestfs-winsupport-1.0-5.el6.x86_64
libguestfs-1.7.17-11.el6.x86_64
libvirt-0.8.7-2.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. Convert 2k8-r2-XenPV guest with 1 unformatted 100M data disk to RHEV
# LIBGUESTFS_TRACE=1 virt-v2v -ic xen+ssh://10.66.72.123 -o rhev -osd 10.66.90.115:/vol/v2vrwu1/xen_export win2k8-r2 > win2k8-r2.log 2>&1
2. After conversion, import it and then run it
3. Go to Start=>Administrative tools=>Computer Management=>Disk Management, and go to My Computer to check whether the size of your disks are correct.


Actual results:
size becomes 500*(original size)

Expected results:
size remains 

Additional info:

xml of 2k8-r2
<domain type='xen'>
  <name>win2k8-r2</name>
  <uuid>5304d184-e3df-a483-be53-40f9baad028e</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>destroy</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
    <disk type='file' device='disk'>
      <driver name='file'/>
      <source file='/var/lib/libvirt/images/rhn/xenhvm/win2008-R2.img'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='file'/>
      <source file='/var/lib/libvirt/images/disk3.img'/>
      <target dev='hdb' bus='ide'/>
    </disk>
    <interface type='bridge'>
      <mac address='00:16:36:5f:93:03'/>
      <source bridge='xenbr0'/>
      <script path='vif-bridge'/>
      <target dev='vif501.0'/>
    </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 1 Rita Wu 2011-01-28 10:21:40 UTC
Created attachment 475768 [details]
DM-5000G

Comment 2 Rita Wu 2011-01-28 10:23:00 UTC
Created attachment 475769 [details]
MC-50G

Comment 3 Rita Wu 2011-01-28 10:24:55 UTC
This issue can only be reproduced when converting to RHEV.

Comment 5 Rita Wu 2011-01-30 05:51:16 UTC
This issue won't happen when importing to FC data storage, but to NFS data storage.

Comment 6 Matthew Booth 2011-01-31 16:14:20 UTC
Can't replicate this importing raw/preallocated to RHEV/iSCSI or RHEV/NFS. Now trying importing raw/sparse to RHEV/NFS.

Comment 7 Matthew Booth 2011-01-31 17:33:41 UTC
Can't replicate this with raw/sparse either.

Can you please send the following data for the failing guest from the RHEV export storage domain:

* RHEV OVF file
* 'ls -lk' output for all disks
* 'du -k' output for all disks
* 'file' output for all disks

To locate the relevant OVF file, navigate to the top level directory of the RHEV export storage domain. On my system, this is:

/nfs/export/5bd222ce-be61-481b-9353-d69981065b60

Grep for the guest name with:

# grep -l <guestname> master/vms/*/*.ovf
master/vms/259f6ce2-a1e0-4789-ac9e-33e89d7bb6fb/259f6ce2-a1e0-4789-ac9e-33e89d7bb6fb.ovf

Attach the above file to the BZ. Search in that file for both <File> elements. Each will have an ovf:href element, e.g.:

<File ovf:href="84a66880-9f57-48b2-a230-5cfdd40deac6/1d7e6846-8acc-472a-a492-5b1898f1a131" ovf:id="1d7e6846-8acc-472a-a492-5b1898f1a131" ovf:size="16106127360" ovf:description="imported by virt-v2v"/>

For each, ovf:href is the path of the relevant image under images. e.g. For the above image, I would need the output of:

# ls -lk images/84a66880-9f57-48b2-a230-5cfdd40deac6/1d7e6846-8acc-472a-a492-5b1898f1a131
# du -k images/84a66880-9f57-48b2-a230-5cfdd40deac6/1d7e6846-8acc-472a-a492-5b1898f1a131
# file images/84a66880-9f57-48b2-a230-5cfdd40deac6/1d7e6846-8acc-472a-a492-5b1898f1a131

Thanks,

Matt

Comment 8 Matthew Booth 2011-02-09 16:15:02 UTC
I wonder if this is related to bug 676323. The ratio is right.

Comment 9 cshao 2011-02-10 06:48:05 UTC
(In reply to comment #7)
> Can't replicate this with raw/sparse either.
> 
> Can you please send the following data for the failing guest from the RHEV
> export storage domain:
> 
> * RHEV OVF file
> * 'ls -lk' output for all disks
> * 'du -k' output for all disks
> * 'file' output for all disks
> 

After convert:
1. Upload RHEV OVF file to attachment.

2. 'ls -lk' output for all disks
cat ./ff2d5906-4920-4581-b318-6ae1726493c1/245f8a7b-82e8-495f-8d54-eb14ff8e0749.meta 
DOMAIN=269808c9-c9e8-49f7-8f45-f9a7c5c6e95a
VOLTYPE=LEAF
CTIME=1297309444
FORMAT=RAW
IMAGE=ff2d5906-4920-4581-b318-6ae1726493c1
DISKTYPE=1
PUUID=00000000-0000-0000-0000-000000000000
LEGALITY=LEGAL
MTIME=1297309444
POOL_UUID=00000000-0000-0000-0000-000000000000
SIZE=10485760000
TYPE=PREALLOCATED
DESCRIPTION=Exported by virt-v2v
EOF
[root@localhost images]# ls -lk ./ff2d5906-4920-4581-b318-6ae1726493c1/245f8a7b-82e8-495f-8d54-eb14ff8e0749
-rw-r--r-- 1 vdsm kvm 10240000 Feb  9 19:55 ./ff2d5906-4920-4581-b318-6ae1726493c1/245f8a7b-82e8-495f-8d54-eb14ff8e0749


3. 'du -k' output for all disks
[root@localhost images]# du -k ./ff2d5906-4920-4581-b318-6ae1726493c1/245f8a7b-82e8-495f-8d54-eb14ff8e0749
10260124	./ff2d5906-4920-4581-b318-6ae1726493c1/245f8a7b-82e8-495f-8d54-eb14ff8e0749


4. 'file' output for all disks
[root@localhost images]# file ./ff2d5906-4920-4581-b318-6ae1726493c1/245f8a7b-82e8-495f-8d54-eb14ff8e0749
./ff2d5906-4920-4581-b318-6ae1726493c1/245f8a7b-82e8-495f-8d54-eb14ff8e0749: x86 boot sector; partition 1: ID=0x7, active, starthead 32, startsector 2048, 204800 sectors; partition 2: ID=0x7, starthead 223, startsector 206848, 20271104 sectors



Before convert:
1 'ls -lk' output for all disks
[root@localhost libvirt]# ls -lk /var/lib/libvirt/images/rhn/xenhvm/win2008-R2.img
-rwxr-xr-x 1 root root 10240000 Jan 21 21:17 /var/lib/libvirt/images/rhn/xenhvm/win2008-R2.img
[root@localhost libvirt]# ls -lk /var/lib/libvirt/images/disk3.img
-rw-r--r-- 1 root root 102400 Jan 24 17:23 /var/lib/libvirt/images/disk3.img


2 'du -k' output for all disks
[root@localhost libvirt]# du -k /var/lib/libvirt/images/rhn/xenhvm/win2008-R2.img
10250020	/var/lib/libvirt/images/rhn/xenhvm/win2008-R2.img
[root@localhost libvirt]# du -k /var/lib/libvirt/images/disk3.img
102508	/var/lib/libvirt/images/disk3.img


3 'file' output for all disks
[root@localhost libvirt]# file /var/lib/libvirt/images/rhn/xenhvm/win2008-R2.img
/var/lib/libvirt/images/rhn/xenhvm/win2008-R2.img: x86 boot sector; partition 1: ID=0x7, active, starthead 32, startsector 2048, 204800 sectors; partition 2: ID=0x7, starthead 223, startsector 206848, 20271104 sectors
[root@localhost libvirt]# file /var/lib/libvirt/images/disk3.img
/var/lib/libvirt/images/disk3.img: data

Comment 10 cshao 2011-02-10 06:49:46 UTC
Created attachment 477976 [details]
ovf

Comment 11 Matthew Booth 2011-02-11 09:48:37 UTC
*** Bug 676778 has been marked as a duplicate of this bug. ***

Comment 12 Matthew Booth 2011-02-14 17:31:11 UTC
I think this bug might be a duplicate of bug 676323. Could you please try this again with virt-v2v-0.7.1-3.el6 from brew?

Comment 13 Huang Wenlong 2011-02-15 06:37:39 UTC
Hi,Matt

I test the bug in rhel6 : 
virt-v2v-0.7.1-3.el6.x86_64
libguestfs-1.7.17-12.el6.x86_64
libguestfs-*-1.7.17-12.el6.x86_64
libvirt-0.8.7-6.el6.x86_64
febootstrap-2.11-6.el6.x86_64
hivex-1.2.4-3.el6.x86_64
libguestfs-winsupport-1.0-5.el6.x86_64
augeas-libs-0.7.2-4.el6.x86_64 

I convert two guest win2k8-r2 and rhel5u6 from xen host  to rhev-m 
it can not be reproduced ,the disk info is correct .

Comment 14 Huang Wenlong 2011-02-15 06:38:16 UTC
(In reply to comment #12)
> I think this bug might be a duplicate of bug 676323. Could you please try this
> again with virt-v2v-0.7.1-3.el6 from brew?

Hi,Matt

I test the bug in rhel6 : 
virt-v2v-0.7.1-3.el6.x86_64
libguestfs-1.7.17-12.el6.x86_64
libguestfs-*-1.7.17-12.el6.x86_64
libvirt-0.8.7-6.el6.x86_64
febootstrap-2.11-6.el6.x86_64
hivex-1.2.4-3.el6.x86_64
libguestfs-winsupport-1.0-5.el6.x86_64
augeas-libs-0.7.2-4.el6.x86_64 

I convert two guest win2k8-r2 and rhel5u6 from xen host  to rhev-m 
it can not be reproduced ,the disk info is correct .

Comment 15 Matthew Booth 2011-02-15 08:49:10 UTC
Thanks, Wenlong. I'm going to close this as a dupe.

*** This bug has been marked as a duplicate of bug 676323 ***


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