virt-v2v error while migrating from Xen to RHEV

Solution Verified - Updated -

Issue

Received the following error while migrating Xen guests to RHEV 2.2 using virt-v2v

# virt-v2v -f /etc/virt-v2v.conf -o rhev -ic xen+ssh://root@10.11.243.112 -osd 10.11.212.214:/vol/rhev_test/export 10.11.212.214 
virt-v2v: Didn't write full volume. Expected 30 
bytes, wrote 30005789184 bytes. 
virt-v2v:Failed to unmount 10.52.11.172:/data/Export. Command exited with status 1. Output was: umount: /tmp/XaxSJ9I5Dy: device is busy 
umount: /tmp/XaxSJ9I5Dy: device is busy 

virt-v2v: Failed to remove mount directory /tmp/XaxSJ9I5Dy: Device or resource busy 

Envirornment

  • Xen
  • RHEV 2.2
  • virt-v2v-0.6.1-2.el5
    
  • RHEL 5.5

Resolution

The following BZ addresses this issue:

https://bugzilla.redhat.com/show_bug.cgi?id=621116

This has been fixed in virt-v2v-0.6.3-1.el5

Root Cause

When a storage volume was fetched over SSH, its size was being detected with 'stat -c %s'. While this works fine for files, it doesn't return the correct size of a block device and returns the size of the block device inode instead.The fix is to use the output of 'blockdev --getsize64' for block devices, and stat as before for regular files.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content