diff --git a/README.md b/README.md index 7c390cc..297f2c0 100644 --- a/README.md +++ b/README.md @@ -243,10 +243,11 @@ TD, PID: 111924, SSH : ssh -p 10022 root@localhost ```console Id Name State --------------------------------------------------------------------------- - 1 tdvirsh-trust_domain-f7210c2b-2657-4f30-adf3-639b573ea39f running (ssh:32855, cid:3) + 1 tdvirsh-trust_domain-f7210c2b-2657-4f30-adf3-639b573ea39f running (ip:192.168.122.212, hostfwd:32855, cid:3) ``` - NOTE: `32855` in `ssh:32855` is the port number a user can use to connect to the TD via `ssh`. + NOTE: `32855` in `hostfwd:32855` is the port number a user can use to connect to the TD via `ssh -p 32855 root@localhost`. + You can also connect to the guest using its IP address : `ssh root@192.168.122.212`. * A TD can be removed with the following command: diff --git a/guest-tools/regular_vm.xml.template b/guest-tools/regular_vm.xml.template index c47cc94..20b8fd5 100644 --- a/guest-tools/regular_vm.xml.template +++ b/guest-tools/regular_vm.xml.template @@ -36,6 +36,11 @@ + + + +
+ diff --git a/guest-tools/tdvirsh b/guest-tools/tdvirsh index bc3c575..0a9152a 100755 --- a/guest-tools/tdvirsh +++ b/guest-tools/tdvirsh @@ -172,7 +172,16 @@ print_all() { --hmp info qtree 2>&1 | awk '/guest-cid/ {print $3}' ) - extra_info="(ssh:$host_port, cid:${guest_cid})" + host_ip=$( + virsh domifaddr ${td_domain} 2>&1 | + awk '/vnet/ {print $4}' + ) + if [[ "${host_ip}" != */* ]]; then + host_ip="unknown" + else + host_ip="${host_ip%/*}" + fi + extra_info="(ip:${host_ip}, hostfwd:$host_port, cid:${guest_cid})" fi echo "$line $extra_info" done < <(virsh "list --all") diff --git a/guest-tools/trust_domain-sb.xml.template b/guest-tools/trust_domain-sb.xml.template index 1b2f6d7..441cd9a 100644 --- a/guest-tools/trust_domain-sb.xml.template +++ b/guest-tools/trust_domain-sb.xml.template @@ -40,6 +40,11 @@ + + + +
+ diff --git a/guest-tools/trust_domain.xml.template b/guest-tools/trust_domain.xml.template index 116f710..b8a8965 100644 --- a/guest-tools/trust_domain.xml.template +++ b/guest-tools/trust_domain.xml.template @@ -40,6 +40,11 @@ + + + +
+