VMware Cloud Community
Jyytuki
Contributor
Contributor

How to specify the library ( /lib ) path vCenter Converter Standalone uses to convert a Linux machine

After some updates to our Linux Debian server we tried to virtualize it with vCenter Converter Standalone. Before the update this process worked multiple times, but now we got a "Unable to reconfigure the destination virtual machine." error. I'll paste the more specific message at the end of the post. After reading the error log and doing some research I came to the conclusion that the converter needs to find some modules in /lib folder and the update moved the files from /lib to /lib/i386-linux-gnu.

How do I tell the converter that those files exist in different folder?

An update about the situation:

Despite the error the converted machine seems to work and the modules can be found from the virtual machine.

Here is the error:

FAILED: An error occurred during the conversion: ' * Looking for deps of module scsi_mod * * Looking for deps of module sd_mod * * Looking for deps of module mptspi * * Looking for deps of module mptscsih * * Looking for deps of module BusLogic * * Looking for deps of module ahci * * Looking for deps of module ide-disk * Cannot find in 4.9.0-6-686-pae module ide-disk * Looking for deps of module pcnet32 * fstab file is /mnt/p2v-src-root/etc/fstab * found root filesystem type as ext3 * Looking for deps of module ext3 * Cannot find in 4.9.0-6-686-pae module ext3 * found root filesystem mount options as errors=remount-ro * processed root filesystem mount options are errors=remount-ro * busybox mount options are * new root will not be mounted as read-only * printing module list: * /mnt/p2v-src-root/lib/modules/4.9.0-6-686-pae/kernel/drivers/scsi/scsi_mod.ko * /mnt/p2v-src-root/lib/modules/4.9.0-6-686-pae/kernel/drivers/scsi/sd_mod.ko * /mnt/p2v-src-root/lib/modules/4.9.0-6-686-pae/kernel/drivers/message/fusion/mptspi.ko * /mnt/p2v-src-root/lib/modules/4.9.0-6-686-pae/kernel/drivers/message/fusion/mptscsih.ko * /mnt/p2v-src-root/lib/modules/4.9.0-6-686-pae/kernel/drivers/scsi/BusLogic.ko * /mnt/p2v-src-root/lib/modules/4.9.0-6-686-pae/kernel/drivers/ata/ahci.ko * /mnt/p2v-src-root/lib/modules/4.9.0-6-686-pae/kernel/drivers/net/ethernet/amd/pcnet32.ko * got lib dir as lib * /mnt/p2v-src-root/lib/libc.so.6 -> /mnt/p2v-src-root/tmp/initrd.ZFby2e/lib * /mnt/p2v-src-root/lib/libm.so.6 -> /mnt/p2v-src-root/tmp/initrd.ZFby2e/lib ERROR:
cannot find source file /mnt/p2v-src-root/lib/libm.so.6 during file copy (return code 1)'

Tags (1)
Reply
0 Kudos
8 Replies
POCEH
VMware Employee
VMware Employee

Could you upload log bundle?

Reply
0 Kudos
patanassov
VMware Employee
VMware Employee

First - Converter does not officially support Debian. If the target machines boots fine, then the conversion has been successful. The easiest thing is to leave it as is. If you want to go deeper, keep reading.

As mentioned, Converter does not support Debian. It attempts to treat it as Ubuntu and run 'initramfs' during reconfiguration. In this case it seems that it didn't recognize it correctly and has tried to run a generic (old RedHat base) mkinitrd script that issued those errors. Identifying the source as Debian is done by parsing the '/etc/debian_version' file for the version. Upload the logs (worker and helper) and check for that file on the source. If it exists - post its content, if not - try to create one with appropriate content ("<major>.<minor>" should be enough) and reconvert.

HTH,

Plamen

Reply
0 Kudos
Jyytuki
Contributor
Contributor

Thank you for your response and sorry for my late reply.

I wasn't in a hurry to solve this because the virtual machine worked and only now had time to look deeper in to this. I checked my source machine and there is indeed a file called /etc/debian_version in it. The file contains the following string "9.5". Based on this the Converter should be able to understand the version at least?

I'll upload the log file from my latest attempt to convert the machine.

Reply
0 Kudos
patanassov
VMware Employee
VMware Employee

I've checked the code. There is one place Debian is not recognized as a separate distro; it then is set as 'other linux' which causes the wrong reconfig. This is actually not a bug because Debian is not supported anyway.

You mention the vm works. As the wise father said to his son asking "why does the sun shine?" - "if it works, don't touch it" 🙂 But if you really-really want to tweak it - create a file 'etc/lsb-release', write 'Ubuntu ' and a fictitious version in it (e.g. 16.04) and convert again to see what will happen.

Regards,

Plamen

Reply
0 Kudos
Jyytuki
Contributor
Contributor

Thanks for your reply!

The converter is truly a fantastic tool so I can't really grumble that debian doesn't fall in to the category of supported distros, especially when I'm still able to have a working VM out of our physical Debian server. At this point this trouble shooting is more about satisfying my own curiosity rather than our production depending on it. And of course it's prettier when there isn't a big fat X with FAILED message on the screen after the job is done ; )

That being said I tried your suggestion and made a file '/etc/lsb-release' and wrote following lines in it:

DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=16.04

DISTRIB_CODENAME=xenial

DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"

I encountered the same error, so it seems like it's still not recognized correclty. Do the contents in my /etc/lsb-release file look correct?

I'll attach the log file here just in case.

Reply
0 Kudos
patanassov
VMware Employee
VMware Employee

The file looks right, yet sysinfo still reports Debian. I am short of ideas why. Eventually you could double-check for some stupid mistake (like not saving the file or something)

Reply
0 Kudos
Jyytuki
Contributor
Contributor

Does the Converter Standalone always use the lsb-release file to determine what the converted system is, or does it also use information returned by the command uname -a or the information in file /proc/version ?

Both uname -a and cat /proc/version return Debian as the system version.

I'll attach pictures of all the commands.

Reply
0 Kudos
jamez0rz
Contributor
Contributor

After few attempts I got it working. Thanks to the hint of lsb-release from patanassov.
The problem really comes from vCenter Converter Standalone not recognising system OS.
I managed to finally get it 100% converted, tricking vCenter Converter Standalone to think the machine is Ubuntu

Log in in the original machine and:
- make a backup from /etc/os-release
mv /etc/os-release /etc/os-release.bak
- write new os-release file
nano /etc/os-release
NAME="Ubuntu"
VERSION="18.04 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
- start Converter Standalone task as usual
- when it finishes you can power on virtual machine and restore os-release backup
rm /etc/os-release
mv /etc/os-release.bak /etc/os-release

Reply
0 Kudos