Comment 6 for bug 1621550

Revision history for this message
Ryan Harper (raharper) wrote :

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