~ubuntu-bugcontrol/ubuntu-qa-tools/master

Viewing all changes in revision 1162.

  • Committer: Jamie Strandboge
  • Date: 2017-09-20 23:20:00 UTC
  • Revision ID: jamie@ubuntu.com-20170920232000-3qbogucqlzhlxbau
vm-tools/uvt: use 'virsh domifaddr' for ping/ssh when UVT_USE_DOMIFADDR=1
- add vm_domifaddr()
- adjust vm_run_command() to use ip with ssh if UVT_USE_DOMIFADDR=1
- adjust vm_ping() to obtain ip and ping it if UVT_USE_DOMIFADDR=1
- adjust ssh_connect() to add 'resolve=True' argument which will call
  vm_domifaddr() if UVT_USE_DOMIFADDR=1

While not required for uvt, people may want to adjust their ~/.ssh/config to
have something along the lines of:

Host *.vm sec-*-amd64 sec-*-i386
#    StrictHostKeyChecking no
#    UserKnownHostsFile /dev/null
    ProxyCommand nc $(virsh domifaddr $(echo %h | sed "s/\.vm//g") | grep ipv4 | tail -1 | awk '{print $NF}' | cut -d '/' -f 1) %p

so that things like 'ssh sec-xenial-amd64' work as expected.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: