It's specific to using qemu's userspace networking (-net user) and and
using qemu's tcp redir to map the in-guest port 22 to the host.

http://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29

I don't think we always want to key off of QEMU cpu string;
It's possible for someone to boot this image with bridged 
networking and then the UI wouldn't be right either.

To detect default -net user configs, maybe a combination of the
DHCP server IP (10.0.2.2) and lack of ICMP response?

% ping -w 1 -c1 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.

--- 8.8.8.8 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms

% echo $?
1

http://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29


If present, this tells you the virt type:

$ systemd-detect-virt 
qemu

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1621550

Title:
  Snappy should detect when running in KVM, specify correct ssh
  connection line

To manage notifications about this bug go to:
https://bugs.launchpad.net/snappy/+bug/1621550/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to