We've previously on many occasions tried to make 'virt-v2v -i vmx -it
ssh' deal with spaces and other shell characters in the path. It
still doesn't work, this time when there are glob characters in the path:
https://issues.redhat.com/browse/RHEL-21365
While looking into this I found that even newest scp behaves extremely
weirdly with all shell special characters (details in the final patch).
This solution proposes not running ssh/scp directly at all, but
instead using nbdkit-ssh-plugin (which uses SFTP) to take the command
line out of the equation. Note we already require nbdkit,
nbdkit-ssh-plugin, nbdcopy and nbdinfo, so there are no new
requirements here.
Arguably the final patch in the series is entirely optional, if we
wanted to just refactor and tidy up and keep using ssh & scp.
Also this fixes the -ip (input password) parameter as an unintended
side-effect.
Also this related patch to nbdkit slightly improves the error message
seen if you point virt-v2v at a missing VMX path:
https://gitlab.com/nbdkit/nbdkit/-/commit/10fefe78e250e5052b3ca05b2aeeb60...
Rich.