Converting a Linux virtual machine using vCenter Converter fails with error: Device or resource busy
search cancel

Converting a Linux virtual machine using vCenter Converter fails with error: Device or resource busy

book

Article ID: 303333

calendar_today

Updated On:

Products

VMware

Issue/Introduction

This article identifies as issue on the operating system of the source Linux machine, that causes VMware vCenter Converter to fail. This affects all versions of VMware vCenter Converter that support hot-cloning of Linux operating systems.

Symptoms:
  • Cannot convert a Linux virtual machine using vCenter Converter
  • Converting a Linux virtual machine times out and fails
  • You see the error:
umount: cannot umount /mnt/p2v-src-root/var: Device or resource busy
  • In the VMware vCenter Converter logs, you see entries similar to:

    2012-03-13 18:47:26.568 'task-1' 4028627856 info Copying files from <IP>:/var to /mnt/p2v-src-root/var
    2012-03-13 18:47:26.569 'task-1' 4028627856 verbose LD_LIBRARY_PATH=/usr/lib/vmware-converter
    2012-03-13 18:47:26.569 'task-1' 4028627856 verbose PATH=/bin:/sbin:/usr/bin:/usr/sbin
    2012-03-13 18:47:26.569 'task-1' 4028627856 verbose Invoking /usr/lib/vmware-converter/copyFileSystem.sh with the following arguments:
    2012-03-13 18:47:26.569 'task-1' 4028627856 verbose args[0]: --sshClient
    2012-03-13 18:47:26.569 'task-1' 4028627856 verbose args[1]: /usr/lib/vmware-converter/ssh
    2012-03-13 18:47:26.569 'task-1' 4028627856 verbose args[2]: --user
    2012-03-13 18:47:26.569 'task-1' 4028627856 verbose args[3]: <username>
    2012-03-13 18:47:26.569 'task-1' 4028627856 verbose args[4]: --host
    2012-03-13 18:47:26.569 'task-1' 4028627856 verbose args[5]: <IP>
    2012-03-13 18:47:26.569 'task-1' 4028627856 verbose args[6]: --port
    2012-03-13 18:47:26.569 'task-1' 4028627856 verbose args[7]: 22
    2012-03-13 18:47:26.569 'task-1' 4028627856 verbose args[8]: --sourceMountPoint
    2012-03-13 18:47:26.569 'task-1' 4028627856 verbose args[9]: /var
    2012-03-13 18:47:26.569 'task-1' 4028627856 verbose args\[10]: --targetMountPoint
    2012-03-13 18:47:26.569 'task-1' 4028627856 verbose args\[11]: /mnt/p2v-src-root/var
    2012-03-13 18:47:26.569 'task-1' 4028627856 verbose args\[12]: --sshConfigFile
    2012-03-13 18:47:26.569 'task-1' 4028627856 verbose args\[13]: /usr/lib/vmware-converter/ssh.conf
    2012-03-13 18:47:26.569 'task-1' 4028627856 verbose args\[14]: --sourceTarOption
    2012-03-13 18:47:26.569 'task-1' 4028627856 verbose args\[15]: --sparse
    2012-03-13 18:48:12.581 'Helper' 4037016464 verbose Converter Agent Helper ServiceInstance RetrieveContent
    2012-03-13 18:53:12.722 'Helper' 4062182288 verbose Converter Agent Helper ServiceInstance RetrieveContent
    2012-03-13 18:58:12.808 'Helper' 4078959504 verbose Converter Agent Helper ServiceInstance RetrieveContent
    2012-03-13 19:03:12.857 'Helper' 4053793680 verbose Converter Agent Helper ServiceInstance RetrieveContent
    2012-03-13 19:08:12.863 'Helper' 4078959504 verbose Converter Agent Helper ServiceInstance RetrieveContent
    2012-03-13 19:13:12.916 'Helper' 4099462848 verbose Converter Agent Helper ServiceInstance RetrieveContent
    2012-03-13 19:18:12.994 'Helper' 4045405072 verbose Converter Agent Helper ServiceInstance RetrieveContent
    2012-03-13 19:23:12.975 'Helper' 4090932112 verbose Converter Agent Helper ServiceInstance RetrieveContent
    2012-03-13 19:28:13.012 'Helper' 4037016464 verbose Converter Agent Helper ServiceInstance RetrieveContent
    2012-03-13 19:33:13.062 'Helper' 4078959504 verbose Converter Agent Helper ServiceInstance RetrieveContent
    2012-03-13 19:38:13.082 'Helper' 4062182288 verbose Converter Agent Helper ServiceInstance RetrieveContent
    2012-03-13 19:43:13.089 'Helper' 4090932112 verbose Converter Agent Helper ServiceInstance RetrieveContent
    2012-03-13 19:47:27.915 'task-1' 4028627856 error /usr/lib/vmware-converter/copyFileSystem.sh did not finish producing output after 3600 seconds
    2012-03-13 19:47:27.916 'task-1' 4028627856 info Exception caught during volume copying: /usr/lib/vmware-converter/copyFileSystem.sh did not finish producing output after 3600 seconds
    2012-03-13 19:47:27.916 'task-1' 4028627856 info Unmounting partition /dev/sdb7
    2012-03-13 19:47:27.916 'task-1' 4028627856 verbose LD_LIBRARY_PATH=/usr/lib/vmware-converter
    2012-03-13 19:47:27.916 'task-1' 4028627856 verbose PATH=/bin:/sbin:/usr/bin:/usr/sbin
    2012-03-13 19:47:27.916 'task-1' 4028627856 verbose Invoking /bin/umount with the following arguments:
    2012-03-13 19:47:27.916 'task-1' 4028627856 verbose args[0]: /dev/sdb7
    2012-03-13 19:47:29.930 'task-1' 4028627856 verbose Command return code: 1; result string: umount: cannot umount /mnt/p2v-src-root/var: Device or resource busy
    2012-03-13 19:47:29.930 'task-1' 4028627856 error '/bin/umount /dev/sdb7' failed. Return code: 1; message:
    umount: cannot umount /mnt/p2v-src-root/var: Device or resource busy

    Note: For information on log locations, see Collecting diagnostic information for VMware Converter (1010633)


Environment

VMware vCenter Converter 4.0.x
VMware vCenter Converter Standalone 4.3.x
VMware vCenter Converter Standalone 5.0.x
VMware vCenter Converter 4.1.x
VMware vCenter Converter 4.2.x
VMware vCenter Converter Standalone 4.0.x

Cause

This issue occurs if a file size reported within the operating system of the source Linux operating system is inaccurate. Specifically, In Red Hat Enterprise and Fedora version 4.x operating systems, this may be caused by the /var/log/lastlog file..
The /var/log/lastlog file is used to store information about successful logins to the operating systems. In earlier versions of Red Hat Enterprise Linux and Fedora 4.x, the file size can be misrepresented if this file is corrupted.

Resolution

This issue is resolved in recent versions of Red Hat and Fedora. For more information and a patch to resolve this issue, contact Red Hat.
To workaround this issue:
  1. Log in to the operating system as the root user.
  2. Change directory to /var/log using this command:

    cd /var/log


  3. Verify if the lastlog file is excessively large. To verify this, view the folder contents using this command:

    ls -lh


  4. Run this command to delete the lastlog file:

    rm lastlog


  5. Run this command to create a new lastlog file:

    touch lastlog


  6. Retry the conversion.


Additional Information

This issue can also occur with any kind of disk corruption that may result in inaccurate file sizes. Before converting an operating system using vCenter Converter, ensure to perform a file integrity check on the source operating system. For more information, see Performing a disk check (1004003). Performing a disk check
Collecting diagnostic information for VMware Converter
使用 vCenter Converter 转换 Linux 虚拟机失败并出现错误:设备或资源繁忙 (Device or resource busy)