Forum Stats

  • 3,750,408 Users
  • 2,250,174 Discussions


Migrating from oracle vm to kvm using virt-v2v fails with time out

Moh.Sayed Member Posts: 33 Red Ribbon
edited Jan 21, 2021 8:10AM in Oracle VM Server for x86

we are migrating our VMs from Oracle VM 3.4.4 to oracle linux kvm using the virt-v2v tool as per the blog

we have successfully migrated VM if its hard is about 10 or 20 GB

with larger HD disk like (60GB or more ) we're getting the following error

[ 138.4] Copying disk 1/2 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.c5gUOS/nbdkit0.sock", "file.export": "/" } (raw)

nbdkit: python[1]: error: /var/tmp/v2v.aoOHD7/ open: error: ['Traceback (most recent call last):\n', ' File "/var/tmp/v2v.aoOHD7/", line 192, in open\n  raise RuntimeError("timed out waiting for disk to become unlocked")\n', 'RuntimeError: timed out waiting for disk to become unlocked\n']

qemu-img: Could not open 'json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.c5gUOS/nbdkit0.sock", "file.export": "/" }': Failed to read option reply: Unexpected end-of-file before all bytes were read


  • Nik
    Nik Member Posts: 2,791 Bronze Crown


    According this: it's look like timeout fixed to 5 min.

    How long virt-v2v work before show error ? Is this time near 5 min ?

    In case You have support - try open SR for this problem.

    For test reason You can try increase timeout in this file.



  • Moh.Sayed
    Moh.Sayed Member Posts: 33 Red Ribbon

    Yes you are right,

    I could open this file, and found the following :

      38 timeout = 5*60


      185   endt = time.time() + timeout

    186   while True:

      187     time.sleep(5)

      188     disk = disk_service.get()

      189     if disk.status == types.DiskStatus.OK:

      190       break

      191     if time.time() > endt:

      192       raise RuntimeError("timed out waiting for disk to become unlocked")

    however, this file is generated only at runtime and every time in different path


    How could I locate the original file to update ?

  • Nik
    Nik Member Posts: 2,791 Bronze Crown


    Try just use find command on KVM host:

       find / -mount -name



  • Moh.Sayed
    Moh.Sayed Member Posts: 33 Red Ribbon

    Finally I have a successful migration.

    I did not find the file, it seems it is generated only at runtime. so I lunched v2v tool then open the file and updated it

    I increased the timeout, and the migration completed successfully.

    I have reviewed python code, and here is the process done by v2v :

    - v2v read the disk info from oracle vm

    - v2v ask ovirt engine to create an image with the same size

    v2v wait ( hard-coded 5 min ) for ovirt to complete creating the disk then begin the transfer.

    I found that ovirt creates the image in about 20 min which exceeds the 5 min timeout and hence the error

    the slow may be due to the NFS domain i'm using or network performance.

    what I did is that I update the time out in the python file to 90 min

    after the update, v2v waited for ovirt to create the image, once image task is completed in ovirt, v2v started the transfer which completed successfully.

  • User_CI3CX
    User_CI3CX Member Posts: 2 Red Ribbon
    edited Sep 7, 2021 8:20PM

    Ok so I ran

    find / -mount -name

    and see it is created when I run the virt-v2v command. If I modify the parameter quickly will that work? I'll give it a try and see what happens.

    EDIT: Editing the new file before virt-v2v copies the image files works.