From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfLzv-0008Ip-Dl for qemu-devel@nongnu.org; Thu, 01 Sep 2016 03:01:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfLzp-0008Em-4I for qemu-devel@nongnu.org; Thu, 01 Sep 2016 03:01:14 -0400 Received: from indium.canonical.com ([91.189.90.7]:49278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfLzo-0008Ei-Uk for qemu-devel@nongnu.org; Thu, 01 Sep 2016 03:01:09 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1bfLzn-0000R7-Qs for ; Thu, 01 Sep 2016 07:01:07 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id E5BFD2E80C7 for ; Thu, 1 Sep 2016 07:01:05 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Thu, 01 Sep 2016 06:54:12 -0000 From: "T. Huth" <1414466@bugs.launchpad.net> Reply-To: Bug 1414466 <1414466@bugs.launchpad.net> Sender: bounces@canonical.com References: <20150125172405.12316.8764.malonedeb@soybean.canonical.com> Message-Id: <20160901065412.15931.10817.malone@soybean.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1414466] Re: -net user, hostfwd=... is not working(qemu-system-aarch64) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org I think this is not a bug, but you are using the command line parameters in a wrong way. When you use "-net user,hostfwd=3Dtcp:127.0.0.1:1122-:22" you are creating a *new*, second host network device which is not connected to the guest NIC device that you specified. Please try to avoid mixing "-net" and "-netdev" options. You should rather do something like this instead: -netdev user,id=3Dunet,hostfwd=3Dtcp:127.0.0.1:1122-:22 -device virtio-net- device,netdev=3Dunet ** Changed in: qemu Status: Confirmed =3D> Invalid -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1414466 Title: -net user,hostfwd=3D... is not working(qemu-system-aarch64) Status in QEMU: Invalid Bug description: QEMU version: git a46b3aaf6bb038d4f6f192a84df204f10929e75c /opt/qemu.git/bin/qemu-system-aarch64 --version QEMU emulator version 2.2.50, Copyright (c) 2003-2008 Fabrice Bellard Hosts: ovs - host machine (Ubuntu 14.04.1, x86_64) debian8-arm64 - guest = Guest start: user@ovs:~$ /opt/qemu.git/bin/qemu-system-aarch64 -machine virt -cpu cort= ex-a57 -nographic -smp 1 -m 512 -kernel vmlinuz-run -initrd initrd-run.img = -append "root=3D/dev/sda2 console=3DttyAMA0" -global virtio-blk-device.scsi= =3Doff -device virtio-scsi-device,id=3Dscsi -drive file=3Ddebian8-arm64.img= ,id=3Drootimg,cache=3Dunsafe,if=3Dnone -device scsi-hd,drive=3Drootimg -net= dev user,id=3Dunet -device virtio-net-device,netdev=3Dunet -net user,hostfw= d=3Dtcp:127.0.0.1:1122-:22 root@debian8-arm64:~# netstat -ntplu | grep ssh tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTE= N 410/sshd = tcp6 0 0 :::22 :::* LISTE= N 410/sshd = (no firewall in guest vm) user@ovs:~$ netstat -ntplu | grep 1122 tcp 0 0 127.0.0.1:1122 0.0.0.0:* LISTE= N 18722/qemu-system-a user@ovs:~$ time ssh user@127.0.0.1 -p 1122 ssh_exchange_identification: read: Connection reset by peer real 1m29.341s user 0m0.005s sys 0m0.000s Inside guest vm sshd works fine: root@debian8-arm64:~# ssh user@127.0.0.1 -p 22 user@127.0.0.1's password: = .... user@debian8-arm64:~$ exit logout Connection to 127.0.0.1 closed. root@debian8-arm64:~# ssh user@10.0.2.15 -p 22 user@10.0.2.15's password: = ... user@debian8-arm64:~$ exit logout Connection to 10.0.2.15 closed. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1414466/+subscriptions