P2V of a Linux machine fails with: Unable to query the live Linux source machine
search cancel

P2V of a Linux machine fails with: Unable to query the live Linux source machine

book

Article ID: 309967

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides some troubleshooting tips for the failure of P2V a Linux machine in the first phase (Source System).

Symptoms:
You may see error:  Unable to query the live Linux source machine as the Converter fails to collect Linux system information.
Basic troubleshooting steps have been done:

  • SSH traffic between the Windows of converter installed and the Linux machine is ok (using putty connect to Linux port 22 is ok)
  • Shell of (root) user is /bin/bash, no 'echo' in $HOME/.bashrc and /tmp is writable  (Article 313484)
  • Have tried several versions of converter
  • UAC is confirmed to be disabled on Windows
  • UAC is enabled but we do run Converter as Administrator on Windows



Environment

VMware vCenter Converter Standalone 6.0.x
VMware vCenter Converter Standalone 5.1.x
VMware vCenter Converter Standalone 5.5.x
VMware vCenter Converter Standalone 4.3.x
VMware vCenter Converter Standalone 5.0.x
VMware vCenter Converter Standalone 5.x
VMware vCenter Converter Standalone 6.x
VMware vCenter Converter Standalone 4.0.x

Cause

Unable to query the live Linux source machine happens when the Converter fails to collect Linux system information. It may be an issue of transferring sysinfo tar ball from Windows to Linux, an issue of collecting system information, or there is some configuration issue in Linux.

Resolution

When performing P2V of a Linux machine with VMware vCenter Converter Standalone on a Windows box,
  1. ​Converter builds an SSH connection to the Linux machine via port 22.
  2. We see a Converter Security Warning to confirm the SSL Thumbprint to be correct, click Yes to confirm.
  3. Converter transfers a file (vmware-sysinfo-lin64.tar.gz or vmware-sysinfo-lin32.tar.gz) to the Linux machine via scp/sftp by plink.exe/pscp.exe
  4. On the Linux machine, the above gzip file is extracted, and the extracted file vmware-sysinfo.sh is running to collect system information of the Linux machine.
  5. If everything is ok, Converter will step into the 2nd phase (Destination System), otherwise we may see an error, such as "Unable to query the live Linux source machine".
To understand what causes a failure we need to check the converter worker log at C:\ProgramData\VMware\VMware vCenter Converter Standalone\logs\vmware-converter-worker-*.log, while this log can be also collected by clicking 'Export diagnostic logs..." on the Converter.

Here are some typical errors,

1. Converter failed to use pscp.exe to transfer vmware-sysinfo-lin64.tar.gz to Linux machine,

error vmware-converter-worker[07076] [Originator@6876 sub=Default] [Converter Agent SysinfoQuery] while trying to execute "C:\Program Files (x86)\VMware\VMware vCenter Converter Standalone\pscp.exe -noprompt -stdin-pass-and-key <ConverterPrivateKeyEnd> -P 22 -thumbprint fe:1d:##:##:##:##:##:##:##:##:##:##:##:##:13:6c C:\Program Files (x86)\VMware\VMware vCenter Converter Standalone\vmware-sysinfo-lin64.tar.gz root@[IP]:/tmp/.vmware-sysinfo-[hostname]/vmware-sysinfo-lin64.tar.gz" received error code (1) with result: Fatal: Received unexpected end-of-file from server


error vmware-converter-worker[07076] [Originator@6876 sub=Default] [Converter Agent SysinfoQuery] received an error code (1) from the ssh client that will be handled later
error vmware-converter-worker[07076] [Originator@6876 sub=Default] Converter Agent SysinfoQuery failed to copy tar bundle; return code: 1; result: Fatal: Received unexpected end-of-file from server


Resolution: Converter uses pscp.exe to transfer vmware-sysinfo file via sftp so we need to check sftp setting in /etc/ssh/sshd_config by looking for the line,

#Subsystem  sftp   /usr/libexec/openssh/sftp-server

Remove # from the beginning of this line, also "ls -l /usr/libexec/openssh/sftp-server" to confirm the executable sftp-server exists and valid. Revise the path of sftp-server if necessary. Then run "service sshd restart" to restart sshd and try Converter again.

2. /usr/sbin/scp: Permission denied

error vmware-converter-worker[01504] [Originator@6876 sub=Default] [Converter Agent SysinfoQuery] while trying to execute "C:\Program Files (x86)\VMware\VMware vCenter Converter Standalone\pscp.exe -noprompt -stdin-pass-and-key <ConverterPrivateKeyEnd> -P 22 -thumbprint a9:cd:##:##:##:##:##:##:##:##:##:##:##:##:d5:7f C:\Program Files (x86)\VMware\VMware vCenter Converter Standalone\vmware-sysinfo-lin64.tar.gz root@[IP]:/tmp/.vmware-sysinfo-[hostname]/vmware-sysinfo-lin64.tar.gz" received error code (1) with result: bash: /usr/sbin/scp: Permission denied

--> Fatal: Received unexpected end-of-file from server

Resolution: Check file permission of /usr/sbin/scp by "ls -l /usr/sbin/scp" and give execution permission by chmod, such as 'chmod 755 /usr/sbin/scp'.

Note that scp and ssh use the same port/protocol and it's not possible to disable scp without disabling ssh. And hence some system operator may change permission of /usr/sbin/scp as a workaround to block scp.


3. Can not find GRUB configuration file,

PopulateBootLoaderType: Trying to run grub-install
Command 'grub-install --version' returned:
grub-install (GNU GRUB 0.97)
PopulateBootLoaderType: Detected GRUB version as GRUB1
ResolveSymbolicLink: Cannot find /boot/grub/grub.conf
ResolveSymbolicLink: Cannot find /boot/grub/menu.lst
Looking for grub.conf in /boot
Command 'find /boot -name grub.conf' returned:
Can not find grub.conf
Looking for menu.lst in /boot
Command 'find /boot -name menu.lst' returned:
Can not find menu.lst
Can not find GRUB configuration file


Resolution: grub-install is found and GRUB version is GRUB1 so /boot/grub/grub.conf and /boot/grub/menu.lst will be collected for Linux booting. However these two files are not found under /boot/grub or any other sub-directory of /boot. Without a proper grub.conf and menu.lst the Linux machine will be unbootable after a reboot, instead, it will be booted into grub prompt. Need to seek assistance from the Linux vendor to recover the boot files first.