Site icon HyperHCI.com

Linux P2V Migration Error: Make sure that you can run sudo without entering a password – Troubleshooting

VMware vCenter Converter Tool Error List Troubleshooting

VMware vCenter Converter Tool Error List Troubleshooting

If you are trying to migrate the Linux machine P2V and/or V2V using vCenter converter standalone tool but facing migration error: Unable to query the live Linux source machine. Make sure that you can run sudo without entering a password when logged in to the source machine over SSH as user. but did not get the solution yet.

Linux P2V Error : Unable to query the live Linux source machine. Make sure that you can run sudo without entering a password when logged in to the source machine over SSH as user

I have the best solution If you are struggling / facing these following errors list in vCenter converter standalone tool.

Linux P2V / V2V Error 1 : Unable to query the live Linux source machine. Make sure that you can run sudo without entering a password when logged in to the source machine over SSH as user.

Linux P2V / V2V Error 2 : use of a non-root user for hot cloning of a Linux source machine.

Linux P2V / V2V Error 3 : VMware vCenter Converter Standalone Client need root privileges on the source machine ?

Linux P2V / V2V Error 4 : If you are / want to Use non root user to migrate the linux machine P2V and/or V2V.

Linux P2V / V2V Error 5 : sudo: sorry, you must have a tty to run sudo

Read also: Nutanix Move Migration Guide

Best Solution – Must Work

I am going to tell the the Best Solution that works in most of the cases to resolve the error: Unable to query the live Linux source machine. Make sure that you can run sudo without entering a password when logged in to the source machine over SSH as user.

Follow the steps:

Step 1: Open the Target Linux Machine ( Need to be migrated ) console

Step 2: Make changes in Sudoers config File

 username ALL=(ALL) NOPASSWD:ALL
#Defaults requiretty  ----> Comment it out

OR – You can just disable it on a per-user basis instead of globally disabling it. If the vendor tool has it’s own account that it’s using, disable requiretty for that one specific account and leave the global defaults in place.

Defaults:username !requiretty

Sudoer config File output will be like below:

##The COMMANDS section may have other options added to it.
##Allow root to run any commands anywhere

 root    ALL=(ALL)       ALL
 user1 ALL=(ALL) ALL
 user2  ALL=(ALL) ALL
 user3   ALL=(ALL) ALL
 user4 ALL=(ALL) NOPASSWD:ALL  --> Make this Entry for Non-root User, "sudo su -" command - will not ask user's password   
 
#Defaults requiretty   --> Comment this line
 
##Allows members of the 'sys' group to run networking, software,
##service management apps and more.
 #%sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, 

##DELEGATING, PROCESSES, LOCATE, DRIVERS
 ##Allows people in group wheel to run all commands
# %wheel        ALL=(ALL)       ALL

## Same thing without a password
# %wheel        ALL=(ALL)       NOPASSWD: ALL
 
##Allows members of the users group to mount and unmount the
 ##cdrom as root
 ##Drivers
 ##Cmnd_Alias DRIVERS = /sbin/modprobe
 #Defaults specification

Note: The sudoers configuration might vary by system. For Ubuntu operating systems further configuration is needed. Target the specific user you are using and assign it user id 0/group 0. Ensure that you also enable Allow root to ssh even though you are not using the root account.

Read also: Cross Hypervisor Migration To-from Nutanix AHV

Step 3: If you are using vCenter converter standalone tool – Windows based / Installed in Winodws OS than need to make few changes in xml files.

VMware vCenter Converter Standalone path in Windows OS
Change flag from <useSudo>false</useSudo> to  <useSudo>true</useSudo>  
Change flag from <useSudo>false</useSudo> to  <useSudo>true</useSudo>

<useSudo>True</useSudo> Flag to indicate whether to use each task’s Linux P2V source machine’s password as the root password for the helper VM. Normally during Linux P2V the helper VM is inaccessible to the user, but this option overrides that behaviour and allows the user to login to the console of the helper VM.

This could be useful to retrieve logs in case of a catastrophic failure of the Converter Helper Server on the helper VM. It could also be used to debug problems with the network of the helper VM.

Important to note: when enabling this option it is highly recommended to also disable powerOff Helper Vm, so that the helper VM does not disappear out from underneath of you when the task is finished

Step 4: Restart vCenter Converter Standalone tool Services

Go to Windows Services and restart following services

Alternatively way : instead of restarting Converter Standalone agent, you can reboot the system to make the changes to converter-agent.xml take effect.

Read also: Nutanix Infra Default Credentials

Conclusion

Hopefully, You might get the solution of Linux machine P2V / V2V migration error: Unable to query the live Linux source machine. Make sure that you can run sudo without entering a password when logged in to the source machine over SSH as user -issue solution here.

Thanks to to being with HyperHCI Tech Blog to stay tuned to get the latest techie updates.!

More Troubleshooting Useful Links

Exit mobile version